master
lion 9 months ago
parent 754f777aac
commit a0b1cb30b3

@ -2,7 +2,7 @@
<div id="app"> <div id="app">
<router-view /> <router-view />
<ThemePicker style="display: none;"></ThemePicker> <!-- <ThemePicker style="display: none;"></ThemePicker> -->
<OnlineFile></OnlineFile> <OnlineFile></OnlineFile>
</div> </div>
</template> </template>

@ -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 style="width:250px;margin-left:6px" size="small" @change="changeDepartment" v-model="select.department_id" placeholder="请选择"> <el-select v-if="is_bgs" 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;" :loading="loading" <vxe-table ref="table" stripe :border='true' style="margin-top: 10px;border:1px solid #333" :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,7 +75,8 @@
} 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 {
@ -87,6 +88,8 @@
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:'调休统计表',
@ -177,6 +180,13 @@
}, },
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()
}, },
@ -190,5 +200,14 @@
} }
</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 style="width:250px;margin-left:6px" size="small" @change="changeDepartment" <el-select v-if="is_bgs" 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;" :loading="loading" :max-height="1400" <vxe-table ref="table" stripe :border='true' style="margin-top: 10px;border:1px solid #333" :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,
@ -52,11 +52,8 @@
} from "@/api/chart" } from "@/api/chart"
import { import {
departmentListNoAuth departmentListNoAuth
} from "@/api/common.js" } from "@/api/common.js"
import * as XLSX from "xlsx"; import store from "@/store/modules/user.js"
import {
saveAs
} from "file-saver";
export default { export default {
data() { data() {
return { return {
@ -67,7 +64,9 @@
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: '加班统计表',
@ -185,7 +184,14 @@
}, },
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()
}, },
@ -199,5 +205,14 @@
} }
</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