专家审核
This commit is contained in:
@ -16,6 +16,14 @@ export function expertDetail(data) {
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 专家审核操作
|
||||
export function expertExamine(data) {
|
||||
return request({
|
||||
url: '/admin/v1/manage/expert/examine',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 专家信息添加
|
||||
export function expertAdd(data) {
|
||||
return request({
|
||||
|
@ -3,13 +3,13 @@
|
||||
<div style="width: 50%">
|
||||
<ExpertForm v-model="form" :isAdd="false" ref="expertForm" />
|
||||
</div>
|
||||
<el-button>审核拒绝</el-button>
|
||||
<el-button type="primary" @click="submitForm">审核通过</el-button>
|
||||
<el-button @click="submitForm(3)">审核拒绝</el-button>
|
||||
<el-button type="primary" @click="submitForm(2)">审核通过</el-button>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ExpertForm from "@/views/components/ExpertForm";
|
||||
import { expertDetail, expertAdd } from "@/api/examine/expert";
|
||||
import { expertDetail, expertExamine } from "@/api/examine/expert";
|
||||
export default {
|
||||
components: {
|
||||
ExpertForm,
|
||||
@ -42,12 +42,32 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
submitForm(status) {
|
||||
if (this.$refs.expertForm.submitForm()) {
|
||||
console.log(this.form);
|
||||
// expertAdd(this.form).then((res) => {
|
||||
// console.log(res);
|
||||
// });
|
||||
const str =
|
||||
status == 2
|
||||
? "<span style='color:green'>通过</span>"
|
||||
: "<span style='color:red'>拒绝</span>";
|
||||
this.$prompt(`您将 ${str} 该数据审核,请输入处理备注`, "审核", {
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
closeOnClickModal: false,
|
||||
inputType: "textarea",
|
||||
})
|
||||
.then(({ value }) => {
|
||||
const query = {
|
||||
id: this.form.id,
|
||||
status,
|
||||
remark: value,
|
||||
};
|
||||
expertExamine(query).then((res) => {
|
||||
this.$store.dispatch("tagsView/delView", this.$route);
|
||||
this.$router.go(-1);
|
||||
this.$modal.msgSuccess("处理成功");
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
console.log("校验未通过");
|
||||
}
|
||||
|
@ -89,6 +89,7 @@
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.examine_status != 1"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
|
Reference in New Issue
Block a user