This commit is contained in:
xiongchengqiang 2020-12-02 15:20:29 +08:00
parent bb87ee9ef0
commit 9e7bdc4d51
2 changed files with 83 additions and 70 deletions

View File

@ -1,70 +1,77 @@
<!-- --> <!-- -->
<template> <template>
<div> <div>
<div <div style="display:inline-block;margin:0 4px;"
style="display:inline-block;margin:0 4px;" v-for="(i,index) in authList.filter(i=>i.info)"
v-for="(i,index) in authList.filter(i=>i.info)" :key="index">
:key="index"> <el-button size="mini"
<el-button size="mini" v-if="info?info[i.permis]:formList.auth[i.permis]"
v-if="info?info[i.permis]:formList.auth[i.permis]" :disabled='formList[i.permis]===1'
:disabled='formList[i.permis]===1' @click="i.click"
@click="i.click" :plain='i.plain'
:plain='i.plain' type="primary">{{i.name}}</el-button>
type="primary">{{i.name}}</el-button> </div>
</div>
<!-- <el-button size="mini" v-if="!info" @click="handlePingfen" type="primary">开始评分</el-button> <!-- <el-button size="mini" v-if="!info" @click="handlePingfen" type="primary">开始评分</el-button>
<el-button size="mini" v-if="!info" @click="handleZhiding" type="primary">制定目标</el-button> <el-button size="mini" v-if="!info" @click="handleZhiding" type="primary">制定目标</el-button>
<el-button size="mini" v-if="!info" @click="handleTongyi" type="primary"> </el-button> <el-button size="mini" v-if="!info" @click="handleTongyi" type="primary"> </el-button>
<el-button size="mini" v-if="!info" @click="handleBohui" type="primary"> </el-button> <el-button size="mini" v-if="!info" @click="handleBohui" type="primary"> </el-button>
<el-button size="mini" v-if="info && formList.auth.tiaozhuang" :disabled='formList.auth.tiaozhuang===1' @click="handleJump" type="primary" plain>跳过</el-button> <el-button size="mini" v-if="info && formList.auth.tiaozhuang" :disabled='formList.auth.tiaozhuang===1' @click="handleJump" type="primary" plain>跳过</el-button>
<el-button size="mini" @click="handleZhuanjiao" type="primary" plain> </el-button> --> <el-button size="mini" @click="handleZhuanjiao" type="primary" plain> </el-button> -->
<!-- <el-button size="mini" v-if="info" @click="handleCuiban" type="warning" plain>催办</el-button> --> <!-- <el-button size="mini" v-if="info" @click="handleCuiban" type="warning" plain>催办</el-button> -->
<getPersonnel @cb='cb' v-if="isShowPersonnel" :isShow.sync='isShowPersonnel' :len='1'/> <getPersonnel @cb='cb'
<!-- 驳回 --> v-if="isShowPersonnel"
<popup-right :isShow.sync='isShowPersonnel'
v-if="bohui" :len='1' />
@cancel='handleCancel' <!-- 驳回 -->
@submit="handleSubmit" <popup-right v-if="bohui"
:footer='true' @cancel='handleCancel'
title="驳回" @submit="handleSubmit"
> :footer='true'
<div title="驳回">
slot="content" <div slot="content"
class="chooseManage" class="chooseManage">
> <el-form style="width:400px;"
<el-form style="width:400px;" :model="form" :rules="rules" ref="form" label-width="80px" class="demo-ruleForm"> :model="form"
<el-form-item label="驳回理由" > :rules="rules"
<el-input ref="form"
:rows="5" label-width="80px"
type="textarea" class="demo-ruleForm">
v-model="form.comment" <el-form-item label="驳回理由">
placeholder="请输入驳回理由" <el-input :rows="5"
maxlength="9999" type="textarea"
show-word-limit></el-input> v-model="form.comment"
</el-form-item> placeholder="请输入驳回理由"
</el-form> maxlength="9999"
</div> show-word-limit></el-input>
</el-form-item>
</el-form>
</div>
</popup-right> </popup-right>
<!-- 同意 --> <!-- 同意 -->
<el-dialog title="意见说明" :visible.sync="dialogFormVisible"> <el-dialog title="意见说明"
<el-form :model="form" ref="form"> :visible.sync="dialogFormVisible">
<el-form-item label="" > <el-form :model="form"
<el-input ref="form">
:rows="5" <el-form-item label="">
type="textarea" <el-input :rows="5"
v-model="form.comment" type="textarea"
placeholder="请输入意见说明" v-model="form.comment"
maxlength="9999" placeholder="请输入意见说明"
show-word-limit></el-input> maxlength="9999"
</el-form-item> show-word-limit></el-input>
</el-form> </el-form-item>
<div slot="footer" class="dialog-footer"> </el-form>
<el-button size="small" @click="dialogFormVisible = false"> </el-button> <div slot="footer"
<el-button size="small" type="primary" @click="handleAgree"> </el-button> class="dialog-footer">
</div> <el-button size="small"
@click="dialogFormVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="handleAgree"> </el-button>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -90,6 +97,12 @@ export default {
info: !this.info, info: !this.info,
permis: 'resultInput', permis: 'resultInput',
click: this.handleJieguo click: this.handleJieguo
}, {
name: '修改目标',
type: 'primary',
info: !this.info,
permis: 'changeResult',
click: this.handleJieguo
}, },
{ {
name: '开始评分', name: '开始评分',
@ -167,17 +180,17 @@ export default {
PopupRight PopupRight
}, },
computed: {}, computed: {},
beforeMount () {}, beforeMount () { },
mounted () { mounted () {
}, },
methods: { methods: {
// //
handleJieguo () { handleJieguo () {
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {result: true})) this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, { result: true }))
}, },
// //
handlePingfen () { handlePingfen () {
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {score: true})) this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, { score: true }))
}, },
// //
handleTongyi () { handleTongyi () {
@ -185,7 +198,7 @@ export default {
}, },
async handleAgree () { async handleAgree () {
this.$loadingStart() this.$loadingStart()
let res = await this.handlApiSaveapproval({status: 1, menuName: '同意了'}) let res = await this.handlApiSaveapproval({ status: 1, menuName: '同意了' })
this.$loadingEnd() this.$loadingEnd()
this.dialogFormVisible = !!res this.dialogFormVisible = !!res
}, },
@ -202,9 +215,9 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(async () => { }).then(async () => {
const obj = {status: 3, menuName: '催办了'} const obj = { status: 3, menuName: '催办了' }
if (this.info) obj.flowRecordId = this.info.flowRecordId if (this.info) obj.flowRecordId = this.info.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
this.$loadingStart() this.$loadingStart()
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
this.$loadingEnd() this.$loadingEnd()
@ -233,10 +246,10 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(async () => { }).then(async () => {
const obj = {status: 4, menuName: '跳过了'} const obj = { status: 4, menuName: '跳过了' }
if (this.info) obj.flowRecordId = this.info.flowRecordId if (this.info) obj.flowRecordId = this.info.flowRecordId
if (this.$attrs.flowRecordId) obj.flowRecordId = this.$attrs.flowRecordId if (this.$attrs.flowRecordId) obj.flowRecordId = this.$attrs.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
this.$loadingStart() this.$loadingStart()
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
this.$loadingEnd() this.$loadingEnd()
@ -272,7 +285,7 @@ export default {
}, },
async handleSubmit () { async handleSubmit () {
this.$loadingStart() this.$loadingStart()
let res = await this.handlApiSaveapproval({status: 5, menuName: '驳回了'}) let res = await this.handlApiSaveapproval({ status: 5, menuName: '驳回了' })
this.$loadingEnd() this.$loadingEnd()
this.bohui = !!res this.bohui = !!res
}, },
@ -280,11 +293,11 @@ export default {
this.bohui = false this.bohui = false
}, },
async cb (info) { async cb (info) {
const obj = {status: 8, menuName: '转交了', transferStaffId: info.value} const obj = { status: 8, menuName: '转交了', transferStaffId: info.value }
if (this.info) { if (this.info) {
obj.flowRecordId = this.info.flowRecordId obj.flowRecordId = this.info.flowRecordId
} else if (this.formList.flowRecordId !== 0) obj.flowRecordId = this.formList.flowRecordId } else if (this.formList.flowRecordId !== 0) obj.flowRecordId = this.formList.flowRecordId
const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
@ -301,7 +314,7 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$refs.form.validate(async v => { this.$refs.form.validate(async v => {
if (v) { if (v) {
const params = Object.assign({}, this.form, {resultRecordId: this.resultRecordId || ''}, obj) const params = Object.assign({}, this.form, { resultRecordId: this.resultRecordId || '' }, obj)
let res = await apiSaveapproval(params) let res = await apiSaveapproval(params)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)

View File

@ -59,10 +59,10 @@ export default {
optType: -1 optType: -1
} }
] ]
this.listinfo = this.form.roleDtos.map(j => { this.listinfo = JSON.parse(JSON.stringify(this.form.roleDtos.map(j => {
j.checked = this.form.chartDetails.recordSimpleDtos[0].roleIds ? this.form.chartDetails.recordSimpleDtos[0].roleIds.includes(String(j.roleId)) : false j.checked = this.form.chartDetails.recordSimpleDtos[0].roleIds ? this.form.chartDetails.recordSimpleDtos[0].roleIds.includes(String(j.roleId)) : false
return j return j
}) })))
console.log(this.form.roleDtos) console.log(this.form.roleDtos)
}, },
methods: { methods: {