master
lion 9 months ago
parent 754f777aac
commit a0b1cb30b3

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

@ -6,7 +6,7 @@
<el-date-picker v-model="select.month"
type="month" size="small" value-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>
</el-select>
@ -14,7 +14,7 @@
@click="getList">搜索</el-button>
</template>
</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"
:export-config="{type: 'xlsx',filename:exportName,sheetName:exportName}"
:print-config="{}" :column-config="{ resizable: true }"
@ -76,6 +76,7 @@
import {
departmentListNoAuth
} from "@/api/common.js"
import store from "@/store/modules/user.js"
export default {
data() {
return {
@ -87,6 +88,8 @@
month: this.$moment().format('YYYY-MM'),
department_id: ''
},
my_department_id:"",
is_bgs:false, //
departments:[],
mergeCells:[],
exportName:'调休统计表',
@ -177,6 +180,13 @@
},
computed: {},
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.getList()
},
@ -191,4 +201,13 @@
</script>
<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>

@ -5,7 +5,7 @@
<template #buttons>
<el-date-picker v-model="select.month" type="month" size="small" value-format="yyyy-MM" placeholder="月份"
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="请选择">
<el-option v-for="item in departments" :key="item.id" :label="item.name" :value="item.id">
</el-option>
@ -14,7 +14,7 @@
@click="getList">搜索</el-button>
</template>
</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="{}"
:column-config="{ resizable: true }" :expand-config="{
visibleMethod: () => false,
@ -53,10 +53,7 @@
import {
departmentListNoAuth
} from "@/api/common.js"
import * as XLSX from "xlsx";
import {
saveAs
} from "file-saver";
import store from "@/store/modules/user.js"
export default {
data() {
return {
@ -68,6 +65,8 @@
month: this.$moment().format('YYYY-MM'),
department_id: ''
},
my_department_id:"",
is_bgs:false, //
departments: [],
mergeCells: [],
exportName: '加班统计表',
@ -186,6 +185,13 @@
},
computed: {},
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.getList()
},
@ -200,4 +206,13 @@
</script>
<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>

Loading…
Cancel
Save