优化
This commit is contained in:
parent
83244fe4dd
commit
c67d0ed129
@ -62,3 +62,12 @@ export function apiSaveDetail (query) {
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
||||
// 审批流程-
|
||||
export function apiSaveapproval (query) {
|
||||
return request({
|
||||
url: '/lz_management/user/lzresultrecord/new/approval',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
append-to-body
|
||||
@close='close'
|
||||
width="800px"
|
||||
center>
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<div>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
append-to-body
|
||||
:visible.sync="show"
|
||||
@close='close'
|
||||
width="800px"
|
||||
|
||||
@ -45,20 +45,15 @@ service.interceptors.request.use(config => {
|
||||
|
||||
// 响应拦截器
|
||||
service.interceptors.response.use(res => {
|
||||
console.log('res: ', res)
|
||||
const id = setTimeout(() => {
|
||||
Loading.service(options).close()
|
||||
clearTimeout(id)
|
||||
}, 300)
|
||||
// 未设置状态码则默认成功状态
|
||||
const code = res.data.code || 200
|
||||
if (code !== 200) {
|
||||
return Promise.reject(res.data)
|
||||
} else {
|
||||
if (res.config.responseType === 'blob') {
|
||||
return res
|
||||
}
|
||||
return res.data
|
||||
if (res.config.responseType === 'blob') {
|
||||
return res
|
||||
}
|
||||
return res.data
|
||||
},
|
||||
error => {
|
||||
const id = setTimeout(() => {
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
<!-- -->
|
||||
<template>
|
||||
<div>
|
||||
<el-button size="mini" @click="handleJieguo" type="primary">结果值录入</el-button>
|
||||
<el-button size="mini" @click="handlePingfen" type="primary">开始评分</el-button>
|
||||
<el-button size="mini" @click="handleZhiding" type="primary">制定目标</el-button>
|
||||
<el-button size="mini" @click="handleTongyi" type="primary">同 意</el-button>
|
||||
<el-button size="mini" @click="handleBohui" type="primary">驳 回</el-button>
|
||||
<el-button size="mini" v-if="!info" @click="handleJieguo" type="primary">结果值录入</el-button>
|
||||
<el-button size="mini" v-if="!info" @click="handlePingfen" type="primary">开始评分</el-button>
|
||||
<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" @click="handleZhuanjiao" type="primary">转 交</el-button>
|
||||
<getPersonnel @cb='cb' v-if="isShowPersonnel" :value.sync='staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
|
||||
<!-- 驳回 -->
|
||||
<popup-right
|
||||
v-if="bohui"
|
||||
@cancel='handleCancel'
|
||||
@ -19,19 +21,55 @@
|
||||
slot="content"
|
||||
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>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import getPersonnel from '@/components/getPersonnel'
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
import { apiSaveapproval } from '@/api/assessment'
|
||||
export default {
|
||||
props: ['tableInfo'],
|
||||
props: ['tableInfo', 'formList', 'info'],
|
||||
data () {
|
||||
return {
|
||||
dialogFormVisible: false,
|
||||
form: {},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入驳回理由', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
bohui: false,
|
||||
isShowPersonnel: false,
|
||||
staffIds: '',
|
||||
@ -46,7 +84,8 @@ export default {
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () {},
|
||||
mounted () {},
|
||||
mounted () {
|
||||
},
|
||||
methods: {
|
||||
// 结果值录入
|
||||
handleJieguo () {
|
||||
@ -54,18 +93,44 @@ export default {
|
||||
},
|
||||
// 开始评分
|
||||
handlePingfen () {
|
||||
|
||||
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {score: true}))
|
||||
},
|
||||
// 同意
|
||||
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 () {
|
||||
this.ruleForm = {}
|
||||
this.bohui = true
|
||||
},
|
||||
handleSubmit () {
|
||||
this.bohui = false
|
||||
this.handlApiSaveapproval({status: 5, menuName: '驳回了'})
|
||||
},
|
||||
handleCancel () {
|
||||
this.bohui = false
|
||||
@ -73,6 +138,25 @@ export default {
|
||||
cb (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 () {
|
||||
this.isShowPersonnel = true
|
||||
|
||||
147
src/views/kpi/assessment/performance/components/table copy.vue
Normal file
147
src/views/kpi/assessment/performance/components/table copy.vue
Normal 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>
|
||||
@ -22,9 +22,14 @@
|
||||
<!-- template不会被渲染 -->
|
||||
<template v-for="(item,index) in obj.recortModelDtos" >
|
||||
<!-- 左侧跨行区域 -->
|
||||
<tr :key="index+1000">
|
||||
<td :rowspan="item.detailDtos.length+1">{{item.name}}</td>
|
||||
<td v-if="item.detailDtos.length===0"></td>
|
||||
<tr :key="index+1000">
|
||||
<td :rowspan="item.detailDtos.length+1">
|
||||
<!-- <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 && 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">
|
||||
<td>
|
||||
{{child.target || ''}}
|
||||
<span> {{child.target || ''}}</span>
|
||||
</td>
|
||||
<td>
|
||||
{{child.keyResult || ''}}
|
||||
</td>
|
||||
<td v-if="tableInfo.result">
|
||||
<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>
|
||||
{{(child.checkWeight)*100}}%
|
||||
</td>
|
||||
<td v-if="tableInfo.score">
|
||||
<span>{{child.superScore || '--'}}</span>
|
||||
<el-input type="textarea" placeholder="请输入内容" v-model="child.superScoreed" clearable></el-input>
|
||||
<!-- <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 type="textarea" placeholder="请输入内容" v-model="child.scoreCommented" clearable></el-input>
|
||||
<!-- <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 class="table-bottom">
|
||||
<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>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
departmentName:obj.departmentName
|
||||
}" />
|
||||
<div class="performance-content-title-right">
|
||||
<UseButton :tableInfo.sync='tableInfo'/>
|
||||
<UseButton :formList='formList' :tableInfo.sync='tableInfo'/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="performance-content-center">
|
||||
@ -125,15 +125,11 @@
|
||||
<el-tag type="success">已确认</el-tag> -->
|
||||
</div>
|
||||
<div>
|
||||
<el-button size="mini" @click="handleJump(i)" type="primary" plain>跳过</el-button>
|
||||
<el-button size="mini" @click="handleZhuanjiao(i)" type="primary" plain>转交</el-button>
|
||||
<UseButton :info='i' :formList='formList' :tableInfo.sync='tableInfo'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</popup-right>
|
||||
<getPersonnel title='选择转交给' :len='1' @cb='cb' v-if="choosePerson"
|
||||
:value.sync='Personnel.value'
|
||||
:isShow.sync='choosePerson' :showDataList.sync='Personnel'/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -142,17 +138,12 @@ import SmallNav from '@/components/kpi-layout/SmallNav'
|
||||
import InfoHeader from '@/components/InfoHeader'
|
||||
import PopupRight from '@/components/PopupRight'
|
||||
import UseButton from './components/UseButton'
|
||||
import getPersonnel from '@/components/getPersonnel'
|
||||
import { apiResultRecordDetail, apiResultGetDetail } from '@/api/assessment'
|
||||
import tables from './components/table'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
Personnel: {
|
||||
list: []
|
||||
},
|
||||
choosePerson: false,
|
||||
right: {
|
||||
showRight: false
|
||||
},
|
||||
@ -175,8 +166,7 @@ export default {
|
||||
InfoHeader,
|
||||
PopupRight,
|
||||
tables,
|
||||
UseButton,
|
||||
getPersonnel
|
||||
UseButton
|
||||
},
|
||||
computed: {},
|
||||
beforeMount () { },
|
||||
@ -185,33 +175,7 @@ export default {
|
||||
this.handleGetTbale()
|
||||
},
|
||||
methods: {
|
||||
cb (info) {
|
||||
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) {
|
||||
async handleGetTbale (id = this.$route.query.id) {
|
||||
let res = await apiResultGetDetail({ id })
|
||||
this.obj = res.data
|
||||
console.log('res: ', res)
|
||||
@ -229,7 +193,7 @@ export default {
|
||||
},
|
||||
async handleList () {
|
||||
// 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
|
||||
for (let i in res.data.flowRecordList) {
|
||||
if (res.data.flowRecordList[i].status !== 1) {
|
||||
@ -239,10 +203,6 @@ export default {
|
||||
}
|
||||
this.formList = res.data
|
||||
console.log('res: ', res)
|
||||
},
|
||||
handleChangeTtitle () {
|
||||
// this.$route
|
||||
console.log('this.$route: ', this.$route.meta.title = '123')
|
||||
}
|
||||
},
|
||||
watch: {}
|
||||
|
||||
@ -186,7 +186,7 @@ export default {
|
||||
// this.handleKaoping()
|
||||
this.$router.push({
|
||||
name: 'assessment-performance',
|
||||
query: {id}
|
||||
query: {id: 267}
|
||||
})
|
||||
console.log('id: ', id)
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user