This commit is contained in:
wulin 2020-08-24 09:27:50 +08:00
commit caabe9c6e6
3 changed files with 35 additions and 11 deletions

View File

@ -4,10 +4,27 @@
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" label-width="80px">
<el-form-item label="回滚到">
<el-select v-model="dataForm.rollbackFlowId" placeholder="请选择">
<el-option
v-for="item in rollbackData"
:key="item.id"
:label="item.flowName"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<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>
@ -28,8 +45,12 @@ export default {
recordResultId: 0,
auth: [],
resultCommitId: 0,
type: 1,
rollbackData: [],
dataForm: {
resultComment: ''
resultComment: '',
robackFlowId: 0,
status: 1
},
dataRule: {}
}
@ -39,10 +60,12 @@ export default {
},
computed: {},
methods: {
async init (recordResultId, auth) {
async init (recordResultId, auth, type) {
this.recordResultId = recordResultId
this.auth = auth
this.visible = true
this.type = type
this.$nextTick(async () => {
this.$refs['dataForm'].resetFields()
if (this.resultCommentEditor === null) {
@ -56,6 +79,7 @@ export default {
const data = await getResultComment(this.recordResultId)
if (data && data.code === 0) {
this.resultCommitId = data.resultComment.id
this.rollbackData = data.list
if (this.keyResultEditor !== null) {
this.resultCommentEditor.txt.html(data.resultComment.comment)
}
@ -76,7 +100,9 @@ export default {
'recordResultId': this.recordResultId,
'resultComment': Base64.encode(this.resultCommentEditor.txt.html()),
'status': status,
'resultCommitId': this.resultCommitId
'resultCommitId': this.resultCommitId,
'type': this.type,
'rollbackFlowId':this.rollbackFlowId
}).then(data => {
if (data && data.code === 0) {
this.$emit('refreshDataList', this.recordResultId)

View File

@ -46,8 +46,8 @@
</el-form-item>
</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>
<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
:data="dataList"

View File

@ -14,7 +14,6 @@
<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>
@ -30,7 +29,7 @@
</div>
<div class="bottom" v-show="this.auth.approvel == 1">
<p><span style="cursor: pointer" @click="commitApprovalAddOrUpdate">审批</span></p>
<p><span style="cursor: pointer" @click="commitApprovalAddOrUpdate(1)">审批</span></p>
</div>
<div class="bottom" v-show="this.auth.confirmCommit == 1">
@ -38,9 +37,8 @@
</div>
<div class="bottom" v-show="this.auth.reject == 1">
<p><span style="cursor: pointer">驳回</span></p>
<p><span style="cursor: pointer" @click="commitApprovalAddOrUpdate(2)" >驳回</span></p>
</div>
</div>
</div>
@ -208,11 +206,11 @@ export default {
}, 500)
})
},
commitApprovalAddOrUpdate () {
commitApprovalAddOrUpdate (val) {
this.approvalVisible = true
this.$nextTick(() => {
setTimeout(() => {
this.$refs.approvalAddOrUpdate.init(this.recordResultId, this.auth)
this.$refs.approvalAddOrUpdate.init(this.recordResultId, this.auth, val)
}, 500)
})
},