| | |
| | | <template> |
| | | <el-dialog title="执法详情" width="1000px" v-model="dialogVisible" @close="closeDialog"> |
| | | <el-form> |
| | | <el-form label-width="80px"> |
| | | <el-form-item label="投诉内容"> |
| | | |
| | | <div> |
| | | {{ info.complaintReason }} |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="办结"> |
| | | <el-radio-group> |
| | | <el-radio>驳回</el-radio> |
| | | <el-radio>办结</el-radio> |
| | | <el-radio-group v-model="form.complaintStatus"> |
| | | <el-radio value="-1">驳回</el-radio> |
| | | <el-radio value="2">办结</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="驳回原因"> |
| | | <el-input type="textarea" placeholder="请输入"></el-input> |
| | | <el-input type="textarea" placeholder="请输入" v-model="form.returnReason"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-button @click="closeDialog">关 闭</el-button> |
| | | <el-button @click="updateStatus" type="primary">确认</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ElMessage } from 'element-plus' |
| | | import { updComplaintLog } from "@/api/system/company/company" |
| | | const dialogVisible = ref(false) |
| | | function openDialog() { |
| | | const info = ref({}) |
| | | const form = ref({ |
| | | complaintStatus: "-1" |
| | | }) |
| | | function openDialog(item) { |
| | | info.value = item |
| | | dialogVisible.value = true |
| | | } |
| | | function closeDialog() { |
| | | dialogVisible.value = false |
| | | } |
| | | function updateStatus() { |
| | | if(form.value.complaintStatus == "-1" && !form.value.returnReason) { |
| | | ElMessage.error("请输入驳回原因") |
| | | return |
| | | } |
| | | info.value.complaintStatus = form.value.complaintStatus |
| | | info.value.returnReason = form.value.returnReason |
| | | updComplaintLog(info.value).then(val => { |
| | | if(val.code == 200){ |
| | | ElMessage.success("操作成功") |
| | | } |
| | | }) |
| | | } |
| | | defineExpose({ openDialog, closeDialog }) |
| | | </script> |