This commit is contained in:
杜建超 2020-09-27 09:49:23 +08:00
parent 0942452303
commit f1827fab68
8 changed files with 165 additions and 31 deletions

View File

@ -1,11 +1,20 @@
import http from '../utils/http'
// 业绩看板
export const apiReportChart = data => {
export const apiResultChart = data => {
return http({ url: '/lz_management/result/chart', method: 'get', params: data })
}
// 业绩列表
export const apiReportList = data => {
export const apiResultReport = data => {
return http({ url: '/lz_management/result/report', method: 'post', params: data })
}
// 业绩列分布
export const apiResultDistribution = data => {
return http({ url: '/lz_management/result/distribution', method: 'post', params: data })
}
export const apiDepartmentSelfList = data => {
return http({ url: '/lz_management/result/departmentTreeByStaffId', method: 'post', data })
}

View File

@ -33,7 +33,7 @@ const dingtalkRoutes=[
{ path: '/devicemark', component: _import('modules/device/device-mark'), name: 'devicemark', meta: { title: '设备备注' } },
{ path: '/devicestaff', component: _import('modules/device/device-staff-device'), name: 'devicestaff', meta: { title: '人员资产信息' } },
{ path: '/devicestaffdepat', component: _import('modules/device/device-staff-depat'), name: 'devicestaffdepat', meta: { title: '搜索人员' } },
{ path: '/devicedetail', component: _import('modules/device/device-detail'), name: 'devicedetail', meta: { title: '资产盘点设备详情页' } }
]
@ -43,6 +43,18 @@ const configRoutes = [
component: _import('modules/result/record/recorddetail'),
name: 'recorddetail',
meta: {title: '绩效详情', isDynamic: true, isTab: true}
},
{
path: '/resultDistribution',
component: _import('modules/result/distribution/index'),
name: 'resultDistribution',
meta: {title: '绩效结果分布', isDynamic: true, isTab: true}
},
{
path: '/resultReport',
component: _import('modules/result/report/index'),
name: 'resultReport',
meta: {title: '绩效列表', isDynamic: true, isTab: true}
}
]
@ -59,8 +71,8 @@ const mainRoutes = {
// 2. iframeUrl: 是否通过iframe嵌套展示内容, '以http[s]://开头': 是, '': 否
// 提示: 如需要通过iframe嵌套展示内容, 但不通过tab打开, 请自行创建组件使用iframe处理!
{ path: '/home', component: _import('common/home'), name: 'home', meta: { title: '首页' } },
{ path: '/theme', component: _import('common/theme'), name: 'theme', meta: { title: '主题' } }
],
beforeEnter (to, from, next) {
@ -86,7 +98,7 @@ function fnCheckToken() {
let token = Vue.cookie.get('token')
if (!token || !/\S/.test(token)) {
return false;
}
}
return true
}
@ -113,11 +125,11 @@ router.beforeEach((to, from, next) => {
}
//next()
/*console.log(to)
let newpage = router.resolve({
let newpage = router.resolve({
name: to.path,
query:to.query
})
console.log(newpage.href)
window.open(newpage.href, '_blank')*/
//next()

View File

@ -39,7 +39,10 @@
methods: {
jump: function (e) {
if (this.clickAble) {
console.log('跳转')
//
this.$router.push({name: 'resultDistribution'}, () => {
this.mainTabsActiveName = this.$route.name
})
} else {
this.clickAble = true
}
@ -105,7 +108,10 @@
this.chartBar.setOption(option)
this.chartBar.on('click', function (param) {
this.clickAble = false
console.log(param)
//
this.$router.push({name: 'resultDistribution'}, () => {
this.mainTabsActiveName = this.$route.name
})
}.bind(this))
window.addEventListener('resize', () => {
this.chartBar.resize()

View File

@ -7,6 +7,7 @@
:data="dataInfo"
:extend="color.length>0?Object.assign({},chartExtend,{color}):chartExtend"
:settings="chartSettings"
:events="chartEvents"
></ve-ring>
</div>
</div>
@ -64,6 +65,15 @@
},
labelLine: {
}
},
chartEvents: {
click: (e) => { // resultDistribution
this.$router.push({name: 'resultReport'}, () => {
this.mainTabsActiveName = this.$route.name
})
console.log('---------' + e.name)
console.log(e)
}
}
}
},

View File

@ -46,7 +46,7 @@
</template>
<script>
import { apiOrganizationList } from '@/api/api_staff'
import { apiDepartmentSelfList } from '@/api/api_report'
export default {
props: {
monthTime: {
@ -85,8 +85,8 @@
},
//
async handleGetMenuList () {
let result = await apiOrganizationList()
this.menuList = result
let result = await apiDepartmentSelfList()
this.menuList = result.data
},
//
changeApplyMonth (val) {

View File

@ -26,7 +26,7 @@ import chartForm from './componments/chart-form'
import queryForm from './componments/query-form'
import chartBarForm from './componments/chart-bar-form'
import { apiReportChart } from '@/api/api_report'
import { apiResultChart } from '@/api/api_report'
export default {
components: {
chartForm,
@ -50,7 +50,7 @@ export default {
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
let result = await apiReportChart(data)
let result = await apiResultChart(data)
setTimeout(() => {
loading.close()
}, 500)

View File

@ -5,10 +5,11 @@
<el-form :inline="true" :model="formInline" class="demo-form-inline staff-archives-form">
<el-form-item label="选择部门">
<el-input
placeholder="选择部门"
placeholder="选择部门"
@focus="isChoose=true"
readonly
:value="formInline.departmentName"
style="width: 120px"
></el-input>
</el-form-item>
@ -19,10 +20,45 @@
v-model="selectMonthTime"
value-format="yyyy-MM"
@change="changeApplyMonth"
style="width: 120px"
>
</el-date-picker>
</el-form-item>
<el-form-item :label="`审批进度`">
<el-select v-model="status" placeholder="请选择" style="width: 120px" >
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="`等级`">
<el-select v-model="level" placeholder="请选择" clearable style="width: 120px">
<el-option
v-for="item in levelList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="员工姓名">
<el-input
v-model="staffName"
placeholder="姓名"
clearable
style="width: 120px"
></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
<el-button type="primary" @click="restValue">重置</el-button>
@ -56,6 +92,9 @@
data: function () {
return {
selectMonthTime: this.nowDate(),
staffName: '',
level: '',
status: '',
isChooseObj: {},
isChoose: false,
menuList: [],
@ -65,7 +104,44 @@
},
formInline: {
value: []
}
},
statusList: [
{'value': 0,
'label': '未提交'
},
{'value': 1,
'label': '审批中'
},
{'value': 4,
'label': '已完成'
}
],
levelList: [
{'value': 3.25,
'label': 3.25
},
{'value': 3.5 + '-',
'label': 3.5 + '-'
},
{'value': 3.5,
'label': 3.5
},
{'value': 3.5 + '+',
'label': 3.5 + '+'
},
{'value': 3.75 + '-',
'label': 3.5 + '-'
},
{'value': 3.75,
'label': 3.75
},
{'value': 3.75 + '+',
'label': 3.75 + '+'
},
{'value': 4,
'label': 4
}
]
}
},
computed: {},
@ -76,7 +152,6 @@
},
mounted () {},
beforeUpdate () {
// this.selectMonthTime = this.monthTime
},
methods: {
async handleChangeData () {
@ -95,13 +170,19 @@
onSubmit () {
let obj = {
departmentId: this.formInline.departmentId,
selectMonthTime: this.selectMonthTime
selectMonthTime: this.selectMonthTime,
staffName: this.staffName,
level: this.level,
status: this.status
}
this.$emit('submit', obj)
},
restValue () {
this.formInline = {}
this.selectMonthTime = ''
this.staffName = ''
this.status = ''
this.level = ''
},
onsumbit () {
this.formInline = Object.assign({}, this.formInline, this.isChooseObj)

View File

@ -1,9 +1,8 @@
<template>
<div class="mod-log">
<div class="mod-config">
<el-card class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="handleGetTableList()">
<el-card>
<query-form @submit="submit"/>
</el-card>
</el-form>
<el-table
:data="dataList"
@ -14,7 +13,7 @@
prop="staffName"
header-align="center"
align="center"
width="100"
width="120"
label="姓名">
</el-table-column>
@ -22,7 +21,7 @@
prop="status"
header-align="center"
align="center"
width="100"
width="120"
label="当前进度">
<template slot-scope="scope">
<el-tag v-if="scope.row.status === 0" size="small" type="danger">未提交</el-tag>
@ -52,7 +51,7 @@
prop="version"
header-align="center"
align="center"
width="100"
width="200"
:show-overflow-tooltip="true"
label="业务得分70%">
</el-table-column>
@ -61,20 +60,20 @@
prop="deployTime"
header-align="center"
align="center"
width="100"
width="200"
label="价值观得分30%">
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="100"
width="120"
label="总分">
</el-table-column>
<el-table-column
header-align="center"
align="center"
width="100"
width="120"
label="等级">
</el-table-column>
@ -88,11 +87,12 @@
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</el-card>
</div>
</template>
<script>
import { apiReportList } from '@/api/api_report'
import { apiResultReport } from '@/api/api_report'
import queryForm from './componments/query-form'
export default {
data () {
@ -109,6 +109,8 @@
selectionDataList: [],
departmentId: '',
selectMonthTime: '',
staffName: '',
level: '',
status: 0,
type: 1
}
@ -121,13 +123,21 @@
},
methods: {
//
handleGetTableList () {
apiReportList({
async handleGetTableList () {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
apiResultReport({
'currPage': this.pageIndex,
'pageSize': this.pageSize,
'departmentId': this.departmentId,
'selectMonthTime': this.selectMonthTime,
'status': this.status,
'staffName': this.staffName,
'level': this.level,
'type': this.type
}).then(res => {
if (res && res.code === 0) {
@ -137,6 +147,9 @@
this.dataList = []
this.totalPage = 0
}
setTimeout(() => {
loading.close()
}, 500)
this.dataListLoading = false
})
},
@ -154,6 +167,9 @@
submit (data) {
this.departmentId = data.departmentId
this.selectMonthTime = data.selectMonthTime
this.staffName = data.staffName
this.level = data.level
this.status = data.status
this.handleGetTableList()
}
}