Merge branch 'version_1.0' of http://gitlab.ldxinyong.com/enterpriseManagement/lz_management_vue into version_1.0
This commit is contained in:
commit
ae5fdf5204
@ -28,3 +28,15 @@ export const recorddetailDelete = params => {
|
|||||||
export const weightCheck = params => {
|
export const weightCheck = params => {
|
||||||
return http({url: '/lz_management/user/lzresultrecord/weightCheck', method: 'post', params})
|
return http({url: '/lz_management/user/lzresultrecord/weightCheck', method: 'post', params})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const commitApproval = params => {
|
||||||
|
return http({url: '/lz_management/user/lzresultrecord/commitApproval', method: 'get', params})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getResultComment = params => {
|
||||||
|
return http({url: '/lz_management/user/lzresultrecord/getResultComment/' + params, method: 'post'})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const recordIdsSubmit = params => {
|
||||||
|
return http({url: '/lz_management/user/lzresultrecord/recordIdsSubmit', method: 'post', params})
|
||||||
|
}
|
||||||
|
|||||||
96
src/views/modules/result/record/approval-add-or-update.vue
Normal file
96
src/views/modules/result/record/approval-add-or-update.vue
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="'' "
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="visible">
|
||||||
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="80px">
|
||||||
|
<el-form-item label="意见" prop="resultComment">
|
||||||
|
<div id="resultCommentEditorElem" class="editor"></div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" v-if="auth.approvelCommit === 1" @click="commitRecord(2)">通过</el-button>
|
||||||
|
<el-button type="primary" v-if="auth.waitCommit===1" @click="commitRecord(3)">侍提交</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import E from 'wangeditor'
|
||||||
|
import {commitApproval, getResultComment} from '@/api/api_result'
|
||||||
|
|
||||||
|
var Base64 = require('js-base64').Base64
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
resultCommentEditor: null,
|
||||||
|
recordResultId: 0,
|
||||||
|
auth: [],
|
||||||
|
resultCommitId: 0,
|
||||||
|
dataForm: {
|
||||||
|
resultComment: ''
|
||||||
|
},
|
||||||
|
dataRule: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
|
||||||
|
},
|
||||||
|
computed: {},
|
||||||
|
methods: {
|
||||||
|
async init (recordResultId, auth) {
|
||||||
|
this.recordResultId = recordResultId
|
||||||
|
this.auth = auth
|
||||||
|
this.visible = true
|
||||||
|
this.$nextTick(async () => {
|
||||||
|
this.$refs['dataForm'].resetFields()
|
||||||
|
if (this.resultCommentEditor === null) {
|
||||||
|
this.resultCommentEditor = new E('#resultCommentEditorElem')
|
||||||
|
this.resultCommentEditor.customConfig.uploadImgServer = '/uploadPicture'
|
||||||
|
this.resultCommentEditor.customConfig.uploadFileName = 'file'
|
||||||
|
this.resultCommentEditor.customConfig.uploadImgParams = ''
|
||||||
|
this.resultCommentEditor.customConfig.debug = true
|
||||||
|
this.resultCommentEditor.create()
|
||||||
|
}
|
||||||
|
const data = await getResultComment(this.recordResultId)
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.resultCommitId = data.resultComment.id
|
||||||
|
if (this.keyResultEditor !== null) {
|
||||||
|
this.resultCommentEditor.txt.html(data.resultComment.comment)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
alertInfo (msg) {
|
||||||
|
this.$message({
|
||||||
|
message: msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
commitRecord (status) {
|
||||||
|
commitApproval({
|
||||||
|
'recordResultId': this.recordResultId,
|
||||||
|
'resultComment': Base64.encode(this.resultCommentEditor.txt.html()),
|
||||||
|
'status': status,
|
||||||
|
'resultCommitId': this.resultCommitId
|
||||||
|
}).then(data => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.$emit('refreshDataList', this.recordResultId)
|
||||||
|
} else {
|
||||||
|
this.alertInfo(data.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
stringIsNull (str) {
|
||||||
|
if (typeof str === 'undefined' || str === null || str === '') {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -73,6 +73,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="type" header-align="center" align="center" label="类型">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="conatnt-name">
|
||||||
|
<span>{{ scope.row.type | getType }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="lastScore" header-align="center" align="center" label="最后得分"></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="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 prop="remark" header-align="center" align="center" label="备注"></el-table-column>
|
||||||
@ -114,7 +121,7 @@ export default {
|
|||||||
var date = new Date(val)
|
var date = new Date(val)
|
||||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
||||||
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
||||||
return date.getFullYear() + '-' + month + '-' + day
|
return date.getFullYear() + '-' + month
|
||||||
},
|
},
|
||||||
getStatusStr (status) {
|
getStatusStr (status) {
|
||||||
if (status === 0) {
|
if (status === 0) {
|
||||||
@ -127,6 +134,14 @@ export default {
|
|||||||
return '审批通过'
|
return '审批通过'
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
},
|
||||||
|
getType (value) {
|
||||||
|
if (value === 1) {
|
||||||
|
return '本月目标'
|
||||||
|
} else if (value === 2) {
|
||||||
|
return '结果'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@ -159,9 +174,10 @@ export default {
|
|||||||
dataListSelections: [],
|
dataListSelections: [],
|
||||||
stateList: [
|
stateList: [
|
||||||
{value: '0', label: '新建'},
|
{value: '0', label: '新建'},
|
||||||
{value: '1', label: '审批中'},
|
{value: '1', label: '侍审批'},
|
||||||
{value: '2', label: '拒绝'},
|
{value: '2', label: '拒绝'},
|
||||||
{value: '3', label: '审批通过'}
|
{value: '3', label: '侍提交'},
|
||||||
|
{value: '4', label: '审批通过'}
|
||||||
],
|
],
|
||||||
departmentList1: [],
|
departmentList1: [],
|
||||||
departmentList2: [],
|
departmentList2: [],
|
||||||
@ -261,8 +277,8 @@ export default {
|
|||||||
this.dataListSelections = val
|
this.dataListSelections = val
|
||||||
},
|
},
|
||||||
//
|
//
|
||||||
addOrUpdateHandle (id, type) {
|
addOrUpdateHandle (id, recordType) {
|
||||||
this.$router.push({name: 'recorddetail', query: {id: id, type: type}}, () => {
|
this.$router.push({name: 'recorddetail', query: {id: id, recordType: recordType}}, () => {
|
||||||
this.mainTabsActiveName = this.$route.name
|
this.mainTabsActiveName = this.$route.name
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -84,12 +84,18 @@
|
|||||||
<el-button @click="getDataList()">查询</el-button>
|
<el-button @click="getDataList()">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<el-button type="primary" style="margin-bottom: 10px" @click="submitBt()">批量提交</el-button>
|
||||||
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
border
|
border
|
||||||
v-loading="dataListLoading"
|
v-loading="dataListLoading"
|
||||||
@selection-change="selectionChangeHandle"
|
@selection-change="selectionChangeHandle"
|
||||||
style="width: 100%;">
|
:cell-style="cellStyle"
|
||||||
|
style="width: 100%;" >
|
||||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
<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="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="departmentName" header-align="center" align="center" label="部门名称"></el-table-column>
|
||||||
@ -118,8 +124,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>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -138,11 +143,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import AddOrUpdate from './lzresultrecord-add-or-update'
|
import AddOrUpdate from './lzresultrecord-add-or-update'
|
||||||
import {apiGetResultRecordList, departmentQuery} from '@/api/api_result'
|
import {apiGetResultRecordList, departmentQuery, recordIdsSubmit} from '@/api/api_result'
|
||||||
import {getDataForMonth} from '@/utils'
|
import {getDataForMonth} from '@/utils'
|
||||||
import {isURL} from '@/utils/validate'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
filters: {
|
filters: {
|
||||||
@ -150,19 +153,29 @@ export default {
|
|||||||
var date = new Date(val)
|
var date = new Date(val)
|
||||||
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
|
||||||
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
|
||||||
return date.getFullYear() + '-' + month + '-' + day
|
return date.getFullYear() + '-' + month
|
||||||
},
|
},
|
||||||
getStatusStr (status) {
|
getStatusStr (status) {
|
||||||
if (status === 0) {
|
if (status === 0) {
|
||||||
return '新建'
|
return '新建'
|
||||||
} else if (status === 1) {
|
} else if (status === 1) {
|
||||||
return '审批中'
|
return '侍审批'
|
||||||
} else if (status === 2) {
|
} else if (status === 2) {
|
||||||
return '拒绝'
|
return '拒绝'
|
||||||
} else if (status === 3) {
|
} else if (status === 3) {
|
||||||
|
return '侍提交'
|
||||||
|
} else if (status === 4) {
|
||||||
return '审批通过'
|
return '审批通过'
|
||||||
}
|
}
|
||||||
return ''
|
return ''
|
||||||
|
},
|
||||||
|
getType (value) {
|
||||||
|
if (value === 1) {
|
||||||
|
return '本月目标'
|
||||||
|
} else if (value === 2) {
|
||||||
|
return '结果'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
@ -195,15 +208,16 @@ export default {
|
|||||||
dataListSelections: [],
|
dataListSelections: [],
|
||||||
stateList: [
|
stateList: [
|
||||||
{value: '0', label: '新建'},
|
{value: '0', label: '新建'},
|
||||||
{value: '1', label: '审批中'},
|
{value: '1', label: '侍审批'},
|
||||||
{value: '2', label: '拒绝'},
|
{value: '2', label: '拒绝'},
|
||||||
{value: '3', label: '审批通过'}
|
{value: '3', label: '侍提交'},
|
||||||
|
{value: '4', label: '审批通过'}
|
||||||
],
|
],
|
||||||
departmentList1: [],
|
departmentList1: [],
|
||||||
departmentList2: [],
|
departmentList2: [],
|
||||||
departmentList3: [],
|
departmentList3: [],
|
||||||
addOrUpdateVisible: false
|
addOrUpdateVisible: false,
|
||||||
|
recordIdsSelect: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
@ -223,6 +237,35 @@ export default {
|
|||||||
this.dataForm.endDate = dataList[1]
|
this.dataForm.endDate = dataList[1]
|
||||||
this.onSubmit()
|
this.onSubmit()
|
||||||
},
|
},
|
||||||
|
handleSelectionChange (val) {
|
||||||
|
this.multipleSelection = val
|
||||||
|
this.recordIdsSelect = []
|
||||||
|
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||||
|
this.recordIdsSelect.push(this.multipleSelection[i].goodId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
alertInfo (msg) {
|
||||||
|
this.$message({
|
||||||
|
message: msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 3000,
|
||||||
|
onClose: () => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submitBt (msg = '你确定要提交吗?') {
|
||||||
|
this.$confirm(msg, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
recordIdsSubmit({
|
||||||
|
'recordIds': this.recordIdsSelect.join(',')
|
||||||
|
}).then(data => {
|
||||||
|
this.alertInfo(data.msg)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
async changeDepartment (i) {
|
async changeDepartment (i) {
|
||||||
let departmentId = 0
|
let departmentId = 0
|
||||||
if (i === '2') {
|
if (i === '2') {
|
||||||
@ -259,7 +302,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': 2
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataList = data.page.list
|
this.dataList = data.page.list
|
||||||
@ -278,6 +322,13 @@ export default {
|
|||||||
this.dataForm.beginDate = data[0]
|
this.dataForm.beginDate = data[0]
|
||||||
this.dataForm.endDate = data[1]
|
this.dataForm.endDate = data[1]
|
||||||
},
|
},
|
||||||
|
cellStyle ({row, column, rowIndex, columnIndex}) {
|
||||||
|
if (columnIndex === 5 && row.status === 3) {
|
||||||
|
return 'color:blue!important;'
|
||||||
|
} else {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
},
|
||||||
// 每页数
|
// 每页数
|
||||||
sizeChangeHandle (val) {
|
sizeChangeHandle (val) {
|
||||||
this.pageSize = val
|
this.pageSize = val
|
||||||
@ -294,10 +345,13 @@ export default {
|
|||||||
// 多选
|
// 多选
|
||||||
selectionChangeHandle (val) {
|
selectionChangeHandle (val) {
|
||||||
this.dataListSelections = val
|
this.dataListSelections = val
|
||||||
|
this.recordIdsSelect = []
|
||||||
|
for (let i = 0; i < this.dataListSelections.length; i++) {
|
||||||
|
this.recordIdsSelect.push(this.dataListSelections[i].id)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//
|
addOrUpdateHandle (id, recordType) {
|
||||||
addOrUpdateHandle (id) {
|
this.$router.push({name: 'recorddetail', query: {id: id, recordType: recordType}}, () => {
|
||||||
this.$router.push({name: 'recorddetail',query: {id}}, () => {
|
|
||||||
this.mainTabsActiveName = this.$route.name
|
this.mainTabsActiveName = this.$route.name
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -334,3 +388,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
.contentEdit {
|
||||||
|
color: blue;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.btn-box{
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -5,41 +5,46 @@
|
|||||||
:visible.sync="visible">
|
:visible.sync="visible">
|
||||||
<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="目标/指标" v-show="auth.target >= 1" prop="target">
|
||||||
<el-input :disabled="false" v-model="dataForm.target" placeholder="目标/指标"></el-input>
|
<el-input :disabled="auth.target<2" v-model="dataForm.target" placeholder="目标/指标"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关键结果" prop="keyResult">
|
<el-form-item label="关键结果" v-show="auth.keyResult >= 1 && this.type == 1 " 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 v-show="auth.checkWeight>=1" label="考核权重" prop="checkWeight">
|
||||||
<el-input v-model="dataForm.checkWeight" placeholder="考核权重"></el-input>
|
<el-input v-model="dataForm.checkWeight" :disabled="auth.checkWeight<2" placeholder="考核权重"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="考核结果" prop="checkResult">
|
|
||||||
|
<el-form-item label="考核结果" v-show="auth.checkResult >= 1" prop="checkResult">
|
||||||
<div id="checkResultEditorElem" class="editor"></div>
|
<div id="checkResultEditorElem" class="editor"></div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="上级评分">
|
<el-form-item label="优先级" v-show="auth.priority >= 1" prop="priority">
|
||||||
<el-select v-model="dataForm.superScore" placeholder="请选择" @change="changeSuperScore()" >
|
<el-input :disabled="auth.priority < 2 " v-model="dataForm.priority" placeholder="优先级别,数字越大,越在排列在表格前面"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="上级评分" v-show="auth.superScore >= 1">
|
||||||
|
<el-select v-model="dataForm.acquireScore" :disabled="auth.superScore < 2" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in superScore"
|
v-for="item in superScoreData"
|
||||||
:key="item.score"
|
:key="item.score"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.label"
|
:value="item.score"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="得分" prop="acquireScore">
|
<el-form-item label="得分" prop="acquireScore" v-show="auth.acquireScore == 1">
|
||||||
<template >
|
<template>
|
||||||
<div style="color: red" class="conatnt-name" v-model="dataForm.acquireScore">
|
<div style="color: red" class="conatnt-name">
|
||||||
<span>{{ this.dataForm.acquireScore }}</span>
|
<span>{{ acquireScore }}</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="评分说明" v-show="auth.scoreComment >= 1" prop="scoreComment">
|
||||||
<el-form-item v-show="true" label="评分说明" prop="scoreComment">
|
<div id="scoreCommentEditorElem" class="editor"></div>
|
||||||
<el-input v-model="dataForm.scoreComment" placeholder="评分说明(直属上级填写)"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
@ -80,25 +85,56 @@ export default {
|
|||||||
}
|
}
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
var validPriority = async (rule, value, callback) => {
|
||||||
|
if (!value) {
|
||||||
|
callback(new Error('优先级不能为空'))
|
||||||
|
}
|
||||||
|
if (!/^(0|[1-9][0-9]*)$/.test(value)) {
|
||||||
|
callback(new Error('请输入大于或等于0的整数'))
|
||||||
|
}
|
||||||
|
callback()
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
keyResultEditor: null,
|
keyResultEditor: null,
|
||||||
checkResultEditor: null,
|
checkResultEditor: null,
|
||||||
recordResultId: null,
|
recordResultId: null,
|
||||||
|
scoreCommentEditor: null,
|
||||||
|
auth: [],
|
||||||
|
recordType: 0,
|
||||||
type: 0,
|
type: 0,
|
||||||
superScore: [{
|
superScoreData: [{
|
||||||
|
score: 0,
|
||||||
|
label: ' '
|
||||||
|
}, {
|
||||||
score: 4,
|
score: 4,
|
||||||
label: '4分-卓越'
|
label: '4分-卓越'
|
||||||
|
}, {
|
||||||
|
score: 3.875,
|
||||||
|
label: '3.75(+)-优秀'
|
||||||
}, {
|
}, {
|
||||||
score: 3.75,
|
score: 3.75,
|
||||||
label: '3.75分-优秀'
|
label: '3.75分-合格'
|
||||||
|
}, {
|
||||||
|
score: 3.667,
|
||||||
|
label: '3.75(-)-优秀'
|
||||||
|
}, {
|
||||||
|
score: 3.583,
|
||||||
|
label: '3.5(+)-合格'
|
||||||
|
}, {
|
||||||
|
score: 3.583,
|
||||||
|
label: '3.5(+)-合格'
|
||||||
}, {
|
}, {
|
||||||
score: 3.5,
|
score: 3.5,
|
||||||
label: '3.5分-合格'
|
label: '3.5分-合格'
|
||||||
|
}, {
|
||||||
|
score: 3.375,
|
||||||
|
label: '3.5(-)-合格'
|
||||||
}, {
|
}, {
|
||||||
score: 3.25,
|
score: 3.25,
|
||||||
label: '3.25分-不合格,待改进'
|
label: '3.25分-不合格,待改进'
|
||||||
}],
|
}
|
||||||
|
],
|
||||||
dataForm: {
|
dataForm: {
|
||||||
id: 0,
|
id: 0,
|
||||||
target: '',
|
target: '',
|
||||||
@ -107,7 +143,8 @@ export default {
|
|||||||
checkResult: '',
|
checkResult: '',
|
||||||
superScore: '',
|
superScore: '',
|
||||||
acquireScore: '',
|
acquireScore: '',
|
||||||
scoreComment: ''
|
scoreComment: '',
|
||||||
|
priority: ''
|
||||||
},
|
},
|
||||||
dataRule: {
|
dataRule: {
|
||||||
scoreComment: [
|
scoreComment: [
|
||||||
@ -115,6 +152,9 @@ export default {
|
|||||||
],
|
],
|
||||||
checkWeight: [
|
checkWeight: [
|
||||||
{validator: validNum, required: true, trigger: 'blur'}
|
{validator: validNum, required: true, trigger: 'blur'}
|
||||||
|
],
|
||||||
|
priority: [
|
||||||
|
{validator: validPriority, required: true, trigger: 'blur'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -123,13 +163,18 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
acquireScore () {
|
||||||
|
const score1 = this.superScoreData.filter(i => this.dataForm.acquireScore === i.score)
|
||||||
|
return score1.length > 0 ? score1[0].score : 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async init (id, type, recordResultId) {
|
async init (id, type, recordResultId, auth, recordType) {
|
||||||
this.type = type
|
this.type = type
|
||||||
this.recordResultId = recordResultId
|
this.recordResultId = recordResultId
|
||||||
|
this.auth = auth
|
||||||
|
this.recordType = recordType
|
||||||
this.dataForm.id = id || 0
|
this.dataForm.id = id || 0
|
||||||
|
|
||||||
let data = await weightCheck({
|
let data = await weightCheck({
|
||||||
'recordResultId': this.recordResultId,
|
'recordResultId': this.recordResultId,
|
||||||
'type': this.type,
|
'type': this.type,
|
||||||
@ -146,6 +191,15 @@ export default {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (this.keyResultEditor !== null) {
|
||||||
|
this.keyResultEditor.txt.html('')
|
||||||
|
}
|
||||||
|
if (this.checkResultEditor !== null) {
|
||||||
|
this.checkResultEditor.txt.html('')
|
||||||
|
}
|
||||||
|
if (this.scoreCommentEditor !== null) {
|
||||||
|
this.scoreCommentEditor.txt.html('')
|
||||||
|
}
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
this.$refs['dataForm'].resetFields()
|
this.$refs['dataForm'].resetFields()
|
||||||
@ -156,7 +210,9 @@ 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.auth.keyResult < 2) {
|
||||||
|
this.keyResultEditor.$textElem.attr('contenteditable', false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (this.checkResultEditor === null) {
|
if (this.checkResultEditor === null) {
|
||||||
this.checkResultEditor = new E('#checkResultEditorElem')
|
this.checkResultEditor = new E('#checkResultEditorElem')
|
||||||
@ -165,57 +221,135 @@ 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.auth.checkResult < 2) {
|
||||||
|
this.checkResultEditor.$textElem.attr('contenteditable', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.scoreCommentEditor === null) {
|
||||||
|
this.scoreCommentEditor = new E('#scoreCommentEditorElem')
|
||||||
|
this.scoreCommentEditor.customConfig.uploadImgServer = '/uploadPicture'
|
||||||
|
this.scoreCommentEditor.customConfig.uploadFileName = 'file'
|
||||||
|
this.scoreCommentEditor.customConfig.uploadImgParams = ''
|
||||||
|
this.scoreCommentEditor.customConfig.debug = true
|
||||||
|
this.scoreCommentEditor.create()
|
||||||
|
if (this.auth.scoreComment < 2) {
|
||||||
|
this.scoreCommentEditor.$textElem.attr('contenteditable', false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.dataForm.id && this.dataForm.id > 0) {
|
if (this.dataForm.id && this.dataForm.id > 0) {
|
||||||
const data = await apiDetailInfo(this.dataForm.id)
|
const data = await apiDetailInfo(this.dataForm.id)
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.dataForm.target = data.detailInfo.target
|
this.dataForm = data.detailInfo
|
||||||
this.dataForm.keyResult = data.detailInfo.keyResult
|
if (this.keyResultEditor !== null) {
|
||||||
this.dataForm.checkWeight = data.detailInfo.checkWeight
|
this.keyResultEditor.txt.html(this.dataForm.keyResult || '')
|
||||||
this.dataForm.checkResult = data.detailInfo.checkResult
|
}
|
||||||
this.dataForm.superScore = data.detailInfo.superScore
|
if (this.checkResultEditor !== null) {
|
||||||
this.dataForm.acquireScore = data.detailInfo.acquireScore
|
this.checkResultEditor.txt.html(this.dataForm.checkResult || '')
|
||||||
this.dataForm.scoreComment = data.detailInfo.scoreComment
|
}
|
||||||
this.keyResultEditor.txt.html(this.dataForm.keyResult || '')
|
if (this.scoreCommentEditor !== null) {
|
||||||
this.checkResultEditor.txt.html(this.dataForm.checkResult || '')
|
this.scoreCommentEditor.txt.html(this.dataForm.scoreComment || '')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeSuperScore () {
|
changeSuperScore () {
|
||||||
let value = this.dataForm.superScore
|
|
||||||
value = value.replace(/[\u4e00-\u9fa5]/g, '')
|
|
||||||
value = value.replace('-', '')
|
|
||||||
value = value.replace(',', '')
|
|
||||||
this.dataForm.acquireScore = value
|
|
||||||
},
|
},
|
||||||
dataFormSubmit () {
|
alertInfo (msg) {
|
||||||
this.$refs['dataForm'].validate((valid) => {
|
this.$message({
|
||||||
if (valid) {
|
message: msg,
|
||||||
recorddetailAddOrUpdate({
|
type: 'success',
|
||||||
'id': this.dataForm.id || undefined,
|
duration: 1500,
|
||||||
'type': this.type,
|
onClose: () => {
|
||||||
'target': this.dataForm.target,
|
}
|
||||||
'keyResult': Base64.encode(this.keyResultEditor.txt.html()),
|
})
|
||||||
'checkWeight': this.dataForm.checkWeight,
|
},
|
||||||
'checkResult': Base64.encode(this.checkResultEditor.txt.html()),
|
stringIsNull (str) {
|
||||||
'superScore': this.dataForm.superScore,
|
if (typeof str === 'undefined' || str === null || str === '') {
|
||||||
'acquireScore': this.dataForm.acquireScore,
|
return true
|
||||||
'scoreComment': this.dataForm.scoreComment,
|
}
|
||||||
'recordId': this.recordResultId
|
return false
|
||||||
}).then(res => {
|
},
|
||||||
if (res && res.code === 0) {
|
async dataFormSubmit () {
|
||||||
this.$message({
|
if (this.auth.target === 2) {
|
||||||
message: '操作成功',
|
if (this.stringIsNull(this.dataForm.target)) {
|
||||||
type: 'success',
|
this.alertInfo('目标不能为空')
|
||||||
duration: 1500,
|
return
|
||||||
onClose: () => {
|
}
|
||||||
this.visible = false
|
}
|
||||||
this.$emit('refreshDataList')
|
if (this.auth.keyResult === 2 && this.type === 1) {
|
||||||
}
|
if (this.stringIsNull(this.keyResultEditor.txt.html())) {
|
||||||
})
|
this.alertInfo('关键结果不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.auth.checkWeight === 2) {
|
||||||
|
if (this.stringIsNull(this.dataForm.checkWeight)) {
|
||||||
|
this.alertInfo('权重不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let data = await weightCheck({
|
||||||
|
'recordResultId': this.recordResultId,
|
||||||
|
'weight': this.dataForm.checkWeight,
|
||||||
|
'type': this.type,
|
||||||
|
'id': this.dataForm.id
|
||||||
|
})
|
||||||
|
if (data && data.code !== 0) {
|
||||||
|
this.alertInfo(data.msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.auth.checkResult === 2) {
|
||||||
|
if (this.stringIsNull(this.checkResultEditor.txt.html())) {
|
||||||
|
this.alertInfo('考核结果不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.auth.superScore === 2) {
|
||||||
|
if (this.stringIsNull(this.dataForm.superScore)) {
|
||||||
|
this.alertInfo('上级评分不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.auth.scoreComment === 2) {
|
||||||
|
if (this.dataForm.acquireScore !== 3.5 || this.dataForm.acquireScore !== 3.75) {
|
||||||
|
if (this.stringIsNull(this.scoreCommentEditor.txt.html())) {
|
||||||
|
this.alertInfo('评分说明不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.auth.priority === 2) {
|
||||||
|
if (this.stringIsNull(this.dataForm.priority)) {
|
||||||
|
this.alertInfo('优先级不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const score1 = this.superScoreData.filter(i => this.dataForm.acquireScore === i.score)
|
||||||
|
const superScore1 = score1[0].label
|
||||||
|
recorddetailAddOrUpdate({
|
||||||
|
'id': this.dataForm.id || undefined,
|
||||||
|
'type': this.type,
|
||||||
|
'target': this.dataForm.target,
|
||||||
|
'keyResult': Base64.encode(this.keyResultEditor.txt.html()),
|
||||||
|
'checkWeight': this.dataForm.checkWeight,
|
||||||
|
'checkResult': Base64.encode(this.checkResultEditor.txt.html()),
|
||||||
|
'superScore': superScore1,
|
||||||
|
'acquireScore': this.dataForm.acquireScore,
|
||||||
|
'scoreComment': Base64.encode(this.scoreCommentEditor.txt.html()),
|
||||||
|
'recordId': this.recordResultId,
|
||||||
|
'recordType': this.recordType,
|
||||||
|
'priority': this.priority
|
||||||
|
}).then(res => {
|
||||||
|
if (res && res.code === 0) {
|
||||||
|
this.$message({
|
||||||
|
message: '操作成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
this.visible = false
|
||||||
|
this.$emit('refreshDataList', res.recordId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,20 +26,21 @@
|
|||||||
|
|
||||||
<div class="titleBottom">
|
<div class="titleBottom">
|
||||||
<div class="bottom" v-show="this.auth.commit == 1" >
|
<div class="bottom" v-show="this.auth.commit == 1" >
|
||||||
<p> <span style="cursor: pointer">提交审批</span></p>
|
<p><span style="cursor: pointer" @click="commitApprovalYes('你确认要提交审批吗?')">提交审批</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bottom" v-show="this.auth.approvel == 1" >
|
<div class="bottom" v-show="this.auth.approvel == 1">
|
||||||
<p> <span style="cursor: pointer">审批通过</span></p>
|
<p><span style="cursor: pointer" @click="commitApprovalAddOrUpdate">审批</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bottom" v-show="this.auth.confirmCommit == 1" >
|
<div class="bottom" v-show="this.auth.confirmCommit == 1">
|
||||||
<p> <span style="cursor: pointer">确认得分</span></p>
|
<p><span style="cursor: pointer" @click="commitApprovalYes('你要确认得分吗?')">确认得分</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="bottom" v-show="this.auth.reject == 1" >
|
<div class="bottom" v-show="this.auth.reject == 1">
|
||||||
<p> <span style="cursor: pointer;color: red">驳回</span></p>
|
<p><span style="cursor: pointer">驳回</span></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -50,7 +51,7 @@
|
|||||||
v-loading.body="loading"
|
v-loading.body="loading"
|
||||||
element-loading-text="Loading" border fit highlight-current-row>
|
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="checkRange" align="center" width="80"></el-table-column>
|
||||||
<el-table-column label="目标/指标" prop="target" align="center" width="200">
|
<el-table-column label="目标/指标" prop="target" align="left" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-html="scope.row.target" class="rich">
|
<div v-html="scope.row.target" class="rich">
|
||||||
</div>
|
</div>
|
||||||
@ -85,35 +86,33 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="评分说明(直属上级填写)" width="300" prop="scoreComment"></el-table-column>
|
<el-table-column label="评分说明(直属上级填写)" width="300" prop="scoreComment">
|
||||||
|
|
||||||
<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 && auth.add == 1 ">添加</el-button>
|
<div v-html="scope.row.scoreComment" class="rich">
|
||||||
<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>
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column width="80" label="操作" v-if="(auth.add === 1 || auth.edit == 1) && hasOperator" align="center" fixed="right">
|
||||||
|
<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 && 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.isEdit > 0 && auth.edit == 1">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
|
||||||
<!-- 弹窗, 新增 / 修改 -->
|
<!-- 弹窗, 新增 / 修改 -->
|
||||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||||
|
<approval-add-or-update v-if="approvalVisible" ref="approvalAddOrUpdate" @refreshDataList="getDataList"></approval-add-or-update>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getStaffResultDetail} from '@/api/api_result'
|
import {getStaffResultDetail, commitApproval} from '@/api/api_result'
|
||||||
import AddOrUpdate from './recorddetail-add-or-update'
|
import AddOrUpdate from './recorddetail-add-or-update'
|
||||||
|
import ApprovalAddOrUpdate from './approval-add-or-update.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
created () {
|
created () {
|
||||||
this.recordResultId = this.$route.query.id
|
|
||||||
this.type = this.$route.query.type
|
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
getcheckWeightStr (val) {
|
getcheckWeightStr (val) {
|
||||||
@ -138,13 +137,13 @@ export default {
|
|||||||
return {
|
return {
|
||||||
active: 3,
|
active: 3,
|
||||||
type: 1,
|
type: 1,
|
||||||
|
hasOperator: false,
|
||||||
recordResultId: 0,
|
recordResultId: 0,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
firstRowspan: 5,
|
yeJiCheckNum: 4,
|
||||||
secondRowspan: 6,
|
wenHuaJiaZhiGuanNum: 2,
|
||||||
threeRowspan: 8,
|
lastResultNum: 2,
|
||||||
fourRowspan: 9,
|
commentNum: 1,
|
||||||
fiveRowspan: 10,
|
|
||||||
checkMonth: '2020-03-21',
|
checkMonth: '2020-03-21',
|
||||||
staffName: '瞿贻晓',
|
staffName: '瞿贻晓',
|
||||||
department1: '业务中台',
|
department1: '业务中台',
|
||||||
@ -152,30 +151,34 @@ export default {
|
|||||||
department3: '技术部门',
|
department3: '技术部门',
|
||||||
superStaff: '吴林',
|
superStaff: '吴林',
|
||||||
addOrUpdateVisible: false,
|
addOrUpdateVisible: false,
|
||||||
|
approvalVisible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
auth: [],
|
auth: [],
|
||||||
authId: 0
|
recordType: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
AddOrUpdate
|
AddOrUpdate,
|
||||||
|
ApprovalAddOrUpdate
|
||||||
},
|
},
|
||||||
activated () {
|
activated () {
|
||||||
|
this.recordResultId = this.$route.query.id
|
||||||
|
this.recordType = this.$route.query.recordType
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDataList () {
|
getDataList (id = this.recordResultId) {
|
||||||
|
this.recordResultId = id
|
||||||
getStaffResultDetail({
|
getStaffResultDetail({
|
||||||
'recordResultId': this.recordResultId,
|
'recordResultId': id,
|
||||||
'type': this.type
|
'recordType': this.recordType
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
if (data && data.code === 0) {
|
if (data && data.code === 0) {
|
||||||
this.tableData = data.list
|
this.tableData = data.list
|
||||||
this.firstRowspan = data.firstRowspan
|
this.yeJiCheckNum = data.yeJiCheckNum
|
||||||
this.secondRowspan = data.secondRowspan
|
this.wenHuaJiaZhiGuanNum = data.wenHuaJiaZhiGuanNum
|
||||||
this.threeRowspan = data.threeRowspan
|
this.lastResultNum = data.lastResultNum
|
||||||
this.fourRowspan = data.fourRowspan
|
this.commentNum = data.commentNum
|
||||||
this.fiveRowspan = data.fiveRowspan
|
|
||||||
this.checkMonth = data.checkMonth
|
this.checkMonth = data.checkMonth
|
||||||
this.staffName = data.staffName
|
this.staffName = data.staffName
|
||||||
this.department1 = data.department1
|
this.department1 = data.department1
|
||||||
@ -183,12 +186,17 @@ export default {
|
|||||||
this.department3 = data.department3
|
this.department3 = data.department3
|
||||||
this.superStaff = data.superStaff
|
this.superStaff = data.superStaff
|
||||||
this.auth = data.auth
|
this.auth = data.auth
|
||||||
this.authId = data.authId
|
this.recordType = data.recordType
|
||||||
|
this.recordResultId = data.recordResultId
|
||||||
|
if (this.tableData.find(item => item.isAdd === 1 || item.isEdit === 1)) {
|
||||||
|
this.hasOperator = true
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.tableData = []
|
this.tableData = []
|
||||||
}
|
}
|
||||||
this.dataListLoading = false
|
this.dataListLoading = false
|
||||||
this.addOrUpdateVisible = false
|
this.addOrUpdateVisible = false
|
||||||
|
this.approvalVisible = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 新增 / 编辑
|
// 新增 / 编辑
|
||||||
@ -196,33 +204,66 @@ export default {
|
|||||||
this.addOrUpdateVisible = true
|
this.addOrUpdateVisible = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$refs.addOrUpdate.init(id, type, this.recordResultId)
|
this.$refs.addOrUpdate.init(id, type, this.recordResultId, this.auth, this.recordType)
|
||||||
}, 500)
|
}, 500)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
commitApprovalAddOrUpdate () {
|
||||||
|
this.approvalVisible = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.approvalAddOrUpdate.init(this.recordResultId, this.auth)
|
||||||
|
}, 500)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
commitApprovalYes (msg = '确定要提交审批吗?') {
|
||||||
|
this.$confirm(msg, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
commitApproval({
|
||||||
|
'recordResultId': this.recordResultId,
|
||||||
|
'status': 2
|
||||||
|
}).then(data => {
|
||||||
|
if (data && data.code === 0) {
|
||||||
|
this.getDataList()
|
||||||
|
this.$message({
|
||||||
|
message: data.msg,
|
||||||
|
type: 'success',
|
||||||
|
duration: 1500,
|
||||||
|
onClose: () => {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}).catch(() => {
|
||||||
|
})
|
||||||
|
},
|
||||||
cellStyle ({row, column, rowIndex, columnIndex}) {
|
cellStyle ({row, column, rowIndex, columnIndex}) {
|
||||||
if (rowIndex === this.firstRowspan || rowIndex === this.threeRowspan) {
|
if (rowIndex === this.yeJiCheckNum || rowIndex === this.yeJiCheckNum + this.wenHuaJiaZhiGuanNum + 1 || rowIndex === this.yeJiCheckNum + this.wenHuaJiaZhiGuanNum + this.lastResultNum + 2) {
|
||||||
return 'background:#FFC400;font-weight:bolder!important;'
|
return 'background:#FFC400;font-weight:bolder!important;'
|
||||||
} else {
|
} else {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
objectSpanMethod ({row, column, rowIndex, columnIndex}) {
|
objectSpanMethod ({row, column, rowIndex, columnIndex}) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
if (rowIndex === 0) {
|
if (rowIndex === 0) {
|
||||||
return {
|
return {
|
||||||
rowspan: this.firstRowspan,
|
rowspan: this.yeJiCheckNum,
|
||||||
colspan: 1
|
colspan: 1
|
||||||
}
|
}
|
||||||
} else if (rowIndex === this.firstRowspan) {
|
} else if (rowIndex === this.yeJiCheckNum) {
|
||||||
|
|
||||||
} else if (rowIndex === this.secondRowspan) {
|
} else if (rowIndex === (this.yeJiCheckNum + 1)) {
|
||||||
return {
|
return {
|
||||||
rowspan: 2,
|
rowspan: 2,
|
||||||
colspan: 1
|
colspan: 1
|
||||||
}
|
}
|
||||||
} else if (rowIndex >= this.threeRowspan && rowIndex <= this.fiveRowspan) {
|
} else if (rowIndex >= (this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum) && rowIndex <= (this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum + this.lastResultNum)) {
|
||||||
|
|
||||||
|
} else if (rowIndex > this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum + this.lastResultNum) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
@ -231,7 +272,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rowIndex === this.firstRowspan) {
|
if (rowIndex === this.yeJiCheckNum) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
return [1, 2]
|
return [1, 2]
|
||||||
} else if (columnIndex === 1) {
|
} else if (columnIndex === 1) {
|
||||||
@ -239,22 +280,21 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rowIndex >= this.secondRowspan && rowIndex < this.threeRowspan) {
|
if (rowIndex >= this.yeJiCheckNum + 1 && rowIndex < this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum) {
|
||||||
if (columnIndex === 1) {
|
if (columnIndex === 1) {
|
||||||
return [1, 2]
|
return [1, 2]
|
||||||
} else if (columnIndex === 2) {
|
} else if (columnIndex === 2) {
|
||||||
return [0, 0]
|
return [0, 0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rowIndex === this.threeRowspan) {
|
if (rowIndex === this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum) {
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
return [1, 2]
|
return [1, 2]
|
||||||
} else if (columnIndex === 1) {
|
} else if (columnIndex === 1) {
|
||||||
return [0, 0]
|
return [0, 0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (rowIndex >= (this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum) && rowIndex <= this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum + this.lastResultNum) {
|
||||||
if (rowIndex >= this.fourRowspan && rowIndex <= this.fiveRowspan) {
|
|
||||||
if (columnIndex === 0) {
|
if (columnIndex === 0) {
|
||||||
return [1, 2]
|
return [1, 2]
|
||||||
} else if (columnIndex === 1) {
|
} else if (columnIndex === 1) {
|
||||||
@ -265,6 +305,15 @@ export default {
|
|||||||
return [0, 0]
|
return [0, 0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (rowIndex > this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum + this.lastResultNum) {
|
||||||
|
if (columnIndex === 0) {
|
||||||
|
return [1, 1]
|
||||||
|
} else if (columnIndex === 1) {
|
||||||
|
return [1, 7]
|
||||||
|
} else {
|
||||||
|
return [0, 0]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,7 +406,7 @@ export default {
|
|||||||
.bottom{
|
.bottom{
|
||||||
float: right;
|
float: right;
|
||||||
color: blue;
|
color: blue;
|
||||||
width: 100px;
|
width: 80px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
.des{
|
.des{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user