Commit d69d7170 authored by 方建宇's avatar 方建宇

修改话题审核

parent 5b88fcbf
...@@ -21,5 +21,5 @@ const yesOrNo = [ ...@@ -21,5 +21,5 @@ const yesOrNo = [
const isExam = [ const isExam = [
{ value: '0', label: '待审核' }, { value: '0', label: '待审核' },
{ value: '1', label: '已通过' }, { value: '1', label: '已通过' },
{ value: '2', label: '已审核' } { value: '2', label: '已驳回' }
] ]
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
</template> </template>
</el-table-column>--> </el-table-column>-->
<el-table-column align="center" label="操作" min-width="160"> <el-table-column align="center" label="操作" min-width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-has-permi="hasDetailPerm" v-has-permi="hasDetailPerm"
...@@ -123,28 +123,29 @@ ...@@ -123,28 +123,29 @@
:size="commonField.size" :size="commonField.size"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>编辑</el-button> >编辑</el-button>
<el-dropdown
v-if="scope.row.examStatus !== '1'"
@command="handleExamOrNoExam(scope.row, $event)"
style="margin-left: 10px;margin-right:10px ;"
>
<el-button <el-button
v-show="scope.row.examStatus !== '1'" :class="commonField.resetPasClass"
:class="commonField.resetPasClass" :type="commonField.typeParent"
:type="commonField.typeParent" :size="commonField.size"
:size="commonField.size" >审核操作<i class="el-icon-arrow-down el-icon--right"></i>
@click="handleExam(scope.row)"
>审核</el-button>
<el-button
v-show="scope.row.examStatus === '1'"
:class="commonField.resetPasClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleNoExam(scope.row)"
>驳回审核
</el-button> </el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="exam">审核</el-dropdown-item>
<el-dropdown-item command="noExam">驳回</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-button <el-button
:class="commonField.resetPasClass" :class="commonField.resetPasClass"
:type="commonField.typeParent" :type="commonField.typeParent"
:size="commonField.size" :size="commonField.size"
@click="removeCourse(scope.row)" @click="removeCourse(scope.row)"
>删除</el-button> >删除</el-button>
<!-- <el-button type="text" @click="handleView(scope.row)">查看</el-button>--> <!-- <el-button type="text" @click="handleView(scope.row)">查看</el-button>-->
</template> </template>
</el-table-column> </el-table-column>
...@@ -283,7 +284,21 @@ export default { ...@@ -283,7 +284,21 @@ export default {
value: '0' value: '0'
} }
], ],
// 审核状态选项
examStatusOptions: [
{
label: '待审核',
value: '0'
},
{
label: '已通过',
value: '1'
},
{
label: '已驳回',
value: '2'
}
],
// 上传提交 // 上传提交
uploadList: { uploadList: {
fm: '' fm: ''
...@@ -518,50 +533,39 @@ export default { ...@@ -518,50 +533,39 @@ export default {
}) })
}) })
}, },
/** 审核按钮操作 */ /** 审核按钮操作 */
handleExam(row) { handleExamOrNoExam(row, command) {
const text = row.examStatus === '1' ? '驳回审核' : '审核' let text, params, api;
const params = { if (command === 'exam') {
text = '审核';
params = {
businessId: row.businessId, businessId: row.businessId,
examStatus: row.examStatus examStatus: '1'
} };
this.$confirm('是否确认操作?', '审核中', { api = updateExamStatus;
confirmButtonText: '确定', } else if (command === 'noExam') {
cancelButtonText: '取消', text = '驳回';
type: 'warning' params = {
}).then(function() {
return updateExamStatus(params)
}).then(() => {
this.$message({
message: text + '成功',
type: 'success'
})
this.loadData()
})
},
/** 撤回审核按钮操作 */
handleNoExam(row) {
const text = row.examStatus === '1' ? '驳回审核' : '审核'
const params = {
businessId: row.businessId, businessId: row.businessId,
examStatus: row.examStatus examStatus: '2' // 驳回审核
} };
this.$confirm('是否确认操作?', '驳回中', { api = updateExamStatus;
confirmButtonText: '确定', }
cancelButtonText: '取消',
type: 'warning' this.$confirm(`是否确认${text}操作?`, text, {
}).then(function() { confirmButtonText: '确定',
return updateNoExamStatus(params) cancelButtonText: '取消',
}).then(() => { type: 'warning'
this.$message({ }).then(() => {
message: text + '成功', return api(params);
type: 'success' }).then(() => {
}) this.$message({
this.loadData() message: `${text}成功`,
}) type: 'success'
}, });
this.loadData();
});
},
/** /**
* @description: 查看 * @description: 查看
* @author: gaoyu * @author: gaoyu
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment