物品使用统计,权限、日期选择器

init
zhusiyu 3 years ago
parent 378c0d2229
commit 7c62082881

@ -1,11 +1,13 @@
<template>
<a-spin :spinning="spinning">
<div class="deptLarge">
<div class="date">
<a-icon type="left"/>
{{start_date}}{{end_date}}
<a-icon type="right"/>
</div>
<!--<div class="date">-->
<!--<a-icon type="left"/>-->
<!--{{start_date}}{{end_date}}-->
<!--<a-icon type="right"/>-->
<!--</div>-->
<DateChoose @flushDate="flushDate" :begin_date="begin_date" :end_date="end_date"
class="goods_date-choose-div"></DateChoose>
<div class="select">
<a-select
ref="select"
@ -42,19 +44,23 @@
</template>
<script>
import {Icon, Row, Col, Spin, Select} from 'ant-design-vue';
import InterConfig from '../../interConfig';
import DateChoose from '../../../common/dateChoose.vue'
import interConfig from '../../interConfig';
import moment from 'moment';
import goodsUseLargeBg from '../common/goodsUseLargeBg.vue';
import departmentGoodsTableLarge from './departmentGoodsTableLarge.vue'
import departmentMemberTableLarge from './departmentMemberTableLarge.vue'
import departmentChartLarge from './departmentChartLarge.vue'
export default{
data(){
export default {
data() {
return {
GoodsTableTitle: '物品领用统计',
MemberTableTitle: '成员领用统计',
ChartTitle: '每日领用统计',
start_date: 0,
end_date: 0,
begin_date: "",
end_date: "",
searchTime: "",
value1: 'jack',
spinning: true,
}
@ -70,14 +76,41 @@
departmentGoodsTableLarge,
departmentMemberTableLarge,
departmentChartLarge,
DateChoose,
},
mounted(){
this.text()
mounted() {
this.text();
this.getNowTime();
},
methods: {
text(){
text() {
this.spinning = false
}
},
flushDate(param) {
this.begin_date = param.beginDate;
this.end_date = param.endDate;
this.searchTime = this.begin_date + "|" + this.end_date;
},
getNowTime() {
this.InterfaceConfig.callInterface([{
url: interConfig.getNowTime.url,
params: {},
method: interConfig.getNowTime.method,
isTestLogin: interConfig.getNowTime.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
let year = resData.data.year;
let month = resData.data.month;
let day = resData.data.day;
this.begin_date = moment(year + "-" + month + "-01");
this.end_date = moment(year + "-" + month + "-" + day);
this.searchTime = this.begin_date + "|" + this.end_date;
}
}
})
},
},
}
</script>
@ -85,6 +118,13 @@
.deptLarge {
position: relative;
margin-top: 25px;
.goods_date-choose-div {
position: absolute !important;
top: -57px !important;
left: 40% !important;
color: #fff !important;
width: 300px;
}
.date {
position: absolute;
width: 240px;

@ -1,11 +1,8 @@
<template>
<a-spin :spinning="spinning">
<div class="mechLarge">
<div class="date">
<a-icon type="left"/>
{{start_date}}{{end_date}}
<a-icon type="right"/>
</div>
<DateChoose @flushDate="flushDate" :begin_date="begin_date" :end_date="end_date"
class="goods_date-choose-div"></DateChoose>
<a-row type="flex" justify="space-between">
<a-col class="goodsTable">
<goodsUseLargeBg :largeBgTitle="GoodsTableTitle">
@ -30,19 +27,23 @@
</template>
<script>
import {Icon, Row, Col, Spin, Select} from 'ant-design-vue';
import InterConfig from '../../interConfig';
import DateChoose from '../../../common/dateChoose.vue'
import interConfig from '../../interConfig';
import moment from 'moment';
import goodsUseLargeBg from '../common/goodsUseLargeBg.vue';
import departmentGoodsTableLarge from './departmentGoodsTableLarge.vue'
import departmentMemberTableLarge from './departmentMemberTableLarge.vue'
import departmentChartLarge from './departmentChartLarge.vue'
export default{
data(){
export default {
data() {
return {
GoodsTableTitle: '物品领用统计',
MemberTableTitle: '成员领用统计',
ChartTitle: '每日领用统计',
start_date: 0,
end_date: 0,
begin_date: "",
end_date: "",
searchTime: "",
spinning: true,
}
},
@ -57,14 +58,41 @@
departmentGoodsTableLarge,
departmentMemberTableLarge,
departmentChartLarge,
DateChoose,
},
mounted(){
mounted() {
this.text()
this.getNowTime();
},
methods: {
text(){
text() {
this.spinning = false
}
},
flushDate(param) {
this.begin_date = param.beginDate;
this.end_date = param.endDate;
this.searchTime = this.begin_date + "|" + this.end_date;
},
getNowTime() {
this.InterfaceConfig.callInterface([{
url: interConfig.getNowTime.url,
params: {},
method: interConfig.getNowTime.method,
isTestLogin: interConfig.getNowTime.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
let year = resData.data.year;
let month = resData.data.month;
let day = resData.data.day;
this.begin_date = moment(year + "-" + month + "-01");
this.end_date = moment(year + "-" + month + "-" + day);
this.searchTime = this.begin_date + "|" + this.end_date;
}
}
})
},
},
}
</script>
@ -72,6 +100,13 @@
.mechLarge {
position: relative;
margin-top: 25px;
.goods_date-choose-div {
position: absolute !important;
top: -57px !important;
left: 40% !important;
color: #fff !important;
width: 300px;
}
.date {
position: absolute;
width: 240px;

@ -1,11 +1,13 @@
<template>
<a-spin :spinning="spinning">
<div class="selfLarge">
<div class="dateSection">
<a-icon type="left"/>
{{start_date}}{{end_date}}
<a-icon type="right"/>
</div>
<!--<div class="dateSection">-->
<!--<a-icon type="left"/>-->
<!--{{start_date}}{{end_date}}-->
<!--<a-icon type="right"/>-->
<!--</div>-->
<DateChoose @flushDate="flushDate" :begin_date="begin_date" :end_date="end_date"
class="goods_date-choose-div"></DateChoose>
<a-row type="flex" justify="space-between" style="margin-top: 21px;">
<a-col :span="12" class="selfTableLarge">
<goodsUseLargeBg :largeBgTitle="selfTableTitle">
@ -27,11 +29,17 @@
import selfTableLarge from './selfTableLarge.vue'
import selfChartLarge from './selfChartLarge.vue'
import goodsUseLargeBg from '../common/goodsUseLargeBg.vue'
export default{
data(){
import DateChoose from '../../../common/dateChoose.vue'
import interConfig from '../../interConfig';
import moment from 'moment';
export default {
data() {
return {
start_date: 0,
end_date: 0,
begin_date: "",
end_date: "",
searchTime: "",
selfTableTitle: '物品领用统计',
selfChartLargeTitle: '每日领用统计',
spinning: true,
@ -162,20 +170,54 @@
selfTableLarge,
selfChartLarge,
goodsUseLargeBg,
DateChoose,
},
mounted(){
this.text()
mounted() {
this.text();
this.getNowTime();
},
methods: {
text(){
text() {
this.spinning = false
}
},
flushDate(param) {
this.begin_date = param.beginDate;
this.end_date = param.endDate;
this.searchTime = this.begin_date + "|" + this.end_date;
},
getNowTime() {
this.InterfaceConfig.callInterface([{
url: interConfig.getNowTime.url,
params: {},
method: interConfig.getNowTime.method,
isTestLogin: interConfig.getNowTime.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
let year = resData.data.year;
let month = resData.data.month;
let day = resData.data.day;
this.begin_date = moment(year + "-" + month + "-01");
this.end_date = moment(year + "-" + month + "-" + day);
this.searchTime = this.begin_date + "|" + this.end_date;
}
}
})
},
}
}
</script>
<style scoped lang="scss">
.selfLarge {
position: relative;
.goods_date-choose-div {
position: absolute !important;
top: -57px !important;
left: 40% !important;
color: #fff !important;
width: 300px;
}
.dateSection {
position: absolute;
width: 240px;

@ -1,9 +1,8 @@
<template>
<div class="deptTopSmall">
<div class="dataBox">
<a-icon type="left"/>
{{start_date}}{{end_date}}
<a-icon type="right"/>
<DateChoose @flushDate="flushDate" :begin_date="begin_date" :end_date="end_date"
class="goods_date-choose-div"></DateChoose>
<a-select
ref="select"
v-model:value="value1"
@ -38,15 +37,19 @@
</template>
<script>
import {Icon, Row, Col, Spin, Table, Select, Carousel} from 'ant-design-vue';
import InterConfig from '../../interConfig';
import DateChoose from '../../../common/dateChoose.vue'
import interConfig from '../../interConfig';
import moment from 'moment';
import everyPartTitle from '../common/everyPartSlideTitle.vue'
export default{
data(){
export default {
data() {
return {
bgLeft: true,
bgtitle: '领用物品统计',
start_date: 0,
end_date: 0,
begin_date: "",
end_date: "",
searchTime: "",
value1: 'jack',
listScroll: this.StaticParams.scrollOption,
dataSource: [
@ -175,30 +178,63 @@
ASelect: Select,
ASelectOption: Select.Option,
everyPartTitle,
DateChoose,
},
mounted(){
mounted() {
this.getNowTime();
},
methods: {
flushDate(param) {
this.begin_date = param.beginDate;
this.end_date = param.endDate;
this.searchTime = this.begin_date + "|" + this.end_date;
},
getNowTime() {
this.InterfaceConfig.callInterface([{
url: interConfig.getNowTime.url,
params: {},
method: interConfig.getNowTime.method,
isTestLogin: interConfig.getNowTime.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
let year = resData.data.year;
let month = resData.data.month;
let day = resData.data.day;
this.begin_date = moment(year + "-" + month + "-01");
this.end_date = moment(year + "-" + month + "-" + day);
this.searchTime = this.begin_date + "|" + this.end_date;
}
}
})
},
},
methods: {},
}
</script>
<style scoped lang="scss">
.deptTopSmall {
position: relative;
.dataBox {
width: 280px;
width: 290px;
height: 30px;
position: absolute;
top: -32px;
color: #fff;
display: flex;
justify-content: space-around;
.goods_date-choose-div {
margin-top: -8px;
}
/deep/ .ant-select {
width: 85px !important;
width: 75px !important;
float: right !important;
.ant-select-selection {
background: none !important;
border: 1px solid #08E2ED !important;
color: #08E2ED !important;
height: 26px !important;
margin-top: -5px !important;
.ant-select-arrow {
color: #08E2ED !important;
margin-top: -4px !important;

@ -1,9 +1,7 @@
<template>
<div class="mechTopSmall">
<div class="dataBox">
<a-icon type="left"/>
{{start_date}}{{end_date}}
<a-icon type="right"/>
<DateChoose @flushDate="flushDate" :begin_date="begin_date" :end_date="end_date"></DateChoose>
</div>
<a-row type="flex" justify="space-bettwen">
<a-col :span="3">
@ -28,15 +26,19 @@
</template>
<script>
import {Icon, Row, Col, Spin, Table, Carousel} from 'ant-design-vue';
import InterConfig from '../../interConfig';
import DateChoose from '../../../common/dateChoose.vue'
import interConfig from '../../interConfig';
import moment from 'moment';
import everyPartTitle from '../common/everyPartSlideTitle.vue'
export default{
data(){
export default {
data() {
return {
bgLeft: true,
bgtitle: '领用物品统计',
start_date: 0,
end_date: 0,
begin_date: "",
end_date: "",
searchTime: "",
value1: 'jack',
listScroll: this.StaticParams.scrollOption,
dataSource: [
@ -163,21 +165,48 @@
ATable: Table,
ACarousel: Carousel,
everyPartTitle,
DateChoose,
},
mounted(){
mounted() {
this.getNowTime();
},
methods: {
flushDate(param) {
this.begin_date = param.beginDate;
this.end_date = param.endDate;
this.searchTime = this.begin_date + "|" + this.end_date;
},
getNowTime() {
this.InterfaceConfig.callInterface([{
url: interConfig.getNowTime.url,
params: {},
method: interConfig.getNowTime.method,
isTestLogin: interConfig.getNowTime.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
let year = resData.data.year;
let month = resData.data.month;
let day = resData.data.day;
this.begin_date = moment(year + "-" + month + "-01");
this.end_date = moment(year + "-" + month + "-" + day);
this.searchTime = this.begin_date + "|" + this.end_date;
}
}
})
},
},
methods: {},
}
</script>
<style scoped lang="scss">
.mechTopSmall {
position: relative;
.dataBox {
width: 280px;
width: 250px;
height: 30px;
position: absolute;
top: -32px;
top: -42px;
color: #fff;
/deep/ .ant-select {
width: 85px !important;

@ -2,9 +2,7 @@
<a-spin :spinning="spinning">
<div class="selfTopSmall">
<div class="dataBox">
<a-icon type="left"/>
{{start_date}}{{end_date}}
<a-icon type="right"/>
<DateChoose @flushDate="flushDate" :begin_date="begin_date" :end_date="end_date"></DateChoose>
</div>
<a-row type="flex" justify="space-bettwen">
<a-col :span="3">
@ -23,15 +21,19 @@
</template>
<script>
import {Icon, Row, Col, Spin, Table} from 'ant-design-vue';
import InterConfig from '../../interConfig';
import DateChoose from '../../../common/dateChoose.vue'
import interConfig from '../../interConfig';
import moment from 'moment';
import everyPartTitle from '../common/everyPartSlideTitle.vue'
export default{
data(){
export default {
data() {
return {
bgLeft: true,
bgtitle: '领用物品统计',
start_date: 0,
end_date: 0,
begin_date: "",
end_date: "",
searchTime: "",
listScroll: this.StaticParams.scrollOption,
dataSource: [
{
@ -157,14 +159,41 @@
ASpin: Spin,
ATable: Table,
everyPartTitle,
DateChoose,
},
mounted(){
mounted() {
this.getGoodsByEveryday()
this.getNowTime();
// this.getGoodsBySupplies()
// this.getGoodsByPeople()
},
methods: {
getGoodsByEveryday(){
flushDate(param) {
this.begin_date = param.beginDate;
this.end_date = param.endDate;
this.searchTime = this.begin_date + "|" + this.end_date;
},
getNowTime() {
this.InterfaceConfig.callInterface([{
url: interConfig.getNowTime.url,
params: {},
method: interConfig.getNowTime.method,
isTestLogin: interConfig.getNowTime.isTestLogin,
}], (result) => {
let resData = result[0].data;
if (result[0].status === 200) {
if (resData.code === 2000) {
let year = resData.data.year;
let month = resData.data.month;
let day = resData.data.day;
this.begin_date = moment(year + "-" + month + "-01");
this.end_date = moment(year + "-" + month + "-" + day);
this.searchTime = this.begin_date + "|" + this.end_date;
}
}
})
},
getGoodsByEveryday() {
let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID
dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2
@ -179,10 +208,10 @@
method: InterConfig.getGoodsByEveryday.method,
isTestLogin: InterConfig.getGoodsByEveryday.isTestLogin,
}], (result) => {
console.log('本人表格数据', result)
// console.log('', result)
})
},
getGoodsBySupplies(){
getGoodsBySupplies() {
let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID
dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2
@ -197,10 +226,10 @@
method: InterConfig.getGoodsBySupplies.method,
isTestLogin: InterConfig.getGoodsBySupplies.isTestLogin,
}], (result) => {
console.log('本人表格数据', result)
// console.log('', result)
})
},
getGoodsByPeople(){
getGoodsByPeople() {
let param = {
person_id: this.BaseConfig.userInfo.person_id,//ID
dept_id: this.BaseConfig.person_info_my.dep_id,//data_flag=2
@ -215,7 +244,7 @@
method: InterConfig.getGoodsByPeople.method,
isTestLogin: InterConfig.getGoodsByPeople.isTestLogin,
}], (result) => {
console.log('本人表格数据', result)
// console.log('', result)
})
},
},
@ -225,10 +254,10 @@
.selfTopSmall {
position: relative;
.dataBox {
width: 200px;
width: 250px;
height: 30px;
position: absolute;
top: -34px;
top: -42px;
color: #fff;
}
.score-list-div {

@ -5,11 +5,11 @@
<selfTopSmall :dataFlag="1"/>
<selfBotSmall :dataFlag="1"/>
</a-tab-pane>
<a-tab-pane key="2" tab="部门">
<a-tab-pane key="2" tab="部门" v-if="deptTab">
<departmentTopSmall/>
<departmentBotSmall/>
</a-tab-pane>
<a-tab-pane key="3" tab="机构">
<a-tab-pane key="3" tab="机构" v-if="orgTab">
<mechanismTopSmall/>
<mechanismBotSmall/>
</a-tab-pane>
@ -24,10 +24,28 @@
import departmentBotSmall from './components/goodsUseCensusSmall/departmentBotSmall.vue'
import mechanismTopSmall from './components/goodsUseCensusSmall/mechanismTopSmall.vue'
import mechanismBotSmall from './components/goodsUseCensusSmall/mechanismBotSmall.vue'
export default{
data(){
import OfficeMenuConfig from '../../../../../../../../src/utils/officeMenuConfig';
export default {
data() {
return {
activeKey: '1',
deptTab: false,
orgTab: false,
depAdmin: false,//
orgAdmin: false,//
}
},
created() {
//
this.depAdmin = OfficeMenuConfig.menuIsExist(["daliyOffice", "goodsUseManagement", "itemUsageStatistics", "department"]);
if (this.depAdmin) {
this.deptTab = true
}
//
this.orgAdmin = OfficeMenuConfig.menuIsExist(["daliyOffice", "goodsUseManagement", "itemUsageStatistics", "mechanism"]);
if (this.depAdmin) {
this.orgTab = true
}
},
components: {
@ -54,7 +72,7 @@
.ant-tabs-nav .ant-tabs-tab {
color: #81D3F8 !important;
margin: 0 !important;
padding: 0 10px !important;
padding: 0 8px !important;
}
.ant-tabs-nav .ant-tabs-tab-active {
color: #00FFFF !important;
@ -65,9 +83,11 @@
.ant-tabs-nav {
float: right !important;
}
.ant-tabs-nav .ant-tabs-tab:nth-child(2) {
.ant-tabs-nav .ant-tabs-tab {
border-left: 1px solid #81D3F8 !important;
border-right: 1px solid #81D3F8 !important;
}
.ant-tabs-nav .ant-tabs-tab:first-child {
border: none !important;
}
}
}

@ -4,10 +4,10 @@
<a-tab-pane key="1" tab="本人">
<selfLarge/>
</a-tab-pane>
<a-tab-pane key="2" tab="部门">
<a-tab-pane key="2" tab="部门" v-if="deptTab">
<departmentLarge/>
</a-tab-pane>
<a-tab-pane key="3" tab="机构">
<a-tab-pane key="3" tab="机构" v-if="orgTab">
<mechanismLarge/>
</a-tab-pane>
</a-tabs>
@ -18,10 +18,28 @@
import selfLarge from './components/goodsUseCensusLarge/selfLarge.vue'
import departmentLarge from './components/goodsUseCensusLarge/departmentLarge.vue'
import mechanismLarge from './components/goodsUseCensusLarge/mechanismLarge.vue'
export default{
data(){
import OfficeMenuConfig from '../../../../../../../../src/utils/officeMenuConfig';
export default {
data() {
return {
activeKey: '1',
deptTab: false,
orgTab: false,
depAdmin: false,//
orgAdmin: false,//
}
},
created() {
//
this.depAdmin = OfficeMenuConfig.menuIsExist(["daliyOffice", "goodsUseManagement", "itemUsageStatistics", "department"]);
if (this.depAdmin) {
this.deptTab = true
}
//
this.orgAdmin = OfficeMenuConfig.menuIsExist(["daliyOffice", "goodsUseManagement", "itemUsageStatistics", "mechanism"]);
if (this.depAdmin) {
this.orgTab = true
}
},
components: {

@ -238,20 +238,14 @@
this.getNowTime();
},
methods: {
mySummaryFn(index) {
this.tabIndex = index
if (this.tabIndex == 2) {
this.tabIndexNum = true
} else {
this.tabIndexNum = false
}
},
tabChange: function (param) {
if (this.tabIndex != param.index) {
this.tabIndex = param.index;
this.pageType = param.cbName;
}
},
// mySummaryFn(index) {
// this.tabIndex = index
// if (this.tabIndex == 2) {
// this.tabIndexNum = true
// } else {
// this.tabIndexNum = false
// }
// },
chooseItem(index) {
switch (index) {
case 1:
@ -281,6 +275,11 @@
this.tabIndex = param.index;
this.pageType = param.cbName;
}
if (param.index == 2) {
this.tabIndexNum = true
} else {
this.tabIndexNum = false
}
},
flushDate(param) {
this.begin_date = param.beginDate;
@ -307,6 +306,9 @@
}
})
},
handleChange() {
},
},
components: {
ARow: Row,

Loading…
Cancel
Save