提交修改
This commit is contained in:
parent
504306a0cf
commit
0543fbccc7
@ -24,3 +24,7 @@ export const recorddetailAddOrUpdate = params => {
|
|||||||
export const recorddetailDelete = params => {
|
export const recorddetailDelete = params => {
|
||||||
return http({url: '/lz_management/user/lzresultrecord/recorddetailDelete/' + params, method: 'post'})
|
return http({url: '/lz_management/user/lzresultrecord/recorddetailDelete/' + params, method: 'post'})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const weightCheck = params => {
|
||||||
|
return http({url: '/lz_management/user/lzresultrecord/weightCheck', method: 'post', params})
|
||||||
|
}
|
||||||
|
|||||||
@ -2,45 +2,6 @@
|
|||||||
<div class="mod-config">
|
<div class="mod-config">
|
||||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||||
|
|
||||||
<el-form-item label="一级部门">
|
|
||||||
<el-select v-model="dataForm.department1" placeholder="请选择" @change="changeDepartment('2')">
|
|
||||||
<el-option
|
|
||||||
v-for="item in departmentList1"
|
|
||||||
:key="item.departmentId"
|
|
||||||
:label="item.departmentName"
|
|
||||||
:value="item.departmentId"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="二级部门">
|
|
||||||
<el-select v-model="dataForm.department2" placeholder="请选择" @change="changeDepartment('3')">
|
|
||||||
<el-option
|
|
||||||
v-for="item in departmentList2"
|
|
||||||
:key="item.departmentId"
|
|
||||||
:label="item.departmentName"
|
|
||||||
:value="item.departmentId"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item label="三级部门">
|
|
||||||
<el-select v-model="dataForm.department3" placeholder="请选择">
|
|
||||||
<el-option
|
|
||||||
v-for="item in departmentList3"
|
|
||||||
:key="item.departmentId"
|
|
||||||
:label="item.departmentName"
|
|
||||||
:value="item.departmentId"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="姓名">
|
|
||||||
<el-input v-model="dataForm.name" placeholder="员工姓名" clearable></el-input>
|
|
||||||
</el-form-item>
|
|
||||||
|
|
||||||
<el-form-item :label="`月份`">
|
<el-form-item :label="`月份`">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dataForm.value"
|
v-model="dataForm.value"
|
||||||
@ -84,6 +45,10 @@
|
|||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
<div class="btn-box">
|
||||||
|
<el-button type="primary" plain @click="addOrUpdateHandle(0,1)">新增目标</el-button>
|
||||||
|
<el-button type="primary" plain @click="addOrUpdateHandle(0,2)">新增业绩</el-button>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
border
|
border
|
||||||
@ -118,7 +83,7 @@
|
|||||||
width="150"
|
width="150"
|
||||||
label="操作">
|
label="操作">
|
||||||
<template slot-scope="scope">
|
<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,3)">详情</el-button>
|
||||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -142,7 +107,6 @@
|
|||||||
import AddOrUpdate from './lzresultrecord-add-or-update'
|
import AddOrUpdate from './lzresultrecord-add-or-update'
|
||||||
import {apiGetResultRecordList, departmentQuery} from '@/api/api_result'
|
import {apiGetResultRecordList, departmentQuery} from '@/api/api_result'
|
||||||
import {getDataForMonth} from '@/utils'
|
import {getDataForMonth} from '@/utils'
|
||||||
import {isURL} from '@/utils/validate'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
filters: {
|
filters: {
|
||||||
@ -259,7 +223,8 @@ export default {
|
|||||||
'department2': this.dataForm.department2,
|
'department2': this.dataForm.department2,
|
||||||
'department3': this.dataForm.department3,
|
'department3': this.dataForm.department3,
|
||||||
'name': this.dataForm.name,
|
'name': this.dataForm.name,
|
||||||
'remark': this.dataForm.remark
|
'remark': this.dataForm.remark,
|
||||||
|
'isSelf': 1
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataList = data.page.list
|
this.dataList = data.page.list
|
||||||
@ -296,8 +261,8 @@ export default {
|
|||||||
this.dataListSelections = val
|
this.dataListSelections = val
|
||||||
},
|
},
|
||||||
//
|
//
|
||||||
addOrUpdateHandle (id) {
|
addOrUpdateHandle (id, type) {
|
||||||
this.$router.push({name: 'recorddetail',query: {id}}, () => {
|
this.$router.push({name: 'recorddetail', query: {id: id, type: type}}, () => {
|
||||||
this.mainTabsActiveName = this.$route.name
|
this.mainTabsActiveName = this.$route.name
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -334,3 +299,15 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
.contentEdit {
|
||||||
|
color: blue;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.btn-box{
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|||||||
336
src/views/modules/result/record/lzresultrecordapp.vue
Normal file
336
src/views/modules/result/record/lzresultrecordapp.vue
Normal file
@ -0,0 +1,336 @@
|
|||||||
|
<template>
|
||||||
|
<div class="mod-config">
|
||||||
|
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||||
|
|
||||||
|
<el-form-item label="一级部门">
|
||||||
|
<el-select v-model="dataForm.department1" placeholder="请选择" @change="changeDepartment('2')">
|
||||||
|
<el-option
|
||||||
|
v-for="item in departmentList1"
|
||||||
|
:key="item.departmentId"
|
||||||
|
:label="item.departmentName"
|
||||||
|
:value="item.departmentId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="二级部门">
|
||||||
|
<el-select v-model="dataForm.department2" placeholder="请选择" @change="changeDepartment('3')">
|
||||||
|
<el-option
|
||||||
|
v-for="item in departmentList2"
|
||||||
|
:key="item.departmentId"
|
||||||
|
:label="item.departmentName"
|
||||||
|
:value="item.departmentId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="三级部门">
|
||||||
|
<el-select v-model="dataForm.department3" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in departmentList3"
|
||||||
|
:key="item.departmentId"
|
||||||
|
:label="item.departmentName"
|
||||||
|
:value="item.departmentId"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
<el-form-item label="姓名">
|
||||||
|
<el-input v-model="dataForm.name" placeholder="员工姓名" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item :label="`月份`">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataForm.value"
|
||||||
|
type="daterange"
|
||||||
|
align="right"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
@change="changeData"
|
||||||
|
></el-date-picker>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<el-button
|
||||||
|
v-for="i in Datalist"
|
||||||
|
:key="i.Month"
|
||||||
|
:type="index==i.Month?'primary':'info'"
|
||||||
|
size="mini"
|
||||||
|
@click="handleChangeData(i)"
|
||||||
|
>{{ i.title }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="审批状态">
|
||||||
|
<el-select v-model="dataForm.status" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in stateList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="dataForm.remark" placeholder="备注" clearable></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table
|
||||||
|
:data="dataList"
|
||||||
|
border
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
@selection-change="selectionChangeHandle"
|
||||||
|
style="width: 100%;">
|
||||||
|
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||||
|
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
|
||||||
|
<el-table-column prop="departmentName" header-align="center" align="center" label="部门名称"></el-table-column>
|
||||||
|
<el-table-column prop="staffName" header-align="center" align="center" label="姓名"></el-table-column>
|
||||||
|
<el-table-column prop="monthTime" header-align="center" align="center" label="月份">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="conatnt-name">
|
||||||
|
<span>{{ scope.row.monthTime | formaterDate }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="statusStr" header-align="center" align="center" label="状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="conatnt-name">
|
||||||
|
<span>{{ scope.row.status | getStatusStr }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="lastScore" header-align="center" align="center" label="最后得分"></el-table-column>
|
||||||
|
<el-table-column prop="allScore" header-align="center" align="center" label="总分"></el-table-column>
|
||||||
|
<el-table-column prop="remark" header-align="center" align="center" label="备注"></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
fixed="right"
|
||||||
|
header-align="center"
|
||||||
|
align="center"
|
||||||
|
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="deleteHandle(scope.row.id)">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="sizeChangeHandle"
|
||||||
|
@current-change="currentChangeHandle"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[10, 20, 50, 100]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
:total="totalPage"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper">
|
||||||
|
</el-pagination>
|
||||||
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
</div>
|
||||||
|
</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: {
|
||||||
|
formaterDate (val) {
|
||||||
|
var date = new Date(val)
|
||||||
|
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
||||||
|
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
||||||
|
return date.getFullYear() + '-' + month + '-' + day
|
||||||
|
},
|
||||||
|
getStatusStr (status) {
|
||||||
|
if (status === 0) {
|
||||||
|
return '新建'
|
||||||
|
} else if (status === 1) {
|
||||||
|
return '审批中'
|
||||||
|
} else if (status === 2) {
|
||||||
|
return '拒绝'
|
||||||
|
} else if (status === 3) {
|
||||||
|
return '审批通过'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
Datalist: [{
|
||||||
|
Month: 1,
|
||||||
|
title: '近一个月'
|
||||||
|
}, {
|
||||||
|
Month: 3,
|
||||||
|
title: '近三个月'
|
||||||
|
}, {
|
||||||
|
Month: 6,
|
||||||
|
title: '近半年'
|
||||||
|
}, {
|
||||||
|
Month: 12,
|
||||||
|
title: '近一年'
|
||||||
|
}],
|
||||||
|
dataForm: {
|
||||||
|
key: '',
|
||||||
|
value: [],
|
||||||
|
department1: '',
|
||||||
|
department2: '',
|
||||||
|
department3: ''
|
||||||
|
},
|
||||||
|
dataList: [],
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalPage: 0,
|
||||||
|
dataListLoading: false,
|
||||||
|
dataListSelections: [],
|
||||||
|
stateList: [
|
||||||
|
{value: '0', label: '新建'},
|
||||||
|
{value: '1', label: '审批中'},
|
||||||
|
{value: '2', label: '拒绝'},
|
||||||
|
{value: '3', label: '审批通过'}
|
||||||
|
],
|
||||||
|
departmentList1: [],
|
||||||
|
departmentList2: [],
|
||||||
|
departmentList3: [],
|
||||||
|
addOrUpdateVisible: false
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
components: {
|
||||||
|
AddOrUpdate
|
||||||
|
},
|
||||||
|
activated () {
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async handleChangeData (data) {
|
||||||
|
this.index = data.Month
|
||||||
|
this.title = data.title
|
||||||
|
let dataList = getDataForMonth(data.Month)
|
||||||
|
this.dataForm.value = dataList
|
||||||
|
this.dataForm.beginDate = dataList[0]
|
||||||
|
this.dataForm.endDate = dataList[1]
|
||||||
|
this.onSubmit()
|
||||||
|
},
|
||||||
|
async changeDepartment (i) {
|
||||||
|
let departmentId = 0
|
||||||
|
if (i === '2') {
|
||||||
|
departmentId = this.dataForm.department1
|
||||||
|
} else if (i === '3') {
|
||||||
|
departmentId = this.dataForm.department2
|
||||||
|
} else {
|
||||||
|
departmentId = this.dataForm.department3
|
||||||
|
}
|
||||||
|
departmentQuery({
|
||||||
|
'departmentId': departmentId
|
||||||
|
}).then(data => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this['departmentList' + i] = data.departmentList
|
||||||
|
if (i === '2') {
|
||||||
|
this.dataForm['department2'] = ''
|
||||||
|
this.dataForm['department3'] = ''
|
||||||
|
} else if (i === '3') {
|
||||||
|
this.dataForm['department3'] = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.dataListLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 获取数据列表
|
||||||
|
getDataList () {
|
||||||
|
apiGetResultRecordList({
|
||||||
|
'page': this.pageIndex,
|
||||||
|
'limit': this.pageSize,
|
||||||
|
'monthBeginDate': this.dataForm.beginDate,
|
||||||
|
'monthEndDate': this.dataForm.endDate,
|
||||||
|
'status': this.dataForm.status,
|
||||||
|
'department1': this.dataForm.department1,
|
||||||
|
'department2': this.dataForm.department2,
|
||||||
|
'department3': this.dataForm.department3,
|
||||||
|
'name': this.dataForm.name,
|
||||||
|
'remark': this.dataForm.remark
|
||||||
|
}).then(data => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.dataList = data.page.list
|
||||||
|
this.totalPage = data.page.totalCount
|
||||||
|
this.departmentList1 = data.departmentList1
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
this.totalPage = 0
|
||||||
|
}
|
||||||
|
this.dataListLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
changeData (data) {
|
||||||
|
this.index = null
|
||||||
|
this.title = null
|
||||||
|
this.dataForm.beginDate = data[0]
|
||||||
|
this.dataForm.endDate = data[1]
|
||||||
|
},
|
||||||
|
// 每页数
|
||||||
|
sizeChangeHandle (val) {
|
||||||
|
this.pageSize = val
|
||||||
|
this.pageIndex = 1
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 当前页
|
||||||
|
currentChangeHandle (val) {
|
||||||
|
this.pageIndex = val
|
||||||
|
this.getDataList()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 多选
|
||||||
|
selectionChangeHandle (val) {
|
||||||
|
this.dataListSelections = val
|
||||||
|
},
|
||||||
|
//
|
||||||
|
addOrUpdateHandle (id) {
|
||||||
|
this.$router.push({name: 'recorddetail',query: {id}}, () => {
|
||||||
|
this.mainTabsActiveName = this.$route.name
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 删除
|
||||||
|
deleteHandle (id) {
|
||||||
|
var ids = id ? [id] : this.dataListSelections.map(item => {
|
||||||
|
return item.id
|
||||||
|
})
|
||||||
|
this.$confirm(`确定对[id=${ids.join(',')}]进行[${id ? '删除' : '批量删除'}]操作?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
this.$http({
|
||||||
|
url: this.$http.adornUrl('/user/lzresultrecord/delete'),
|
||||||
|
method: 'post',
|
||||||
|
data: this.$http.adornData(ids, false)
|
||||||
|
}).then(({data}) => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.getDataList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$message.error(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -6,10 +6,10 @@
|
|||||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm"
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm"
|
||||||
label-width="80px">
|
label-width="80px">
|
||||||
<el-form-item label="目标/指标" prop="target">
|
<el-form-item label="目标/指标" prop="target">
|
||||||
<el-input v-model="dataForm.target" placeholder="目标/指标"></el-input>
|
<el-input :disabled="false" v-model="dataForm.target" placeholder="目标/指标"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关键结果" prop="keyResult">
|
<el-form-item label="关键结果" prop="keyResult">
|
||||||
<div id="keyResultEditorElem" class="editor"></div>
|
<div id="keyResultEditorElem" class="editor"></div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="考核权重" prop="checkWeight">
|
<el-form-item label="考核权重" prop="checkWeight">
|
||||||
<el-input v-model="dataForm.checkWeight" placeholder="考核权重"></el-input>
|
<el-input v-model="dataForm.checkWeight" placeholder="考核权重"></el-input>
|
||||||
@ -17,13 +17,27 @@
|
|||||||
<el-form-item label="考核结果" prop="checkResult">
|
<el-form-item label="考核结果" prop="checkResult">
|
||||||
<div id="checkResultEditorElem" class="editor"></div>
|
<div id="checkResultEditorElem" class="editor"></div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="上级评分" prop="superScore">
|
|
||||||
<el-input v-model="dataForm.superScore" placeholder="直属上级评分(100%)"></el-input>
|
<el-form-item label="上级评分">
|
||||||
|
<el-select v-model="dataForm.superScore" placeholder="请选择" @change="changeSuperScore()" >
|
||||||
|
<el-option
|
||||||
|
v-for="item in superScore"
|
||||||
|
:key="item.score"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.label"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="得分" prop="acquireScore">
|
<el-form-item label="得分" prop="acquireScore">
|
||||||
<el-input v-model="dataForm.acquireScore" placeholder="得分"></el-input>
|
<template >
|
||||||
|
<div style="color: red" class="conatnt-name" v-model="dataForm.acquireScore">
|
||||||
|
<span>{{ this.dataForm.acquireScore }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="评分说明" prop="scoreComment">
|
|
||||||
|
<el-form-item v-show="true" label="评分说明" prop="scoreComment">
|
||||||
<el-input v-model="dataForm.scoreComment" placeholder="评分说明(直属上级填写)"></el-input>
|
<el-input v-model="dataForm.scoreComment" placeholder="评分说明(直属上级填写)"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -36,19 +50,55 @@
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {apiDetailInfo, recorddetailAddOrUpdate, recorddetailDelete} from '@/api/api_result'
|
import {apiDetailInfo, recorddetailAddOrUpdate, recorddetailDelete, weightCheck} from '@/api/api_result'
|
||||||
import E from 'wangeditor'
|
import E from 'wangeditor'
|
||||||
|
|
||||||
var Base64 = require('js-base64').Base64
|
var Base64 = require('js-base64').Base64
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
|
var validNum = async (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('数值不能为空'))
|
||||||
|
}
|
||||||
|
if (!/^(((0)\.([0-9]{1,2}))$)/.test(value)) {
|
||||||
|
callback(new Error('请输入大于0小于1的小数'))
|
||||||
|
}
|
||||||
|
let data = await weightCheck({
|
||||||
|
'recordResultId': this.recordResultId,
|
||||||
|
'weight': value,
|
||||||
|
'type': this.type,
|
||||||
|
'id': this.dataForm.id
|
||||||
|
})
|
||||||
|
if (data && data.code !== 0) {
|
||||||
|
callback(new Error(data.msg))
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
var scoreComment = async (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('评分不能为空'))
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
keyResultEditor: null,
|
keyResultEditor: null,
|
||||||
checkResultEditor: null,
|
checkResultEditor: null,
|
||||||
recordResultId: null,
|
recordResultId: null,
|
||||||
type: 0,
|
type: 0,
|
||||||
|
superScore: [{
|
||||||
|
score: 4,
|
||||||
|
label: '4分-卓越'
|
||||||
|
}, {
|
||||||
|
score: 3.75,
|
||||||
|
label: '3.75分-优秀'
|
||||||
|
}, {
|
||||||
|
score: 3.5,
|
||||||
|
label: '3.5分-合格'
|
||||||
|
}, {
|
||||||
|
score: 3.25,
|
||||||
|
label: '3.25分-不合格,待改进'
|
||||||
|
}],
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: 0,
|
id: 0,
|
||||||
target: '',
|
target: '',
|
||||||
@ -61,19 +111,41 @@ export default {
|
|||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
scoreComment: [
|
scoreComment: [
|
||||||
{required: true, message: '月份不能为空', trigger: 'blur'}
|
{required: scoreComment, message: '评分不能为空', trigger: 'blur'}
|
||||||
|
],
|
||||||
|
checkWeight: [
|
||||||
|
{validator: validNum, required: true, trigger: 'blur'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init (id, type, recordResultId) {
|
async init (id, type, recordResultId) {
|
||||||
this.type = type
|
this.type = type
|
||||||
this.recordResultId = recordResultId
|
this.recordResultId = recordResultId
|
||||||
this.dataForm.id = id || 0
|
this.dataForm.id = id || 0
|
||||||
|
|
||||||
|
let data = await weightCheck({
|
||||||
|
'recordResultId': this.recordResultId,
|
||||||
|
'type': this.type,
|
||||||
|
'id': this.dataForm.id
|
||||||
|
})
|
||||||
|
if (data && data.code !== 0) {
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.visible = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
this.$refs['dataForm'].resetFields()
|
this.$refs['dataForm'].resetFields()
|
||||||
@ -84,6 +156,7 @@ export default {
|
|||||||
this.keyResultEditor.customConfig.uploadImgParams = ''
|
this.keyResultEditor.customConfig.uploadImgParams = ''
|
||||||
this.keyResultEditor.customConfig.debug = true
|
this.keyResultEditor.customConfig.debug = true
|
||||||
this.keyResultEditor.create()
|
this.keyResultEditor.create()
|
||||||
|
this.keyResultEditor.$textElem.attr('contenteditable', false)
|
||||||
}
|
}
|
||||||
if (this.checkResultEditor === null) {
|
if (this.checkResultEditor === null) {
|
||||||
this.checkResultEditor = new E('#checkResultEditorElem')
|
this.checkResultEditor = new E('#checkResultEditorElem')
|
||||||
@ -92,6 +165,7 @@ export default {
|
|||||||
this.checkResultEditor.customConfig.uploadImgParams = ''
|
this.checkResultEditor.customConfig.uploadImgParams = ''
|
||||||
this.checkResultEditor.customConfig.debug = true
|
this.checkResultEditor.customConfig.debug = true
|
||||||
this.checkResultEditor.create()
|
this.checkResultEditor.create()
|
||||||
|
this.keyResultEditor.$textElem.attr('contenteditable', false)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.dataForm.id && this.dataForm.id > 0) {
|
if (this.dataForm.id && this.dataForm.id > 0) {
|
||||||
@ -110,28 +184,38 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
changeSuperScore () {
|
||||||
|
let value = this.dataForm.superScore
|
||||||
|
value = value.replace(/[\u4e00-\u9fa5]/g, '')
|
||||||
|
value = value.replace('-', '')
|
||||||
|
value = value.replace(',', '')
|
||||||
|
this.dataForm.acquireScore = value
|
||||||
|
},
|
||||||
dataFormSubmit () {
|
dataFormSubmit () {
|
||||||
recorddetailAddOrUpdate({
|
this.$refs['dataForm'].validate((valid) => {
|
||||||
'id': this.dataForm.id || undefined,
|
if (valid) {
|
||||||
'type': this.type,
|
recorddetailAddOrUpdate({
|
||||||
'target': this.dataForm.target,
|
'id': this.dataForm.id || undefined,
|
||||||
'keyResult': Base64.encode(this.keyResultEditor.txt.html()),
|
'type': this.type,
|
||||||
'checkWeight': this.dataForm.checkWeight,
|
'target': this.dataForm.target,
|
||||||
'checkResult': Base64.encode(this.checkResultEditor.txt.html()),
|
'keyResult': Base64.encode(this.keyResultEditor.txt.html()),
|
||||||
'superScore': this.dataForm.superScore,
|
'checkWeight': this.dataForm.checkWeight,
|
||||||
'acquireScore': this.dataForm.acquireScore,
|
'checkResult': Base64.encode(this.checkResultEditor.txt.html()),
|
||||||
'scoreComment': this.dataForm.scoreComment,
|
'superScore': this.dataForm.superScore,
|
||||||
'recordId': this.recordResultId
|
'acquireScore': this.dataForm.acquireScore,
|
||||||
}).then(res => {
|
'scoreComment': this.dataForm.scoreComment,
|
||||||
if (res && res.code === 0) {
|
'recordId': this.recordResultId
|
||||||
this.$message({
|
}).then(res => {
|
||||||
message: '操作成功',
|
if (res && res.code === 0) {
|
||||||
type: 'success',
|
this.$message({
|
||||||
duration: 1500,
|
message: '操作成功',
|
||||||
onClose: () => {
|
type: 'success',
|
||||||
this.visible = false
|
duration: 1500,
|
||||||
this.$emit('refreshDataList')
|
onClose: () => {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList')
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
<div class="orderTable">
|
<div class="orderTable">
|
||||||
<!--列表表头-->
|
<!--列表表头-->
|
||||||
<div class="title">
|
<div class="title">
|
||||||
|
|
||||||
<div class="titleTop">
|
<div class="titleTop">
|
||||||
<el-steps :active="active" finish-status="success">
|
<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>
|
||||||
@ -12,8 +13,8 @@
|
|||||||
<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>
|
</el-steps>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="titleCenter">
|
<div class="titleCenter">
|
||||||
<span>考核月份:<b>{{checkMonth}}</b></span>
|
<span>考核月份:<b>{{checkMonth}}</b></span>
|
||||||
<span>员工姓名:<b>{{ staffName }}</b></span>
|
<span>员工姓名:<b>{{ staffName }}</b></span>
|
||||||
@ -24,7 +25,23 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="titleBottom">
|
<div class="titleBottom">
|
||||||
|
<div class="bottom" v-show="this.auth.commit == 1" >
|
||||||
|
<p> <span style="cursor: pointer">提交审批</span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bottom" v-show="this.auth.approvel == 1" >
|
||||||
|
<p> <span style="cursor: pointer">审批通过</span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bottom" v-show="this.auth.confirmCommit == 1" >
|
||||||
|
<p> <span style="cursor: pointer">确认得分</span></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="bottom" v-show="this.auth.reject == 1" >
|
||||||
|
<p> <span style="cursor: pointer;color: red">驳回</span></p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
@ -72,8 +89,8 @@
|
|||||||
|
|
||||||
<el-table-column width="80" label="操作" align="center" fixed="right">
|
<el-table-column width="80" label="操作" align="center" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="primary" style="margin-left:0px;" @click="handleAddOrUpdate(0,scope.row.type )" v-if="scope.row.isAdd===1">添加</el-button>
|
<el-button size="mini" type="primary" style="margin-left:0px;" @click="handleAddOrUpdate(0,scope.row.type )" v-if="scope.row.isAdd===1 && auth.add == 1 ">添加</el-button>
|
||||||
<el-button size="mini" style="margin-left:0px;" @click="handleAddOrUpdate(scope.row.id,scope.row.type)" v-if="scope.row.isAdd >=0 " >编辑</el-button>
|
<el-button size="mini" style="margin-left:0px;" @click="handleAddOrUpdate(scope.row.id,scope.row.type)" v-if="scope.row.isEdit > 0 && auth.edit == 1" >编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -96,15 +113,31 @@ import AddOrUpdate from './recorddetail-add-or-update'
|
|||||||
export default {
|
export default {
|
||||||
created () {
|
created () {
|
||||||
this.recordResultId = this.$route.query.id
|
this.recordResultId = this.$route.query.id
|
||||||
|
this.type = this.$route.query.type
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
getcheckWeightStr (val) {
|
getcheckWeightStr (val) {
|
||||||
return val * 100 + '%'
|
if (isNaN(val)) {
|
||||||
|
val = '0'
|
||||||
|
}
|
||||||
|
val = val * 100
|
||||||
|
let sign = (val === (val = Math.abs(val)))
|
||||||
|
val = Math.floor(val * 100 + 0.50000000001)
|
||||||
|
let cents = val % 100
|
||||||
|
val = Math.floor(val / 100).toString()
|
||||||
|
if (cents < 10) {
|
||||||
|
cents = '0' + cents
|
||||||
|
}
|
||||||
|
for (var i = 0; i < Math.floor((val.length - (1 + i)) / 3); i++) {
|
||||||
|
val = val.substring(0, val.length - (4 * i + 3)) + ',' + val.substring(val.length - (4 * i + 3))
|
||||||
|
}
|
||||||
|
return (((sign) ? '' : '-') + val + '.' + cents) + '%'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
active: 3,
|
active: 3,
|
||||||
|
type: 1,
|
||||||
recordResultId: 0,
|
recordResultId: 0,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
firstRowspan: 5,
|
firstRowspan: 5,
|
||||||
@ -120,7 +153,8 @@ export default {
|
|||||||
superStaff: '吴林',
|
superStaff: '吴林',
|
||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
xxxx: '1资产盘点系统<div> 1.2 我们是宁产的</div><div> 1.3 我们要取东西</div><div> 1.4 我觉得这个东西是好的</div><div> 1.5 我们的这这东西是这样的</div><div> 1.632323232233232<p><br></p></div>'
|
auth: [],
|
||||||
|
authId: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -132,7 +166,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
getDataList () {
|
getDataList () {
|
||||||
getStaffResultDetail({
|
getStaffResultDetail({
|
||||||
'recordResultId': this.recordResultId
|
'recordResultId': this.recordResultId,
|
||||||
|
'type': this.type
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.tableData = data.list
|
this.tableData = data.list
|
||||||
@ -147,6 +182,8 @@ export default {
|
|||||||
this.department2 = data.department2
|
this.department2 = data.department2
|
||||||
this.department3 = data.department3
|
this.department3 = data.department3
|
||||||
this.superStaff = data.superStaff
|
this.superStaff = data.superStaff
|
||||||
|
this.auth = data.auth
|
||||||
|
this.authId = data.authId
|
||||||
} else {
|
} else {
|
||||||
this.tableData = []
|
this.tableData = []
|
||||||
}
|
}
|
||||||
@ -170,6 +207,7 @@ export default {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
objectSpanMethod ({row, column, rowIndex, columnIndex}) {
|
objectSpanMethod ({row, column, rowIndex, columnIndex}) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
if (rowIndex === 0) {
|
if (rowIndex === 0) {
|
||||||
@ -309,6 +347,31 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.titleBottom{
|
||||||
|
margin:5px;
|
||||||
|
font-weight:bold;
|
||||||
|
font-size:14px;
|
||||||
|
color:#7266ba;
|
||||||
|
height: 40px;
|
||||||
|
|
||||||
|
.bottom{
|
||||||
|
float: right;
|
||||||
|
color: blue;
|
||||||
|
width: 100px;
|
||||||
|
height: 30px;
|
||||||
|
text-align: left;
|
||||||
|
.des{
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
span{
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.typeItem {
|
.typeItem {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user