提交修改

This commit is contained in:
quyixiao 2020-08-13 17:56:01 +08:00
parent 75a6d9d099
commit 3c8c63548b
7 changed files with 726 additions and 12 deletions

View File

@ -8,3 +8,8 @@ export const apiGetResultRecordList = params => {
export const departmentQuery = params => {
return http({url: '/lz_management/user/lzresultrecord/departmentQuery', method: 'get', params})
}
export const getStaffResultDetail = params => {
return http({url: '/lz_management/user/lzresultrecord/getStaffResultDetail', method: 'get', params})
}

View File

@ -21,6 +21,15 @@ const globalRoutes = [
{ path: '/login', component: _import('common/login'), name: 'login', meta: { title: '登录' } }
]
const configRoutes = [
{
path: '/recorddetail',
component: _import('modules/result/record/recorddetail'),
name: 'recorddetail',
meta: {title: '业绩详情', isDynamic: true, isTab: true}
}
]
// 主入口路由(需嵌套上左右整体布局)
const mainRoutes = {
path: '/',
@ -134,7 +143,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
fnAddDynamicMenuRoutes(temp, routes)
} else {
mainRoutes.name = 'main-dynamic'
mainRoutes.children = routes
mainRoutes.children = routes.concat(configRoutes)
router.addRoutes([
mainRoutes,
{ path: '*', redirect: { name: '404' } }

View File

@ -118,7 +118,7 @@
width="150"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">详情</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template>
</el-table-column>
@ -138,9 +138,11 @@
</template>
<script>
import AddOrUpdate from './lzresultrecord-add-or-update'
import {apiGetResultRecordList, departmentQuery} from '@/api/api_result'
import {getDataForMonth} from '@/utils'
import {isURL} from '@/utils/validate'
export default {
filters: {
@ -204,6 +206,7 @@ export default {
}
},
computed: {},
components: {
AddOrUpdate
},
@ -292,11 +295,10 @@ export default {
selectionChangeHandle (val) {
this.dataListSelections = val
},
// /
//
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
this.$router.push({name: 'recorddetail',query: {id}}, () => {
this.mainTabsActiveName = this.$route.name
})
},
//

View File

@ -0,0 +1,129 @@
tableData: [{
id: '12987122',
item1: '业绩',
name: '公司资产盘点管理系统',
amount1: '234',
amount2: '3.2',
amount3: 10,
amount4: '83298',
amount5: '83298',
amount6: '83298'
}, {
id: '12987123',
item1: '业绩',
name: '数字化办公系统',
amount1: '前期需求整理、流程图(基于目前盘点系统扩展);\n' +
' 1.1业绩考核线上化需求采集流程图整理表设计100%完成);\n' +
' 1.2:业绩考核线上化编码;\n' +
' 1.2.1实现业绩基本功能100%完成,);\n' +
' 1.2.1.1后台H5项目指标添加比重评分100%完成无严重bug\n' +
' 1.2.1.2后台H5关键结果添加100%完成无严重bug\n' +
' 1.2.1.3后台H5考核结果添加100%完成无严重bug\n' +
' 1.2.1.4后台H5当项目评分评分说明100%完成无严重bug\n' +
' 1.2.1.5后台H5价值观考核结果100%完成无严重bug\n' +
' 1.2.1.6后台H5价值观评分评分说明100%完成无严重bug\n' +
' 1.2.1.7后台H5总分计算100%完成无严重bug\n' +
' 1.3:权限管理\n' +
' 1.3.2后台H5权限管理100%完成无重bug',
amount2: '4.43',
amount3: 12,
amount4: '83298',
amount5: '83298',
amount6: '83298'
}, {
id: '12987124',
item1: '业绩',
name: '团队健康发展',
amount1: '324',
amount2: '1.9',
amount3: 9,
amount4: '83298',
amount5: '83298',
amount6: '83298'
}, {
id: '12987125',
item1: '业绩',
name: '王小虎',
amount1: '621',
amount2: '2.2',
amount3: 17,
amount4: '83298',
amount5: '83298',
amount6: '83298'
}, {
id: '12987126',
item1: '业绩',
name: '王小虎',
amount1: '539',
amount2: '4.1',
amount3: 15,
amount4: '83298',
amount5: '83298',
amount6: '83298'
},
{
id: '12987122',
item1: '',
name: '',
amount1: '234',
amount2: '3.2',
amount3: 10,
amount4: '83298',
amount5: '83298',
amount6: '83298'
},
{
id: '12987122',
item1: '文化价值观',
name: '做人:相信、包容、担当',
amount1: 'xxxxxxxxxxxxxxxxx',
amount2: '3.2',
amount3: 10,
amount4: '83298',
amount5: '83298',
amount6: '83298'
}, {
id: '12987123',
item1: '文化价值观',
name: '做事:用户第一、求真、极致',
amount1: '后台H5权限管理100%完成无重bug',
amount2: '4.43',
amount3: 12,
amount4: '83298',
amount5: '83298',
amount6: '83298'
},
{
id: '12987123',
item1: '',
name: '',
amount1: '文化价值观考核结果',
amount2: '4.43',
amount3: 12,
amount4: '83298',
amount5: '83298',
amount6: '83298'
},
{
id: '12987123',
item1: '最终绩效考核评分',
name: '',
amount1: '',
amount2: '4.43',
amount3: 12,
amount4: '83298',
amount5: '83298',
amount6: '83298'
},
{
id: '12987123',
item1: '最终绩效考核结果等级',
name: '',
amount1: '',
amount2: '4.43',
amount3: 12,
amount4: '83298',
amount5: '83298',
amount6: '83298'
}
],

View File

@ -0,0 +1,147 @@
<template>
<el-dialog
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="是否删除状态1删除0有效" prop="isDelete">
<el-input v-model="dataForm.isDelete" placeholder="是否删除状态1删除0有效"></el-input>
</el-form-item>
<el-form-item label="创建时间" prop="gmtCreate">
<el-input v-model="dataForm.gmtCreate" placeholder="创建时间"></el-input>
</el-form-item>
<el-form-item label="最后修改时间" prop="gmtModified">
<el-input v-model="dataForm.gmtModified" placeholder="最后修改时间"></el-input>
</el-form-item>
<el-form-item label="月份" prop="monthTime">
<el-input v-model="dataForm.monthTime" placeholder="月份"></el-input>
</el-form-item>
<el-form-item label="0.新建1 提交审批中2 拒绝" prop="status">
<el-input v-model="dataForm.status" placeholder="0.新建1 提交审批中2 拒绝"></el-input>
</el-form-item>
<el-form-item label="最后得分" prop="lastScore">
<el-input v-model="dataForm.lastScore" placeholder="最后得分"></el-input>
</el-form-item>
<el-form-item label="总分" prop="allScore">
<el-input v-model="dataForm.allScore" placeholder="总分"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: 0,
isDelete: '',
gmtCreate: '',
gmtModified: '',
monthTime: '',
status: '',
lastScore: '',
allScore: '',
remark: ''
},
dataRule: {
isDelete: [
{ required: true, message: '是否删除状态1删除0有效不能为空', trigger: 'blur' }
],
gmtCreate: [
{ required: true, message: '创建时间不能为空', trigger: 'blur' }
],
gmtModified: [
{ required: true, message: '最后修改时间不能为空', trigger: 'blur' }
],
monthTime: [
{ required: true, message: '月份不能为空', trigger: 'blur' }
],
status: [
{ required: true, message: '0.新建1 提交审批中2 拒绝不能为空', trigger: 'blur' }
],
lastScore: [
{ required: true, message: '最后得分不能为空', trigger: 'blur' }
],
allScore: [
{ required: true, message: '总分不能为空', trigger: 'blur' }
],
remark: [
{ required: true, message: '备注不能为空', trigger: 'blur' }
]
}
}
},
methods: {
init (id) {
this.dataForm.id = 30 || 0
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/user/lzresultrecord/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.isDelete = data.lzresultrecord.isDelete
this.dataForm.gmtCreate = data.lzresultrecord.gmtCreate
this.dataForm.gmtModified = data.lzresultrecord.gmtModified
this.dataForm.monthTime = data.lzresultrecord.monthTime
this.dataForm.status = data.lzresultrecord.status
this.dataForm.lastScore = data.lzresultrecord.lastScore
this.dataForm.allScore = data.lzresultrecord.allScore
this.dataForm.remark = data.lzresultrecord.remark
}
})
}
})
},
//
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/user/lzresultrecord/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'isDelete': this.dataForm.isDelete,
'gmtCreate': this.dataForm.gmtCreate,
'gmtModified': this.dataForm.gmtModified,
'monthTime': this.dataForm.monthTime,
'status': this.dataForm.status,
'lastScore': this.dataForm.lastScore,
'allScore': this.dataForm.allScore,
'remark': this.dataForm.remark
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
}
}
}
</script>

View File

@ -0,0 +1,428 @@
<template>
<div class="app-container goodsOrder">
<div class="orderTable">
<!--列表表头-->
<div class="title">
<div class="titleTop">
<el-steps :active="active" finish-status="success">
<el-step title="03-23 11:21"></el-step>
<el-step title="03-23 11:21"></el-step>
<el-step title="03-23 11:21"></el-step>
<el-step title="03-23 11:21"></el-step>
<el-step title="03-23 11:21"></el-step>
<el-step title="03-23 11:21"></el-step>
</el-steps>
</div>
<div class="titleCenter">
<span>考核月份<b>{{checkMonth}}</b></span>
<span>员工姓名<b>{{ staffName }}</b></span>
<span>一级部门<b>{{ department1 }}</b></span>
<span>二级部门<b>{{ department2 }}</b></span>
<span>三级部门<b>{{ department3 }}</b></span>
<span>直属上级:<b>{{ superStaff }}</b></span>
</div>
<div class="titleBottom">
</div>
</div>
<el-table
:data="tableData"
:span-method="objectSpanMethod"
:cell-style="cellStyle"
v-loading.body="loading"
element-loading-text="Loading" border fit highlight-current-row>
<el-table-column label="考核维度" prop="checkRange" align="center" width="80"></el-table-column>
<el-table-column label="目标/指标" prop="target" align="center" width="200"></el-table-column>
<el-table-column label="关键结果" prop="keyResult" width="400" align="center"></el-table-column>
<el-table-column label="考核权重" prop="checkWeight" align="center" >
<template slot-scope="scope">
<div class="conatnt-name">
<span style="color: blue">{{ scope.row.checkWeight | getcheckWeightStr }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="考核结果(员工填写)" prop="checkResult" width="400"></el-table-column>
<el-table-column label="直属上级评分(100%" prop="superScore" align="center" width="300"></el-table-column>
<el-table-column label="得分" prop="acquireScore" align="center">
<template slot-scope="scope">
<div class="conatnt-name">
<span style="color: red">{{ scope.row.acquireScore }}</span>
</div>
</template>
</el-table-column>
<el-table-column label="评分说明(直属上级填写)" width="300" prop="scoreComment"></el-table-column>
<el-table-column width="80" label="操作" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" style="margin-left:0px;" v-if="scope.row.isAdd===1">添加</el-button>
<el-button size="mini" style="margin-left:0px;" @click="handleAddOrUpdate()" v-if="scope.row.isAdd >=0 " >修改</el-button>
<el-button size="mini" style="margin-left:0px;background: mistyrose" v-if="scope.row.isAdd >=0 " >删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
import {getStaffResultDetail} from '@/api/api_result'
export default {
created () {
this.recordResultId = this.$route.query.id
},
filters: {
getcheckWeightStr (val) {
return val * 100 + '%'
}
},
data () {
return {
active: 3,
recordResultId: 0,
tableData: [],
firstRowspan: 5,
secondRowspan: 6,
threeRowspan: 8,
fourRowspan: 9,
fiveRowspan: 10,
checkMonth: '2020-03-21',
staffName: '瞿贻晓',
department1: '业务中台',
department2: '金融业务组',
department3: '技术部门',
superStaff: '吴林'
}
},
activated () {
this.getDataList(this.recordResultId)
},
methods: {
getDataList (val) {
getStaffResultDetail({
'recordResultId': val
}).then(data => {
if (data && data.code === 0) {
this.tableData = data.list
this.firstRowspan = data.firstRowspan
this.secondRowspan = data.secondRowspan
this.threeRowspan = data.threeRowspan
this.fourRowspan = data.fourRowspan
this.fiveRowspan = data.fiveRowspan
this.checkMonth = data.checkMonth
this.staffName = data.staffName
this.department1 = data.department1
this.department2 = data.department2
this.department3 = data.department3
this.superStaff = data.superStaff
} else {
this.tableData = []
}
this.dataListLoading = false
this.addOrUpdateVisible = false
})
},
// /
handleAddOrUpdate (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
},
cellStyle ({row, column, rowIndex, columnIndex}) {
if (rowIndex === this.firstRowspan || rowIndex === this.threeRowspan) {
return 'background:#FFC400;font-weight:bolder!important;'
} else {
return ''
}
},
objectSpanMethod ({row, column, rowIndex, columnIndex}) {
if (columnIndex === 0) {
if (rowIndex === 0) {
return {
rowspan: this.firstRowspan,
colspan: 1
}
} else if (rowIndex === this.firstRowspan) {
} else if (rowIndex === this.secondRowspan) {
return {
rowspan: 2,
colspan: 1
}
} else if (rowIndex >= this.threeRowspan && rowIndex <= this.fiveRowspan) {
} else {
return {
rowspan: 0,
colspan: 0
}
}
}
if (rowIndex === this.firstRowspan) {
if (columnIndex === 0) {
return [1, 2]
} else if (columnIndex === 1) {
return [0, 0]
}
}
if (rowIndex >= this.secondRowspan && rowIndex < this.threeRowspan) {
if (columnIndex === 1) {
return [1, 2]
} else if (columnIndex === 2) {
return [0, 0]
}
}
if (rowIndex === this.threeRowspan) {
if (columnIndex === 0) {
return [1, 2]
} else if (columnIndex === 1) {
return [0, 0]
}
}
if (rowIndex >= this.fourRowspan && rowIndex <= this.fiveRowspan) {
if (columnIndex === 0) {
return [1, 2]
} else if (columnIndex === 1) {
return [0, 0]
} else if (columnIndex === 2) {
return [1, 4]
} else if (columnIndex >= 3 && columnIndex <= 5) {
return [0, 0]
}
}
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.app-container {
font-size: 14px;
.tip {
color: red;
padding-left: 10px;
padding-top: 5px;
}
.export {
text-align: right;
margin: 5px;
display: flex;
flex-direction: row;
justify-content: space-between;
a {
margin: 0px 20px 0px 4px;
}
}
.uploadDiv {
display: inline-block;
}
.orderTable {
margin-bottom: 10px;
font-size: 12px;
.title {
display: flow;
justify-content: space-between;
align-items: flex-end;
background-color: #D9EDF7;
border: 2px solid #BCE8F1;
color: #31708f;
.titleLine {
margin: 10px 0px;
span {
margin: 18px;
cursor: pointer;
}
.logEdit {
color: blue;
}
.logEdit:hover {
text-decoration: underline;
}
}
.titleTop {
width: 100%;
word-wrap: break-word;
span {
display: inline-block;
margin: 5px 15px;
}
}
.titleCenter {
margin-top: 5px;
width: 100%;
word-wrap: break-word;
span {
display: inline-block;
margin: 5px 15px;
}
}
}
.typeItem {
margin-bottom: 5px;
}
}
.relation {
padding: 5px 0 15px;
}
.contEdit {
color: #23b7e5;
cursor: pointer;
}
}
.goodsLog {
height: 500px;
overflow-y: scroll
}
.refund-wrapper {
width: 80%;
.item-line {
width: 100%;
display: flex;
flex-direction: row;
flex-direction: row;
justify-content: flex-start;
margin-bottom: 20px;
}
.left-content {
text-align: right;
width: 120px;
margin-right: 20px;
.left-tip {
color: red;
}
}
.right-content {
width: 480px;
display: flex;
flex-direction: column;
justify-content: space-between;
p {
margin: 0;
}
.right-item {
margin-top: 10px;
}
.middle-tip {
margin-bottom: 15px;
}
.tip {
color: red;
font-size: 12px;
}
}
}
.deliver-title {
font-weight: bold;
margin-bottom: 20px;
}
.igo-form-item {
width: 160px;
}
//
.package-content {
position: relative;
.package-name {
position: absolute;
bottom: 30px;
left: 10px;
}
.package-delete {
position: absolute;
bottom: 25px;
left: 400px;
}
}
.package-btn {
margin-left: 10px;
}
.package_info {
margin-bottom: 10px;
font-weight: bold;
}
//
.calculation-box {
position: relative;
.calculation-btn {
position: absolute;
bottom: -20px;
left: 70px;
}
}
.remark-list {
margin-top: -25px;
list-style: none;
margin-bottom: 20px;
.remark-state-box {
color: #999;
span {
margin-right: 40px;
}
.isSolve {
color: red;
}
}
}
.item-err {
color: red;
line-height: 1;
position: absolute;
top: 111%;
left: 146px;
font-size: 12px;
}
</style>

View File

@ -309,12 +309,6 @@ export default {
console.log(tab, event)
},
async handleView (data) {
this.$message({
message: '编辑暂未开放',
showClose: true,
type: 'warning'
})
return
console.log('data: ', data)
this.activeName = 'first'
await this.getEmployeesInfo(data.staffId)