xuqiang 4 ani în urmă
părinte
comite
f2f663b2ab

+ 2 - 2
src/main/h5/src/plugins/http.js

@@ -5,8 +5,8 @@ let baseUrl = "http://localhost:8080";
 switch (process.env.NODE_ENV) {
 switch (process.env.NODE_ENV) {
   case "development":
   case "development":
     // baseUrl = "http://wljtest.izouma.com";
     // baseUrl = "http://wljtest.izouma.com";
-    // baseUrl = "http://localhost:8080";
-    baseUrl = 'http://192.168.50.190:8080';
+    baseUrl = "http://localhost:8080";
+    // baseUrl = 'http://192.168.50.190:8080';
     break;
     break;
   case "test":
   case "test":
     baseUrl = "http://localhost:8080";
     baseUrl = "http://localhost:8080";

+ 25 - 24
src/main/h5/src/views/Home.vue

@@ -244,6 +244,30 @@ export default {
     // this.getInfo();
     // this.getInfo();
   },
   },
   methods: {
   methods: {
+    next() {
+      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
+      );
+    },
+    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
+      );
+    },
     getInfo(programmeId, isFirst = false) {
     getInfo(programmeId, isFirst = false) {
       this.$http
       this.$http
         .get("/programme/getScore/" + programmeId, {
         .get("/programme/getScore/" + programmeId, {
@@ -353,30 +377,7 @@ export default {
           }
           }
         });
         });
     },
     },
-    next() {
-      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
-      );
-    },
-    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
-      );
-    },
+
     logout() {
     logout() {
       this.$dialog
       this.$dialog
         .confirm({
         .confirm({

+ 3 - 0
src/main/h5/src/views/programme/arrangeList.vue

@@ -161,6 +161,9 @@ export default {
 
 
 .list {
 .list {
   padding: 20px 16px;
   padding: 20px 16px;
+  .empty {
+    text-align: center;
+  }
   .item {
   .item {
     padding: 20px;
     padding: 20px;
     background: #ffffff;
     background: #ffffff;

+ 48 - 28
src/main/h5/src/views/programme/programmeDetail.vue

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

+ 5 - 1
src/main/h5/src/views/programme/programmeList.vue

@@ -55,7 +55,10 @@ export default {
       });
       });
     },
     },
     goDetail(id) {
     goDetail(id) {
-      this.$router.push({ name: "programmeDetail", query: { id: id } });
+      this.$router.push({
+        name: "programmeDetail",
+        query: { id: id, aid: this.$route.query.id }
+      });
     }
     }
   },
   },
   mounted() {
   mounted() {
@@ -71,6 +74,7 @@ export default {
         { body: "json" }
         { body: "json" }
       )
       )
       .then(res => {
       .then(res => {
+        // console.log(res);
         this.list = res.content;
         this.list = res.content;
         this.empty = res.empty;
         this.empty = res.empty;
       });
       });