|
|
@@ -32,8 +32,8 @@
|
|
|
:page-sizes="[5, 10, 15, 20]"
|
|
|
:page-size="pageSize"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total=this.createTotalNum
|
|
|
- v-if="this.createQuestionList.length !== 0"
|
|
|
+ :total=createTotalNum
|
|
|
+ v-if="createQuestionList.length !== 0"
|
|
|
/>
|
|
|
<creating-question-card
|
|
|
v-for="(item, index) in createQuestionList"
|
|
|
@@ -222,44 +222,17 @@ export default {
|
|
|
break;
|
|
|
// 新建审核
|
|
|
case "checking":
|
|
|
- // todo: 用真代码替换mockjs
|
|
|
- // this.$api.getStateQuestion(tab.props.name.toUpperCase(), 0, this.pageSize)
|
|
|
- // .then(res => {
|
|
|
- // // mjh change
|
|
|
- // // console.log("getStateQuestion-CHECKING");
|
|
|
- // // console.log(res);
|
|
|
- // this.createQuestionList = res.data.result.content;
|
|
|
- // this.createTotalNum = res.data.result.totalElements;
|
|
|
- // })
|
|
|
- // .catch(err => {
|
|
|
- // console.log(err);
|
|
|
- // })
|
|
|
//新建审核实现:
|
|
|
_this.createQuestionList=[];
|
|
|
_this.$api.getStateQuestion(tab.props.name.toUpperCase(), 0, this.pageSize)
|
|
|
.then(async res => {
|
|
|
console.log("getStateQuestion-checking");
|
|
|
- const create_list = res.data.result.content;
|
|
|
- let creating_num = 0;
|
|
|
-
|
|
|
- for (const createListElement of create_list) {
|
|
|
-
|
|
|
- creating_num += 1;
|
|
|
- console.log(createListElement);
|
|
|
- let item = createListElement;
|
|
|
-
|
|
|
- this.createQuestionList.push(item);
|
|
|
-
|
|
|
- }
|
|
|
- this.createTotalNum = creating_num;
|
|
|
+ console.log(res);
|
|
|
+ this.createQuestionList = res.data.result.content;
|
|
|
+ this.createTotalNum = res.data.result.totalElements;
|
|
|
}).catch(err => {
|
|
|
console.log(err);
|
|
|
})
|
|
|
-
|
|
|
- // mockApi.mockGetCreateQuestion().then().catch(err => {
|
|
|
- // _this.createQuestionList = err.data
|
|
|
- // _this.createTotalNum = err.data.length
|
|
|
- // })
|
|
|
break;
|
|
|
// 更新审核
|
|
|
case "updating":
|
|
|
@@ -326,13 +299,6 @@ export default {
|
|
|
console.log(err);
|
|
|
})
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- // mockApi.mockGetExecuteQuestion().then().catch(err => {
|
|
|
- // console.log(err)
|
|
|
- // _this.executeTotalNum = err.data.length;
|
|
|
- // _this.executeQuestionList = err.data
|
|
|
- // })
|
|
|
break;
|
|
|
// case "deleted":
|
|
|
// mockApi.mockGetExecuteQuestion().then().catch(err => {
|