This commit is contained in:
熊成强 2020-10-30 17:28:46 +08:00
parent 59eb1f8702
commit 0251dcc86d
11 changed files with 317 additions and 278 deletions

View File

@ -71,3 +71,12 @@ export function apiSaveapproval (query) {
params: query
})
}
// 获取3.75分等级列表 -
export function apiGet375 (query) {
return request({
url: '/lz_management/resultGrade/get375',
method: 'get',
params: query
})
}

View File

@ -168,11 +168,14 @@ export default {
async handleSaveDetail (params = this.obj) {
let res = await apiSaveDetail(params)
if (res.code !== 200) {
this.$message.error = res.msg
this.$message.error(res.msg)
return
}
this.$message({
message: res.msg,
type: 'success'
})
this.handleGetTbale()
console.log('res: ', res)
},
//
async handleGetDimensions () {

View File

@ -6,9 +6,9 @@
<el-button size="mini" v-if="!info" @click="handleZhiding" type="primary">制定目标</el-button>
<el-button size="mini" v-if="!info" @click="handleTongyi" type="primary"> </el-button>
<el-button size="mini" v-if="!info" @click="handleBohui" type="primary"> </el-button>
<el-button size="mini" v-else @click="handleJump(i)" type="primary" plain>跳过</el-button>
<el-button size="mini" v-else @click="handleJump" type="primary" plain>跳过</el-button>
<el-button size="mini" @click="handleZhuanjiao" type="primary"> </el-button>
<getPersonnel @cb='cb' v-if="isShowPersonnel" :value.sync='staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
<getPersonnel @cb='cb' v-if="isShowPersonnel" :isShow.sync='isShowPersonnel' :len='1'/>
<!-- 驳回 -->
<popup-right
v-if="bohui"
@ -99,61 +99,42 @@ export default {
handleTongyi () {
this.dialogFormVisible = true
},
handleAgree () {
this.handlApiSaveapproval({status: 1, menuName: '同意了'})
},
//
handlApiSaveapproval ({status, menuName}) {
this.$refs.form.validate(async v => {
if (v) {
const params = Object.assign({}, this.form, {
resultRecordId: this.$route.query.id || '',
status: status,
menuName: menuName
})
let res = await apiSaveapproval(params)
if (res.code !== 200) {
this.$message.error(res.msg)
}
this.form = {}
this.$message({
message: res.msg,
type: 'success'
})
this.bohui = false
}
})
async handleAgree () {
let res = await this.handlApiSaveapproval({status: 1, menuName: '同意了'})
this.dialogFormVisible = !!res
},
//
handleBohui () {
this.ruleForm = {}
this.bohui = true
},
handleSubmit () {
this.handlApiSaveapproval({status: 5, menuName: '驳回了'})
},
handleCancel () {
this.bohui = false
},
cb (info) {
console.log(info)
},
//
handleJump (item) {
console.log('item: ', item)
handleJump () {
if (!this.info) return
console.log('item: ', this.info)
this.$confirm('确认跳过该人员?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
}).then(async () => {
const obj = {status: 4, menuName: '跳过了'}
if (this.info) obj.flowRecordId = this.info.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj)
let res = await apiSaveapproval(params)
if (res.code !== 200) {
this.$message.error(res.msg)
return
}
this.form = {}
this.$message({
type: 'success',
message: '删除成功!'
message: res.msg,
type: 'success'
})
history.go(0)
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
message: '取消跳过'
})
})
},
@ -169,6 +150,51 @@ export default {
id: 267 || this.$route.query.id
}
})
},
async handleSubmit () {
let res = await this.handlApiSaveapproval({status: 5, menuName: '驳回了'})
console.log('!!res: ', !!res)
this.bohui = !!res
},
handleCancel () {
this.bohui = false
},
async cb (info) {
const obj = {status: 8, menuName: '转交了', transferStaffId: info.value}
if (this.info) obj.flowRecordId = this.info.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj)
let res = await apiSaveapproval(params)
if (res.code !== 200) {
this.$message.error(res.msg)
return
}
this.form = {}
this.$message({
message: res.msg,
type: 'success'
})
history.go(0)
},
//
handlApiSaveapproval (obj = {}) {
return new Promise((resolve, reject) => {
this.$refs.form.validate(async v => {
if (v) {
const params = Object.assign({}, this.form, {resultRecordId: this.$route.query.id || ''}, obj)
let res = await apiSaveapproval(params)
if (res.code !== 200) {
this.$message.error(res.msg)
resolve(1)
}
this.form = {}
this.$message({
message: res.msg,
type: 'success'
})
resolve(0)
}
})
})
}
},
watch: {}

View File

@ -1,147 +0,0 @@
<template>
<div class='table'>
<table
cellspacing="0"
border="1">
<!-- 顶部title -->
<tr>
<th>维度</th>
<th>名称</th>
<th>考核标准</th>
<th v-if="tableInfo.result">结果值</th>
<th>权重({{obj.weight*100}}%)</th>
<th v-if="tableInfo.score">上级评分</th>
<th v-if="tableInfo.score">评分说明</th>
</tr>
<!-- 暂无数据时显示 -->
<tr v-if="obj.recortModelDtos.length === 0">
<td :colspan="6">
暂无数据
</td>
</tr>
<!-- template不会被渲染 -->
<template v-for="(item,index) in obj.recortModelDtos" >
<!-- 左侧跨行区域 -->
<tr :key="index+1000">
<td :rowspan="item.detailDtos.length+1">
<div v-for="(i,index) in item.name">
{{i}}
</div>
</td>
<td v-if="item.detailDtos.length===0"></td>
<td v-if="item.detailDtos.length===0"></td>
<td v-if="item.detailDtos.length===0 && tableInfo.score"></td>
<td v-if="item.detailDtos.length===0 && tableInfo.score"></td>
<td v-if="item.detailDtos.length===0 && tableInfo.result"></td>
<td v-if="item.detailDtos.length===0"></td>
</tr>
<!-- 右侧数据 -->
<tr v-for="(child) in item.detailDtos" :key="child.target">
<td>
{{child.target || ''}}
</td>
<td>
{{child.keyResult || ''}}
</td>
<td v-if="tableInfo.result">
<span>{{child.checkResult || '--'}}</span>
<el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResulted" clearable></el-input>
</td>
<td>
{{(child.checkWeight)*100}}%
</td>
<td v-if="tableInfo.score">
<!-- <span>{{child.superScore || '--'}}</span> -->
<el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.superScoreed" clearable></el-input>
</td>
<td style="padding:10px;" v-if="tableInfo.score">
<!-- <span>{{child.scoreComment || '--'}}</span> -->
<el-input style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreCommented" clearable></el-input>
</td>
</tr>
</template>
</table>
<div v-if="tableInfo.result || tableInfo.score" class="table-bottom">
<div class="table-bottom-content">
<el-button size='small' @click="handleSaveDetail()" plain>暂存</el-button>
<el-button size='small' type="primary" >提交</el-button>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'columnsTbale',
props: {
obj: {
type: Object,
default: () => {
return {
recortModelDtos: []
}
}
},
tableInfo: {
type: Object,
default: () => {
return {
result: false,
score: false
}
}
}
},
data () {
return {
input: ''
}
},
mounted () {
console.log('list', this.obj)
},
methods: {
handleSaveDetail () {
}
}
}
</script>
<style lang='less' scoped>
.table{
position: relative;
}
.table-bottom {
position: fixed;
height: 60px;
padding: 0 80px;
width: 100%;
background: #fff;
border-top: 1px solid @borderColor;
bottom: 0;
left: 0;
&-content{
width: 1360px;
margin: 0 auto;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
}
table{
margin-top: 15px;
width: 100%;
border:1px solid #e9eaec;
border-collapse:collapse
}
th{
background-color: #f8f8f9;
}
th,td{
padding: 5px;
border: 1px solid #e9eaec;
text-align: center;
vertical-align: top;
line-height: 30px;
}
</style>

View File

@ -5,7 +5,7 @@
border="1">
<!-- 顶部title -->
<tr>
<th>维度</th>
<th style="width: 90px;">维度</th>
<th>名称</th>
<th>考核标准</th>
<th v-if="tableInfo.result">结果值</th>
@ -22,7 +22,7 @@
<!-- template不会被渲染 -->
<template v-for="(item,index) in obj.recortModelDtos" >
<!-- 左侧跨行区域 -->
<tr :key="index+1000">
<tr :key="index+'-only'">
<td :rowspan="item.detailDtos.length+1">
<!-- <div v-for="(i,index) in item.name">
{{i}}
@ -37,7 +37,7 @@
<td v-if="item.detailDtos.length===0"></td>
</tr>
<!-- 右侧数据 -->
<tr v-for="(child) in item.detailDtos" :key="child.target">
<tr v-for="(child) in item.detailDtos" :key="child.id">
<td>
<span> {{child.target || ''}}</span>
</td>
@ -45,32 +45,50 @@
{{child.keyResult || ''}}
</td>
<td v-if="tableInfo.result">
<span>{{child.checkResult || '--'}}</span>
<el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResulted" clearable></el-input>
<!-- <span>{{child.checkResult || '--'}}</span> -->
<el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResult" clearable></el-input>
</td>
<td>
{{(child.checkWeight)*100}}%
</td>
<td v-if="tableInfo.score">
<!-- <span>{{child.superScore || '--'}}</span> -->
<el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.superScoreed" clearable></el-input>
<!-- gradeGroupId=== 1 下拉 -->
<el-select style="width:100px;" size="mini" v-model="child.scoreDtos[child.scoreDtos.length-1].acquireScore">
<el-option
v-for="item in scoreList"
:key="item.id"
:label="item.name"
:value="item.score">
</el-option>
</el-select>
<!-- <span>{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || 0}}</span> -->
<!-- <el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.superScore" clearable></el-input> -->
</td>
<td style="padding:10px;" v-if="tableInfo.score">
<!-- <span>{{child.scoreComment || '--'}}</span> -->
<el-input style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreCommented" clearable></el-input>
<el-input style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input>
</td>
</tr>
</template>
</table>
<div v-if="tableInfo.result || tableInfo.score" class="table-bottom">
<div class="table-bottom-content">
<el-button size='small' @click="handleCancelResult" plain>取消</el-button>
<el-button size='small' @click="handleSaveDetail()" plain>暂存</el-button>
<el-button size='small' type="primary" >提交</el-button>
<el-button size='small' type="primary" >{{tableInfo.result?'提交结果值':'提交评分'}}</el-button>
</div>
</div>
<!-- <div v-else class="table-bottoms">
<div class="table-bottoms-contenct">
<div class="table-bottoms-contenct-left"><i class="el-icon-arrow-left"></i>朱吉达</div>
<div class="table-bottoms-contenct-center commonFont">参与考核7/8</div>
<div class="table-bottoms-contenct-right">熊成强<i class="el-icon-arrow-right"></i></div>
</div>
</div> -->
</div>
</template>
<script>
import { apiSaveDetail, apiGet375 } from '@/api/assessment'
export default {
name: 'columnsTbale',
props: {
@ -94,15 +112,33 @@ export default {
},
data () {
return {
input: ''
input: '',
scoreList: []
}
},
mounted () {
console.log('list', this.obj)
this.handleGrt375()
},
methods: {
handleSaveDetail () {
handleCancelResult () {
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {result: false, score: false}))
},
async handleGrt375 () {
let res = await apiGet375()
if (res.code !== 200) return
this.scoreList = res.data
console.log('resssss: ', res)
},
async handleSaveDetail (params = this.obj) {
let res = await apiSaveDetail(params)
if (res.code !== 200) {
this.$message.error(res.msg)
}
this.$message({
message: res.msg,
type: 'success'
})
}
}
}
@ -110,10 +146,57 @@ export default {
<style lang='less' scoped>
.table{
position: relative;
&-bottoms{
width: 100%;
height: 60px;
z-index: 1000000;
bottom: 0;
left: 0;
background:transparent;
position: fixed;
display: flex;
// align-items: center;
justify-content: center;
&-contenct{
height: 40px;
display: flex;
background: #fff;
justify-content: space-between;
border-radius: 40px;
box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 1px 6px 0 rgba(0, 0, 0, 0.12);
&-left{
line-height: 40px;
font-size: 14px;
padding: 0 16px;
i{
margin:0 6px;
font-weight: 800;
}
cursor: pointer;
color: @fontBlue;
}
&-center{
.center();
font-size: 14px;
padding: 0 10px;
}
&-right{
line-height: 40px;
font-size: 14px;
padding: 0 16px;
i{
margin:0 6px;
font-weight: 800;
}
cursor: pointer;
color: @fontBlue;
}
}
}
}
.table-bottom {
position: fixed;
height: 60px;
position: fixed;
padding: 0 80px;
width: 100%;
background: #fff;
@ -145,4 +228,7 @@ export default {
vertical-align: top;
line-height: 30px;
}
td{
}
</style>

View File

@ -31,8 +31,9 @@
placement="top"
>
<div>
{{index+1}}.{{i.flowName}} <span v-if="index !== (formList.flowRecordList.length-1)">:{{i.staffName}} <i
v-if="i.status ===1 && !i.isActive"
{{index+1}}.{{i.flowName}} <span v-if="index !== (formList.flowRecordList.length-1)">:{{i.staffName}}
<i
v-if="i.isGou && !i.isActive"
style="color:#3ba1ff;margin:0 0 0 4px;font-weight:800;"
class="el-icon-check"
></i></span>
@ -63,7 +64,6 @@
></i>
</div>
</el-tooltip>
</div>
</div>
<div class="performance-content-bottom">
@ -196,13 +196,13 @@ export default {
let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id })
if (res.code !== 200) return
for (let i in res.data.flowRecordList) {
if (res.data.flowRecordList[i].status !== 1) {
res.data.flowRecordList[i - 1].isActive = true
res.data.flowRecordList[i === '0' ? i : (i - 1)].isGou = true
if (res.data.flowRecordList[i].status === 0) {
res.data.flowRecordList[i === '0' ? i : (i - 1)].isActive = true
break
}
}
this.formList = res.data
console.log('res: ', res)
}
},
watch: {}
@ -227,7 +227,7 @@ export default {
}
&-content {
padding: 28px;
margin: 10px 0;
margin: 10px 0 50px;
// height: 700px;
// overflow: auto;

View File

@ -283,11 +283,19 @@ export default {
}))
if (res.code !== 200) return
this.titleList = res.data
this.titleList[0].active = true
this.params.flowProcess = this.titleList[0].flowProcess
if (this.$route.query.step) {
this.titleList = this.titleList.map(i => {
if (String(i.flowProcess) === String(this.$route.query.step)) {
i.active = true
}
return i
})
this.params.flowProcess = this.$route.query.step
} else {
this.titleList[0].active = true
this.params.flowProcess = this.titleList[0].flowProcess
}
this.handleGetListContent()
console.log('this.params: ', this.params)
console.log('res: ', res)
}
},
watch: {

View File

@ -10,34 +10,12 @@
</el-cascader>
<div class="report_content">
<div class="header">
<div>
<div>{{statisticals[0].num}}</div>
<div>{{statisticals[0].desc}}</div>
</div>
<span></span>
<div>
<div>{{statisticals[1].num}}</div>
<div>{{statisticals[1].desc}}</div>
</div>
<div>
<div>{{statisticals[2].num}}</div>
<div>{{statisticals[2].desc}}</div>
</div>
<div>
<div>{{statisticals[3].num}}</div>
<div>{{statisticals[3].desc}}</div>
</div>
<div>
<div>{{statisticals[4].num}}</div>
<div>{{statisticals[4].desc}}</div>
</div>
<div>
<div>{{statisticals[5].num}}</div>
<div>{{statisticals[5].desc}}</div>
</div>
<div>
<div>{{statisticals[6].num}}</div>
<div>{{statisticals[6].desc}}</div>
<div v-for="(i,index) in statisticals" :key="i.id" @click="handleJump(i)">
<div>
<div>{{i.num}}</div>
<div>{{i.desc}}</div>
</div>
<span v-if="index===0"></span>
</div>
</div>
<div>
@ -240,6 +218,9 @@ export default {
this.handleChartDataReq()
},
methods: {
handleJump (item) {
this.$router.push({name: 'assessment-stepList', query: {id: 10, step: item.flowProcess}})
},
//
handleliColor (val) {
let color
@ -382,22 +363,30 @@ export default {
background: #fcfcfc;
display: flex;
align-items: center;
justify-content: space-between;
padding:0 20px;
}
.header > div {
.header > div{
display: flex;
cursor: pointer;
align-items: center;
flex: 1;
}
.header > div>div {
flex-grow: 1;
text-align: center;
padding:20px
}
.header > div > div:nth-child(1) {
.header > div >div> div:nth-child(1) {
color: black;
font-weight: bold;
font-size: 20px;
}
.header > div > div:nth-child(2) {
.header > div>div > div:nth-child(2) {
color: #3a3a3a;
font-size: 14px;
}
.header > span {
.header span {
display: inline-block;
background: #333333;
height: 30px;

View File

@ -2,12 +2,13 @@
<template>
<div class="home boderAndRadius" >
<div class='home-left'>
<div class="home-left-todo">
<div class="home-left-todo " :class="{borderBottom:selectedTableList.length===0}">
<div class="home-left-todo-top">
<div class="commonFont">待办事项<span style="margin:0 4px" class="blueColor">0</span></div>
<div class="commonFont">待办事项<span style="margin:0 4px" class="blueColor">{{pageProcessedInfo.totalCount || 0}}</span></div>
<div class="blueColor noSelect commonFont" style="cursor: pointer;" @click="handleGetMoreToDo('workbench-todo')">查看更多<i class="el-icon-arrow-right"></i></div>
</div>
<div class="home-left-todo-center">
<tableItem v-if="selectedTableList.length!==0" :selectedTableList='selectedTableList' />
<!-- <div style="height:300px">
sassa
</div> -->
@ -31,19 +32,42 @@
<script>
import report from './report'
import tableItem from '../todo/tableItem'
import { apiGetWaitList } from '@/api/toDo'
export default {
data () {
return {
pageProcessedInfo: {
currPage: 1,
pageSize: 3,
status: 0,
totalCount: 1,
totalPage: 1
},
selectedTableList: []
}
},
components: {
report
report,
tableItem
},
computed: {},
beforeMount () {},
mounted () {},
mounted () {
this.handleGetList()
},
methods: {
handleGetList () {
apiGetWaitList(this.pageProcessedInfo).then(res => {
console.log('res: ', res)
if (res.code === 200) {
this.pageProcessedInfo.currPage = res.data.currPage
this.pageProcessedInfo.totalCount = res.data.totalCount
this.pageProcessedInfo.totalPage = res.data.totalPage
this.selectedTableList = res.data.list
}
})
},
handleGetMoreToDo (name) {
const params = {
name
@ -69,9 +93,11 @@ export default {
align-items: flex-start;
&-left{
width: 828px;
.borderBottom{
border-bottom: 1px solid @borderColor;
}
&-todo{
width: 100%;
border-bottom: 1px solid @borderColor;
padding-top: 18px;
&-top{
@ -80,6 +106,7 @@ export default {
}
&-center{
padding: 10px 0;
box-sizing: content-box;
max-height: 200px;
overflow: auto;
}

View File

@ -15,31 +15,7 @@
</div>
<div class="todo-content-right">
<div v-if="selectedTableList.length > 0">
<el-table
:data="selectedTableList"
@row-click="handleRowClick"
:show-header="false"
style="border-top: 1px solid #ebebeb;"
max-height="500"
>
<el-table-column width="100">
<template slot-scope="scope">
<img
:src="scope.row.avatar"
class="todo-content-right-avatar"
/>
</template>
</el-table-column>
<el-table-column prop="title"></el-table-column>
<el-table-column
width="200"
align="right"
>
<template slot-scope="scope">
{{scope.row.time}}<i class="el-icon-arrow-right"></i>
</template>
</el-table-column>
</el-table>
<tableItem :selectedTableList='selectedTableList'/>
<el-pagination
:hide-on-single-page="true"
:current-page.sync="pageSelectedInfo.currPage"
@ -64,6 +40,7 @@
<script>
import SmallNav from '@/components/kpi-layout/SmallNav'
import tableItem from './tableItem'
import { apiGetWaitList } from '@/api/toDo'
export default {
data () {
@ -95,7 +72,8 @@ export default {
}
},
components: {
SmallNav
SmallNav,
tableItem
},
computed: {},
beforeMount () { },

View File

@ -0,0 +1,60 @@
<!-- -->
<template>
<div>
<el-table
:data="selectedTableList"
@row-click="handleRowClick"
:show-header="false"
style="border-top: 1px solid #ebebeb;"
max-height="500"
>
<el-table-column width="100">
<template slot-scope="scope">
<img
:src="scope.row.avatar"
class="todo-content-right-avatar"
/>
</template>
</el-table-column>
<el-table-column prop="title"></el-table-column>
<el-table-column
width="200"
align="right"
>
<template slot-scope="scope">
{{scope.row.time}}<i class="el-icon-arrow-right"></i>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
props: ['selectedTableList'],
data () {
return {
}
},
computed: {},
beforeMount () {},
mounted () {},
methods: {
handleRowClick (row) {
this.$router.push({ name: 'assessment-performance', query: { id: row.recordId } })
}
},
watch: {}
}
</script>
<style lang='less' scoped>
.todo-content-right-avatar{
width: 34px;
height: 34px;
border-radius: 17px;
}
</style>