Compare commits

..

No commits in common. '7aff7b2ddd2f5fcda653596497301efe81efdbe2' and '754f777aac3827e5a3cb2ec388cce6e3eeb9b51e' have entirely different histories.

@ -77,31 +77,30 @@
<vxe-column <vxe-column
min-width="180" min-width="180"
header-align="center" header-align="center"
field="jiabanleixing" field="title"
title="加班类型" title="工作名称"
></vxe-column> ></vxe-column>
<vxe-column width="190" align="center" title="开始时间" field="kaishiriqi" /> <vxe-column width="190" align="center" title="开始时间" field="kaishiriqi" />
<vxe-column width="190" align="center" title="结束时间" field="jieshushijian" /> <vxe-column width="190" align="center" title="结束时间" field="jieshushijian" />
<vxe-column min-width="140" align="center" title="原因说明" field="yuanyinshuoming" /> <vxe-column
<!-- <vxe-column--> width="80"
<!-- width="80"--> align="center"
<!-- align="center"--> field="status"
<!-- field="status"--> title="当前状态"
<!-- title="当前状态"--> :formatter="({ cellValue }) => myStatus.get(cellValue)"
<!-- :formatter="({ cellValue }) => myStatus.get(cellValue)"--> :export-method="
<!-- :export-method="--> ({ row, column, options }) => myStatus.get(row['status'])
<!-- ({ row, column, options }) => myStatus.get(row['status'])--> "
<!-- "--> >
<!-- >--> <template #default="{ row }">
<!-- <template #default="{ row }">--> <el-tag
<!-- <el-tag--> size="mini"
<!-- size="mini"--> :type="statusColor.get(row.status)"
<!-- :type="statusColor.get(row.status)"--> effect="dark"
<!-- effect="dark"--> >{{ myStatus.get(row.status) }}</el-tag
<!-- >{{ myStatus.get(row.status) }}</el-tag--> >
<!-- >--> </template>
<!-- </template>--> </vxe-column>
<!-- </vxe-column>-->
<vxe-column <vxe-column
width="200" width="200"
align="center" align="center"

@ -6,7 +6,7 @@
<el-date-picker v-model="select.month" <el-date-picker v-model="select.month"
type="month" size="small" value-format="yyyy-MM" type="month" size="small" value-format="yyyy-MM"
placeholder="月份" format="yyyy-MM"/> placeholder="月份" format="yyyy-MM"/>
<el-select v-if="is_bgs" style="width:250px;margin-left:6px" size="small" @change="changeDepartment" v-model="select.department_id" placeholder="请选择"> <el-select style="width:250px;margin-left:6px" size="small" @change="changeDepartment" v-model="select.department_id" placeholder="请选择">
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@ -14,7 +14,7 @@
@click="getList">搜索</el-button> @click="getList">搜索</el-button>
</template> </template>
</vxe-toolbar> </vxe-toolbar>
<vxe-table ref="table" stripe :border='true' style="margin-top: 10px;border:1px solid #333" :loading="loading" <vxe-table ref="table" stripe :border='true' style="margin-top: 10px;" :loading="loading"
:max-height="1400" :min-height="400" :max-height="1400" :min-height="400"
:export-config="{type: 'xlsx',filename:exportName,sheetName:exportName}" :export-config="{type: 'xlsx',filename:exportName,sheetName:exportName}"
:print-config="{}" :column-config="{ resizable: true }" :print-config="{}" :column-config="{ resizable: true }"
@ -75,8 +75,7 @@
} from "@/api/chart" } from "@/api/chart"
import { import {
departmentListNoAuth departmentListNoAuth
} from "@/api/common.js" } from "@/api/common.js"
import store from "@/store/modules/user.js"
export default { export default {
data() { data() {
return { return {
@ -88,8 +87,6 @@
month: this.$moment().format('YYYY-MM'), month: this.$moment().format('YYYY-MM'),
department_id: '' department_id: ''
}, },
my_department_id:"",
is_bgs:false, //
departments:[], departments:[],
mergeCells:[], mergeCells:[],
exportName:'调休统计表', exportName:'调休统计表',
@ -180,13 +177,6 @@
}, },
computed: {}, computed: {},
created() { created() {
console.log("store",store)
this.my_department_id = store.state.department?store.state.department.id:''
this.dName = store.state.department?store.state.department.name:'全部科室'
if(this.my_department_id){
this.is_bgs = this.my_department_id==2?true:false
this.select.department_id = this.my_department_id
}
this.getDepartmentList() this.getDepartmentList()
this.getList() this.getList()
}, },
@ -200,14 +190,5 @@
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .vxe-body--column {
border-left: 1px solid #333 !important;
border-bottom: 1px solid #333 !important;
}
::v-deep th.vxe-header--column{
border-left: 1px solid #333 !important;
border-bottom: 2px solid #333 !important;
}
</style> </style>

@ -5,7 +5,7 @@
<template #buttons> <template #buttons>
<el-date-picker v-model="select.month" type="month" size="small" value-format="yyyy-MM" placeholder="月份" <el-date-picker v-model="select.month" type="month" size="small" value-format="yyyy-MM" placeholder="月份"
format="yyyy-MM" /> format="yyyy-MM" />
<el-select v-if="is_bgs" style="width:250px;margin-left:6px" size="small" @change="changeDepartment" <el-select style="width:250px;margin-left:6px" size="small" @change="changeDepartment"
v-model="select.department_id" placeholder="请选择"> v-model="select.department_id" placeholder="请选择">
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
@ -14,7 +14,7 @@
@click="getList">搜索</el-button> @click="getList">搜索</el-button>
</template> </template>
</vxe-toolbar> </vxe-toolbar>
<vxe-table ref="table" stripe :border='true' style="margin-top: 10px;border:1px solid #333" :loading="loading" :max-height="1400" <vxe-table ref="table" stripe :border='true' style="margin-top: 10px;" :loading="loading" :max-height="1400"
:min-height="400" :export-config="{type: 'xlsx',filename:exportName,sheetName:exportName}" :print-config="{}" :min-height="400" :export-config="{type: 'xlsx',filename:exportName,sheetName:exportName}" :print-config="{}"
:column-config="{ resizable: true }" :expand-config="{ :column-config="{ resizable: true }" :expand-config="{
visibleMethod: () => false, visibleMethod: () => false,
@ -37,7 +37,7 @@
</vxe-column> </vxe-column>
<vxe-column header-align="center" align="center" field="jiabanshichang" title="加班时长(h)"></vxe-column> <vxe-column header-align="center" align="center" field="jiabanshichang" title="加班时长(h)"></vxe-column>
<!-- <vxe-column header-align="center" align="center" field="day" title="day"></vxe-column> --> <!-- <vxe-column header-align="center" align="center" field="day" title="day"></vxe-column> -->
<vxe-column header-align="center" align="center" field="allDay" title="本月累计(h)"></vxe-column> <vxe-column header-align="center" align="center" field="allDay" title="本月累计(d)"></vxe-column>
@ -52,8 +52,11 @@
} from "@/api/chart" } from "@/api/chart"
import { import {
departmentListNoAuth departmentListNoAuth
} from "@/api/common.js" } from "@/api/common.js"
import store from "@/store/modules/user.js" import * as XLSX from "xlsx";
import {
saveAs
} from "file-saver";
export default { export default {
data() { data() {
return { return {
@ -64,9 +67,7 @@
page_size: 10, page_size: 10,
month: this.$moment().format('YYYY-MM'), month: this.$moment().format('YYYY-MM'),
department_id: '' department_id: ''
}, },
my_department_id:"",
is_bgs:false, //
departments: [], departments: [],
mergeCells: [], mergeCells: [],
exportName: '加班统计表', exportName: '加班统计表',
@ -115,7 +116,7 @@
department, department,
overtime overtime
} = item; } = item;
const allDay = overtime.reduce((sum, overtimeItem) => sum + parseFloat(overtimeItem.jiabanshichang), 0); const allDay = overtime.reduce((sum, overtimeItem) => sum + parseFloat(overtimeItem.day), 0);
overtime.forEach(overtimeItem => { overtime.forEach(overtimeItem => {
overtimeItem.pid = id; overtimeItem.pid = id;
overtimeItem.name = name; overtimeItem.name = name;
@ -184,14 +185,7 @@
}, },
computed: {}, computed: {},
created() { created() {
this.my_department_id = store.state.department?store.state.department.id:''
this.dName = store.state.department?store.state.department.name:'全部科室'
if(this.my_department_id){
this.is_bgs = this.my_department_id==2?true:false
this.select.department_id = this.my_department_id
}
this.getDepartmentList() this.getDepartmentList()
this.getList() this.getList()
}, },
@ -205,14 +199,5 @@
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
::v-deep .vxe-body--column {
border-left: 1px solid #333 !important;
border-bottom: 1px solid #333 !important;
}
::v-deep th.vxe-header--column{
border-left: 1px solid #333 !important;
border-bottom: 2px solid #333 !important;
}
</style> </style>

Loading…
Cancel
Save