|
|
@@ -9,7 +9,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="5">
|
|
|
<div>
|
|
|
- <strong>申请日期: </strong>2021-9-19 09:36:00
|
|
|
+ <strong>申请日期: </strong> {{toMyDate(questionvo.createdTime)}}
|
|
|
</div>
|
|
|
</el-col>
|
|
|
<el-col :span="14"></el-col>
|
|
|
@@ -113,13 +113,13 @@
|
|
|
<div>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-button type="primary" @click="">通过</el-button>
|
|
|
+ <el-button type="primary" @click="approve">通过</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-button type="primary" @click="">待定</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
- <el-button type="primary" @click="">拒绝</el-button>
|
|
|
+ <el-button type="primary" @click="deny">拒绝</el-button>
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
@@ -133,8 +133,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {getUserById} from "../api/user";
|
|
|
import MarkdownText from "./MarkdownText";
|
|
|
+ import {toMyDate} from "../utils/dateConvertor";
|
|
|
|
|
|
export default {
|
|
|
name: "checkCard",
|
|
|
@@ -168,22 +168,13 @@
|
|
|
lastModifiedTime: Date,
|
|
|
},
|
|
|
isAll: false,
|
|
|
+ savedUserName: '',
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
- savedUserName: function () {
|
|
|
- // let user;
|
|
|
- // getUserById(this.questionvo.savedUserId).then(res => {
|
|
|
- // user = res.result.content;
|
|
|
- // return user.name;
|
|
|
- // }).catch(err => {
|
|
|
- // console.log(err);
|
|
|
- // })
|
|
|
- return "xiaosu";
|
|
|
- },
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
+ toMyDate,
|
|
|
expand(){
|
|
|
if(!this.isAll){
|
|
|
this.isAll = true;
|
|
|
@@ -194,7 +185,54 @@
|
|
|
this.isAll = false;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ approve(){ // 通过审核
|
|
|
+ this.questionvo.state = "APPROVED";
|
|
|
+ this.$api.updateQuestion(this.questionvo)
|
|
|
+ .then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '通过成功!'
|
|
|
+ });
|
|
|
+ console.log(res);
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$notify.error({
|
|
|
+ title: '错误',
|
|
|
+ message: '通过失败'
|
|
|
+ });
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ deny(){ // 拒绝通过
|
|
|
+ this.questionvo.state = "REFUSED";
|
|
|
+ this.$api.updateQuestion(this.questionvo)
|
|
|
+ .then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '拒绝成功!'
|
|
|
+ });
|
|
|
+ console.log(res);
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$notify.error({
|
|
|
+ title: '错误',
|
|
|
+ message: '拒绝失败'
|
|
|
+ });
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ if(this.questionvo.savedUserId){
|
|
|
+ this.$api.getUserById(this.questionvo.savedUserId)
|
|
|
+ .then(res => {
|
|
|
+ if(res.data.result.name){
|
|
|
+ this.savedUserName = res.data.result.name;
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|