<template>
|
<win-sm :title="setting.title" @close="close">
|
<el-form ref="ruleForm" :model="formData" :rules="rules" class="demo-ruleForm" label-width="100px">
|
<el-form-item label="审核结果" prop="auditStatus">
|
<el-radio-group v-model="formData.auditStatus">
|
<el-radio :label="2" border>通过</el-radio>
|
<el-radio :label="1" border>不通过</el-radio>
|
</el-radio-group>
|
</el-form-item>
|
<el-form-item label="备注" prop="auditReason">
|
<el-input
|
v-model="formData.auditReason"
|
type="textarea"
|
:rows="3"
|
maxlength="200"
|
show-word-limit
|
/>
|
</el-form-item>
|
</el-form>
|
<div slot="footer" align="center" class="dialog-footer">
|
<my-button name="取消" site="form" @click="close"/>
|
<my-button name="提交" site="form" @click="save"/>
|
</div>
|
</win-sm>
|
</template>
|
|
<script>
|
import winSm from '@/components/win/win-sm'
|
import myButton from '@/components/myButton/myButton'
|
import * as audit from '@/api/projectManage/audit'
|
export default {
|
name: 'edit',
|
components: { winSm, myButton },
|
props: {
|
setting: {
|
type: Object,
|
default: () => {
|
}
|
}
|
},
|
data() {
|
return {
|
formData: {
|
id: null,
|
sourceStatus: null,
|
auditStatus: 2,
|
auditReason: '',
|
},
|
rules: {
|
auditStatus: [
|
{required: true, message: '请选择审核结果', trigger: 'change'}
|
],
|
}
|
}
|
},
|
created() {
|
this.formData.id = this.setting.id
|
this.formData.sourceStatus = this.setting.sourceStatus
|
},
|
methods: {
|
close() {
|
this.$emit('close')
|
},
|
save() {
|
this.$refs.ruleForm.validate((valid) => {
|
if (valid) {
|
const params = this.formData
|
audit.auditUpd(params).then(res=>{
|
this.$message.success('提交成功')
|
this.close()
|
this.$emit('search')
|
})
|
} else {
|
this.$message.error('校验未通过,请检查。')
|
}
|
})
|
}
|
}
|
}
|
</script>
|