|
|
@@ -33,7 +33,9 @@
|
|
|
<el-button type="text" circle @click="withdraw" v-show="isAll"><strong>收起</strong></el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1">
|
|
|
- <el-button type="primary" icon="el-icon-edit" circle @click="updateQuestion"></el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-edit" circle @click="updateQuestion"></el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-check" circle @click="checkQuestionSuccess"></el-button>
|
|
|
+ <el-button type="warning" icon="el-icon-close" circle @click="checkDialogVisible=true"></el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1">
|
|
|
<el-button v-if="isDelete === false" type="danger" icon="el-icon-delete" circle @click="deleteQuestion"></el-button>
|
|
|
@@ -166,6 +168,19 @@
|
|
|
>
|
|
|
<QuestionUpdater :question="questionvo" @closeDialog="closeDialog"/>
|
|
|
</el-drawer>
|
|
|
+
|
|
|
+ <el-dialog title="审核不通过原因" v-model="checkDialogVisible" width="30%" center
|
|
|
+ :before-close="handleCheckDialogClose">
|
|
|
+ <el-space direction="vertical">
|
|
|
+ <el-space direction="vertical" :fill="true">
|
|
|
+ <el-checkbox-group v-model="failCheckList">
|
|
|
+ <el-checkbox v-for="(item, index) in failCheckOption" :label="item"/>
|
|
|
+ </el-checkbox-group>
|
|
|
+ <el-input v-model="failCheckInput" placeholder="请输入原因"/>
|
|
|
+ </el-space>
|
|
|
+ <el-button type="primary" @click="checkQuestionFail">提交</el-button>
|
|
|
+ </el-space>
|
|
|
+ </el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
@@ -190,6 +205,15 @@
|
|
|
isDelete: false,
|
|
|
dialog: false,
|
|
|
checkedUserName: '',
|
|
|
+ // 审核dialog的可视化
|
|
|
+ checkDialogVisible: false,
|
|
|
+ // 审核失败的原因
|
|
|
+ failCheckOption: [
|
|
|
+ '题目中存在错误','题目与相关内容无关','题目中存在敏感词','其他'
|
|
|
+ ],
|
|
|
+ // 详细解释
|
|
|
+ failCheckInput: "",
|
|
|
+ failCheckList: []
|
|
|
}
|
|
|
},
|
|
|
methods:{
|
|
|
@@ -264,7 +288,41 @@
|
|
|
if ( minute < 10 ) { minute = '0' + minute; }
|
|
|
if ( second < 10 ) { second = '0' + second; }
|
|
|
return year +"-"+ month +"-" + theDate + " "+ hour +":"+ minute +":"+ second;
|
|
|
- }
|
|
|
+ },
|
|
|
+
|
|
|
+ // 题目审核通过
|
|
|
+ checkQuestionSuccess(){
|
|
|
+ const _this = this
|
|
|
+ console.log(_this.questionvo)
|
|
|
+ console.log(_this.$store.state.user)
|
|
|
+ console.log("当前时间")
|
|
|
+ // todo 更新题目的状态
|
|
|
+ },
|
|
|
+
|
|
|
+ // 题目审核不通过
|
|
|
+ checkQuestionFail(){
|
|
|
+ const _this = this
|
|
|
+ console.log(_this.questionvo)
|
|
|
+ console.log(_this.$store.state.user)
|
|
|
+ console.log(_this.failCheckList)
|
|
|
+ console.log(_this.failCheckInput)
|
|
|
+ console.log("当前时间")
|
|
|
+ // todo 更新题目的状态
|
|
|
+ _this.failCheckList = []
|
|
|
+ _this.failCheckInput = ""
|
|
|
+ _this.checkDialogVisible = false
|
|
|
+ },
|
|
|
+
|
|
|
+ // 关闭审核dialog前的方法
|
|
|
+ handleCheckDialogClose(done){
|
|
|
+ const _this = this
|
|
|
+ _this.$confirm('此操作将丢失填写信息, 是否继续?', '提示')
|
|
|
+ .then(() => {
|
|
|
+ _this.failCheckList = []
|
|
|
+ _this.failCheckInput = ""
|
|
|
+ done()})
|
|
|
+ .catch(()=>{})
|
|
|
+ },
|
|
|
},
|
|
|
computed: {
|
|
|
// checkedUserName() {
|
|
|
@@ -289,7 +347,6 @@
|
|
|
console.log(err);
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
@@ -338,4 +395,9 @@
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
|
|
|
+ label.el-checkbox{
|
|
|
+ padding: 5px;
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
</style>
|