|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="page-header-index-wide">
|
|
<div class="page-header-index-wide">
|
|
- <template v-if="pageRoleNum > 2">
|
|
|
|
|
|
+ <template v-if="pageRoleNum >= 2">
|
|
<a-empty description="请联系管理员,当前角色权限设置有误或者当前账户无权限" style="height: 210px;margin-top: 200px;"/>
|
|
<a-empty description="请联系管理员,当前角色权限设置有误或者当前账户无权限" style="height: 210px;margin-top: 200px;"/>
|
|
</template>
|
|
</template>
|
|
<template v-else>
|
|
<template v-else>
|
|
@@ -99,7 +99,7 @@
|
|
</a-card>
|
|
</a-card>
|
|
|
|
|
|
<!-- 第三级模块:部门指标排行 -->
|
|
<!-- 第三级模块:部门指标排行 -->
|
|
- <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}" style="margin-top: 20px;">
|
|
|
|
|
|
+ <a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}" style="margin-top: 20px;" v-if="pageRoleNum===0">
|
|
<div class="salesCard">
|
|
<div class="salesCard">
|
|
<a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
|
|
<a-tabs default-active-key="1" size="large" :tab-bar-style="{marginBottom: '24px', paddingLeft: '16px'}">
|
|
<div class="extra-wrapper" slot="tabBarExtraContent">
|
|
<div class="extra-wrapper" slot="tabBarExtraContent">
|
|
@@ -107,7 +107,7 @@
|
|
<a-button :type="zbPhParams.time==='month'?'primary':'link'" @click="searchZbphChange('month')">按月查询</a-button>
|
|
<a-button :type="zbPhParams.time==='month'?'primary':'link'" @click="searchZbphChange('month')">按月查询</a-button>
|
|
<a-button :type="zbPhParams.time==='year'?'primary':'link'" @click="searchZbphChange('year')">按年查询</a-button>
|
|
<a-button :type="zbPhParams.time==='year'?'primary':'link'" @click="searchZbphChange('year')">按年查询</a-button>
|
|
</div>
|
|
</div>
|
|
- <a-month-picker v-if="zbPhParams.time === 'month'" placeholder="请选择月" :value="zbPhParams.beginDate" @change="zbphSearchChange" />
|
|
|
|
|
|
+ <a-month-picker v-if="zbPhParams.time === 'month'" placeholder="请选择月" :disabled-date="disabledYear" :value="zbPhParams.beginDate" @change="zbphSearchChange" />
|
|
<!-- <a-date-picker v-if="zbPhParams.time === 'year'"
|
|
<!-- <a-date-picker v-if="zbPhParams.time === 'year'"
|
|
@Change=zbphSearchChange
|
|
@Change=zbphSearchChange
|
|
placeholder="请选择年"
|
|
placeholder="请选择年"
|
|
@@ -122,6 +122,7 @@
|
|
format="YYYY"
|
|
format="YYYY"
|
|
:value="zbPhParams.yearValue"
|
|
:value="zbPhParams.yearValue"
|
|
:open="zbphYearIsopen"
|
|
:open="zbphYearIsopen"
|
|
|
|
+ :disabled-date="disabledYear"
|
|
placeholder="请选择年份"
|
|
placeholder="请选择年份"
|
|
@focus="changeopen"
|
|
@focus="changeopen"
|
|
@panelChange="handlePanelChange1">
|
|
@panelChange="handlePanelChange1">
|
|
@@ -417,15 +418,22 @@
|
|
this.searchZbphChange('month')
|
|
this.searchZbphChange('month')
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //限制选择年份
|
|
|
|
+ disabledYear(current){
|
|
|
|
+ // 不可以选择之前的日期,今天包括之后可以选,控制大于小于来实现选择之前的日期还是之后的日期
|
|
|
|
+ // return current < moment().subtract(1, 'year');
|
|
|
|
+ var timeYear = current.get('year'); // 当前年
|
|
|
|
+ return timeYear < '2023';
|
|
|
|
+ },
|
|
getZhibiaoCollect(){
|
|
getZhibiaoCollect(){
|
|
this.loading = true
|
|
this.loading = true
|
|
getZhibiaoCollect().then(res => {
|
|
getZhibiaoCollect().then(res => {
|
|
console.log(res)
|
|
console.log(res)
|
|
if (res.success) {
|
|
if (res.success) {
|
|
- if(res.result.auth >2){
|
|
|
|
- // 0:所领导,1:部门领导,2:员工;3:未赋值或选了多个前面所说角色
|
|
|
|
- // 如果是管理员,默认显示所领导的
|
|
|
|
- this.pageRoleNum = res.result.auth
|
|
|
|
|
|
+ // 0:所领导,1:部门领导,2:员工;3:未赋值或选了多个前面所说角色
|
|
|
|
+ // 如果是管理员,默认显示所领导的
|
|
|
|
+ this.pageRoleNum = res.result.auth
|
|
|
|
+ if(res.result.auth >= 2){
|
|
return
|
|
return
|
|
}
|
|
}
|
|
var arr = []
|
|
var arr = []
|
|
@@ -619,8 +627,15 @@
|
|
// 获取部门指标排行数据
|
|
// 获取部门指标排行数据
|
|
deptZhibiaoPaihang(){
|
|
deptZhibiaoPaihang(){
|
|
deptZhibiaoPaihang(this.zbPhParams).then(res => {
|
|
deptZhibiaoPaihang(this.zbPhParams).then(res => {
|
|
- console.log(res)
|
|
|
|
- this.zbPhDataSource = res.result
|
|
|
|
|
|
+ if (res.success) {
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.zbPhDataSource = res.result
|
|
|
|
+ // this.$message.success(res.message)
|
|
|
|
+ // this.$emit('ok')
|
|
|
|
+ } else {
|
|
|
|
+ this.$message.warning(res.message)
|
|
|
|
+ }
|
|
|
|
+ }).finally(() => {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 部门指标排行搜索
|
|
// 部门指标排行搜索
|