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 }"
@ -75,7 +75,8 @@
} from "@/api/chart"
import {
departmentListNoAuth
} from "@/api/common.js"
} 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()
},
@ -190,5 +200,14 @@
}
</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>

@ -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,
@ -52,11 +52,8 @@
} from "@/api/chart"
import {
departmentListNoAuth
} from "@/api/common.js"
import * as XLSX from "xlsx";
import {
saveAs
} from "file-saver";
} from "@/api/common.js"
import store from "@/store/modules/user.js"
export default {
data() {
return {
@ -67,7 +64,9 @@
page_size: 10,
month: this.$moment().format('YYYY-MM'),
department_id: ''
},
},
my_department_id:"",
is_bgs:false, //
departments: [],
mergeCells: [],
exportName: '加班统计表',
@ -185,7 +184,14 @@
},
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.getList()
},
@ -199,5 +205,14 @@
}
</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>

Loading…
Cancel
Save