This commit is contained in:
熊成强 2020-10-30 11:17:41 +08:00
parent 83244fe4dd
commit c67d0ed129
9 changed files with 279 additions and 77 deletions

View File

@ -62,3 +62,12 @@ export function apiSaveDetail (query) {
data: query data: query
}) })
} }
// 审批流程-
export function apiSaveapproval (query) {
return request({
url: '/lz_management/user/lzresultrecord/new/approval',
method: 'get',
params: query
})
}

View File

@ -4,6 +4,7 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="show" :visible.sync="show"
append-to-body
@close='close' @close='close'
width="800px" width="800px"
center> center>

View File

@ -3,6 +3,7 @@
<div> <div>
<el-dialog <el-dialog
:title="title" :title="title"
append-to-body
:visible.sync="show" :visible.sync="show"
@close='close' @close='close'
width="800px" width="800px"

View File

@ -45,20 +45,15 @@ service.interceptors.request.use(config => {
// 响应拦截器 // 响应拦截器
service.interceptors.response.use(res => { service.interceptors.response.use(res => {
console.log('res: ', res)
const id = setTimeout(() => { const id = setTimeout(() => {
Loading.service(options).close() Loading.service(options).close()
clearTimeout(id) clearTimeout(id)
}, 300) }, 300)
// 未设置状态码则默认成功状态 if (res.config.responseType === 'blob') {
const code = res.data.code || 200 return res
if (code !== 200) {
return Promise.reject(res.data)
} else {
if (res.config.responseType === 'blob') {
return res
}
return res.data
} }
return res.data
}, },
error => { error => {
const id = setTimeout(() => { const id = setTimeout(() => {

View File

@ -1,13 +1,15 @@
<!-- --> <!-- -->
<template> <template>
<div> <div>
<el-button size="mini" @click="handleJieguo" type="primary">结果值录入</el-button> <el-button size="mini" v-if="!info" @click="handleJieguo" type="primary">结果值录入</el-button>
<el-button size="mini" @click="handlePingfen" type="primary">开始评分</el-button> <el-button size="mini" v-if="!info" @click="handlePingfen" type="primary">开始评分</el-button>
<el-button size="mini" @click="handleZhiding" type="primary">制定目标</el-button> <el-button size="mini" v-if="!info" @click="handleZhiding" type="primary">制定目标</el-button>
<el-button size="mini" @click="handleTongyi" type="primary"> </el-button> <el-button size="mini" v-if="!info" @click="handleTongyi" type="primary"> </el-button>
<el-button size="mini" @click="handleBohui" 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" @click="handleZhuanjiao" type="primary"> </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" :value.sync='staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
<!-- 驳回 -->
<popup-right <popup-right
v-if="bohui" v-if="bohui"
@cancel='handleCancel' @cancel='handleCancel'
@ -19,19 +21,55 @@
slot="content" slot="content"
class="chooseManage" class="chooseManage"
> >
999 <el-form style="width:400px;" :model="form" :rules="rules" ref="form" label-width="80px" class="demo-ruleForm">
<el-form-item label="驳回理由" >
<el-input
:rows="5"
type="textarea"
v-model="ruleForm.comment"
placeholder="请输入驳回理由"
maxlength="9999"
show-word-limit></el-input>
</el-form-item>
</el-form>
</div> </div>
</popup-right> </popup-right>
<!-- 同意 -->
<el-dialog title="意见说明" :visible.sync="dialogFormVisible">
<el-form :model="form" ref="form">
<el-form-item label="" >
<el-input
:rows="5"
type="textarea"
v-model="form.comment"
placeholder="请输入意见说明"
maxlength="9999"
show-word-limit></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button size="small" @click="dialogFormVisible = false"> </el-button>
<el-button size="small" type="primary" @click="handleAgree"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import getPersonnel from '@/components/getPersonnel' import getPersonnel from '@/components/getPersonnel'
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import { apiSaveapproval } from '@/api/assessment'
export default { export default {
props: ['tableInfo'], props: ['tableInfo', 'formList', 'info'],
data () { data () {
return { return {
dialogFormVisible: false,
form: {},
rules: {
name: [
{ required: true, message: '请输入驳回理由', trigger: 'blur' }
]
},
bohui: false, bohui: false,
isShowPersonnel: false, isShowPersonnel: false,
staffIds: '', staffIds: '',
@ -46,7 +84,8 @@ export default {
}, },
computed: {}, computed: {},
beforeMount () {}, beforeMount () {},
mounted () {}, mounted () {
},
methods: { methods: {
// //
handleJieguo () { handleJieguo () {
@ -54,18 +93,44 @@ export default {
}, },
// //
handlePingfen () { handlePingfen () {
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {score: true}))
}, },
// //
handleTongyi () { 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
}
})
}, },
// //
handleBohui () { handleBohui () {
this.ruleForm = {}
this.bohui = true this.bohui = true
}, },
handleSubmit () { handleSubmit () {
this.bohui = false this.handlApiSaveapproval({status: 5, menuName: '驳回了'})
}, },
handleCancel () { handleCancel () {
this.bohui = false this.bohui = false
@ -73,6 +138,25 @@ export default {
cb (info) { cb (info) {
console.log(info) console.log(info)
}, },
//
handleJump (item) {
console.log('item: ', item)
this.$confirm('确认跳过该人员?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
// //
handleZhuanjiao () { handleZhuanjiao () {
this.isShowPersonnel = true this.isShowPersonnel = true

View File

@ -0,0 +1,147 @@
<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

@ -22,9 +22,14 @@
<!-- template不会被渲染 --> <!-- template不会被渲染 -->
<template v-for="(item,index) in obj.recortModelDtos" > <template v-for="(item,index) in obj.recortModelDtos" >
<!-- 左侧跨行区域 --> <!-- 左侧跨行区域 -->
<tr :key="index+1000"> <tr :key="index+1000">
<td :rowspan="item.detailDtos.length+1">{{item.name}}</td> <td :rowspan="item.detailDtos.length+1">
<td v-if="item.detailDtos.length===0"></td> <!-- <div v-for="(i,index) in item.name">
{{i}}
</div> -->
{{item.name}}
</td>
<td v-if="item.detailDtos.length===0"></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.score"></td> <td v-if="item.detailDtos.length===0 && tableInfo.score"></td>
@ -34,35 +39,35 @@
<!-- 右侧数据 --> <!-- 右侧数据 -->
<tr v-for="(child) in item.detailDtos" :key="child.target"> <tr v-for="(child) in item.detailDtos" :key="child.target">
<td> <td>
{{child.target || ''}} <span> {{child.target || ''}}</span>
</td> </td>
<td> <td>
{{child.keyResult || ''}} {{child.keyResult || ''}}
</td> </td>
<td v-if="tableInfo.result"> <td v-if="tableInfo.result">
<span>{{child.checkResult || '--'}}</span> <span>{{child.checkResult || '--'}}</span>
<el-input type="textarea" placeholder="请输入内容" v-model="child.checkResulted" clearable></el-input> <el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResulted" clearable></el-input>
</td> </td>
<td> <td>
{{(child.checkWeight)*100}}% {{(child.checkWeight)*100}}%
</td> </td>
<td v-if="tableInfo.score"> <td v-if="tableInfo.score">
<span>{{child.superScore || '--'}}</span> <!-- <span>{{child.superScore || '--'}}</span> -->
<el-input type="textarea" placeholder="请输入内容" v-model="child.superScoreed" clearable></el-input> <el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.superScoreed" clearable></el-input>
</td> </td>
<td style="padding:10px;" v-if="tableInfo.score"> <td style="padding:10px;" v-if="tableInfo.score">
<span>{{child.scoreComment || '--'}}</span> <!-- <span>{{child.scoreComment || '--'}}</span> -->
<el-input type="textarea" placeholder="请输入内容" v-model="child.scoreCommented" clearable></el-input> <el-input style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreCommented" clearable></el-input>
</td> </td>
</tr> </tr>
</template> </template>
</table> </table>
<div class="table-bottom"> <div v-if="tableInfo.result || tableInfo.score" class="table-bottom">
<div class="table-bottom-content"> <div class="table-bottom-content">
<el-button size='small' @click="handleSaveDetail()" 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" >提交</el-button>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>

View File

@ -9,7 +9,7 @@
departmentName:obj.departmentName departmentName:obj.departmentName
}" /> }" />
<div class="performance-content-title-right"> <div class="performance-content-title-right">
<UseButton :tableInfo.sync='tableInfo'/> <UseButton :formList='formList' :tableInfo.sync='tableInfo'/>
</div> </div>
</div> </div>
<div class="performance-content-center"> <div class="performance-content-center">
@ -125,15 +125,11 @@
<el-tag type="success">已确认</el-tag> --> <el-tag type="success">已确认</el-tag> -->
</div> </div>
<div> <div>
<el-button size="mini" @click="handleJump(i)" type="primary" plain>跳过</el-button> <UseButton :info='i' :formList='formList' :tableInfo.sync='tableInfo'/>
<el-button size="mini" @click="handleZhuanjiao(i)" type="primary" plain>转交</el-button>
</div> </div>
</div> </div>
</div> </div>
</popup-right> </popup-right>
<getPersonnel title='选择转交给' :len='1' @cb='cb' v-if="choosePerson"
:value.sync='Personnel.value'
:isShow.sync='choosePerson' :showDataList.sync='Personnel'/>
</div> </div>
</template> </template>
@ -142,17 +138,12 @@ import SmallNav from '@/components/kpi-layout/SmallNav'
import InfoHeader from '@/components/InfoHeader' import InfoHeader from '@/components/InfoHeader'
import PopupRight from '@/components/PopupRight' import PopupRight from '@/components/PopupRight'
import UseButton from './components/UseButton' import UseButton from './components/UseButton'
import getPersonnel from '@/components/getPersonnel'
import { apiResultRecordDetail, apiResultGetDetail } from '@/api/assessment' import { apiResultRecordDetail, apiResultGetDetail } from '@/api/assessment'
import tables from './components/table' import tables from './components/table'
export default { export default {
data () { data () {
return { return {
Personnel: {
list: []
},
choosePerson: false,
right: { right: {
showRight: false showRight: false
}, },
@ -175,8 +166,7 @@ export default {
InfoHeader, InfoHeader,
PopupRight, PopupRight,
tables, tables,
UseButton, UseButton
getPersonnel
}, },
computed: {}, computed: {},
beforeMount () { }, beforeMount () { },
@ -185,33 +175,7 @@ export default {
this.handleGetTbale() this.handleGetTbale()
}, },
methods: { methods: {
cb (info) { async handleGetTbale (id = this.$route.query.id) {
console.log('info: ', info)
},
//
handleZhuanjiao (item) {
this.choosePerson = true
},
//
handleJump (item) {
console.log('item: ', item)
this.$confirm('确认跳过该人员?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
async handleGetTbale (id = 267) {
let res = await apiResultGetDetail({ id }) let res = await apiResultGetDetail({ id })
this.obj = res.data this.obj = res.data
console.log('res: ', res) console.log('res: ', res)
@ -229,7 +193,7 @@ export default {
}, },
async handleList () { async handleList () {
// resultRecordId = == this.$route.query.id // resultRecordId = == this.$route.query.id
let res = await apiResultRecordDetail({ resultRecordId: 267 }) let res = await apiResultRecordDetail({ resultRecordId: this.$route.query.id })
if (res.code !== 200) return if (res.code !== 200) return
for (let i in res.data.flowRecordList) { for (let i in res.data.flowRecordList) {
if (res.data.flowRecordList[i].status !== 1) { if (res.data.flowRecordList[i].status !== 1) {
@ -239,10 +203,6 @@ export default {
} }
this.formList = res.data this.formList = res.data
console.log('res: ', res) console.log('res: ', res)
},
handleChangeTtitle () {
// this.$route
console.log('this.$route: ', this.$route.meta.title = '123')
} }
}, },
watch: {} watch: {}

View File

@ -186,7 +186,7 @@ export default {
// this.handleKaoping() // this.handleKaoping()
this.$router.push({ this.$router.push({
name: 'assessment-performance', name: 'assessment-performance',
query: {id} query: {id: 267}
}) })
console.log('id: ', id) console.log('id: ', id)
}, },