|
|
@@ -74,19 +74,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<template>
|
|
|
- <!-- <div class="bottom" v-if="!info.second">
|
|
|
+ <div class="bottom" v-if="!info.second">
|
|
|
<van-button
|
|
|
@click="submitScore"
|
|
|
:disabled="!score"
|
|
|
+ style="margin-right:20px"
|
|
|
round
|
|
|
block
|
|
|
:color="$colors.prim"
|
|
|
>
|
|
|
提交评分
|
|
|
</van-button>
|
|
|
- </div> -->
|
|
|
- <div class="bottom btnList">
|
|
|
- <!-- <van-button
|
|
|
+ <van-button
|
|
|
v-if="nowActive !== 0"
|
|
|
@click="pre"
|
|
|
round
|
|
|
@@ -94,8 +93,14 @@
|
|
|
:color="$colors.prim"
|
|
|
>
|
|
|
上一个
|
|
|
- </van-button> -->
|
|
|
- <van-button @click="next" round block :color="$colors.prim">
|
|
|
+ </van-button>
|
|
|
+ <van-button
|
|
|
+ @click="next"
|
|
|
+ round
|
|
|
+ block
|
|
|
+ :color="$colors.prim"
|
|
|
+ v-if="nowActive !== relatedList.length - 1"
|
|
|
+ >
|
|
|
下一个
|
|
|
</van-button>
|
|
|
</div>
|
|
|
@@ -143,6 +148,9 @@ export default {
|
|
|
programmeId() {
|
|
|
return this.$route.query.id;
|
|
|
},
|
|
|
+ aid() {
|
|
|
+ return this.$route.query.aid;
|
|
|
+ },
|
|
|
url() {
|
|
|
return (
|
|
|
"http://wljtest.izouma.com/home?performanceId=" +
|
|
|
@@ -170,31 +178,17 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getInfo(this.programmeId);
|
|
|
- if (window.localStorage.getItem("loginPhoneToken")) {
|
|
|
- this.$store.dispatch("getUserInfo");
|
|
|
- this.isAdmin = true;
|
|
|
- } else {
|
|
|
- this.isAdmin = false;
|
|
|
- }
|
|
|
},
|
|
|
methods: {
|
|
|
next() {
|
|
|
- console.log(111);
|
|
|
- // this.nowActive = this.nowActive + 1;
|
|
|
- // this.persons = [];
|
|
|
- // this.scores = [];
|
|
|
- // this.score = "";
|
|
|
- // this.myScore = null;
|
|
|
- // this.isScore = false;
|
|
|
- this.getInfo(1340, true);
|
|
|
+ this.nowActive = this.nowActive + 1;
|
|
|
+ this.getInfo(
|
|
|
+ this.relatedList[this.nowActive % this.relatedList.length].id,
|
|
|
+ true
|
|
|
+ );
|
|
|
},
|
|
|
pre() {
|
|
|
this.nowActive = this.nowActive - 1;
|
|
|
- this.persons = [];
|
|
|
- this.scores = [];
|
|
|
- this.score = "";
|
|
|
- this.myScore = null;
|
|
|
- this.isScore = false;
|
|
|
this.getInfo(
|
|
|
this.relatedList[this.nowActive % this.relatedList.length].id,
|
|
|
true
|
|
|
@@ -209,6 +203,30 @@ export default {
|
|
|
this.score = "";
|
|
|
this.message = "";
|
|
|
});
|
|
|
+ this.getRelated();
|
|
|
+ },
|
|
|
+ getRelated() {
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ `/programme/byExpert`,
|
|
|
+ {
|
|
|
+ size: 100,
|
|
|
+ query: {
|
|
|
+ arrangeId: this.aid
|
|
|
+ }
|
|
|
+ },
|
|
|
+ { body: "json" }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.relatedList = res.content;
|
|
|
+ this.empty = res.empty;
|
|
|
+ // this.nowActive = res.content.findIndex(item => {
|
|
|
+ // console.log(item.id);
|
|
|
+ // return item.id === this.info.id;
|
|
|
+ // });
|
|
|
+ // console.log(this.info.id);
|
|
|
+ // console.log(this.nowActive);
|
|
|
+ });
|
|
|
},
|
|
|
scoreChange() {
|
|
|
this.$nextTick(() => {
|
|
|
@@ -226,14 +244,13 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
this.$http
|
|
|
- .post("/programmeScore/saveScore?programmeId=" + this.$route.query.id, {
|
|
|
+ .post("/programmeScore/saveScore?programmeId=" + this.info.id, {
|
|
|
score: this.score,
|
|
|
remark: this.message
|
|
|
})
|
|
|
.then(res => {
|
|
|
- console.log(res);
|
|
|
this.$toast.success("评分成功");
|
|
|
- this.getInfo();
|
|
|
+ this.getInfo(this.info.id);
|
|
|
})
|
|
|
.catch(e => {
|
|
|
if (e) {
|
|
|
@@ -453,6 +470,9 @@ export default {
|
|
|
|
|
|
.bottom {
|
|
|
position: fixed;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
padding: 6px 48px calc(env(safe-area-inset-bottom) + 6px);
|
|
|
bottom: 0;
|
|
|
left: 0;
|