Przeglądaj źródła

05/08 10:24

111
mo 5 lat temu
rodzic
commit
b4d1f460cd
2 zmienionych plików z 17 dodań i 15 usunięć
  1. 15 12
      src/views/operateManager/serverIndexDetail.vue
  2. 2 3
      vue.config.js

+ 15 - 12
src/views/operateManager/serverIndexDetail.vue

@@ -9,12 +9,12 @@
 
     <el-card class="box-card"
              v-for="(card,index) in dataList"
-             :key='index'
+             :key='index+"index"'
              style="width:1000px">
       <p class="timeTitle"> {{card.monday}} - {{card.sunday}}</p>
       <div class="listWrap"
-           v-for="(item,index) in card.data"
-           :key="index">
+           v-for="(item,subIndex) in card.data"
+           :key="subIndex">
         <div class="m-row">
           <div class="textWrap">
             <p class="title">类型 : </p>
@@ -59,7 +59,7 @@
 
         </div>
         <div class="arrowBox"
-             @click="getComment(item)">
+             @click="getComment(item,index,subIndex)">
           <div class="border">
             <i :class="item.up?'el-icon-arrow-up':'el-icon-arrow-down'"></i>
           </div>
@@ -188,7 +188,6 @@ export default {
             this.dataList[i].data = this.dataList[i].data.map(res => {
               res.up = false;
               res.homeWork = res.attachments.split(',')
-              console.log(res.homeWork)
               return res;
             });
           }
@@ -200,10 +199,12 @@ export default {
     goBack () {
       this.$router.push({ path: '/operateManager/serverIndexList', query: { search: this.Fsearch, rules: this.Frules } })
     },
-    getComment (item) {
+    getComment (item,index,subIndex) {
       // 数据处理
       if (item.up) {
-        item.up = false;
+          item.up = false;
+          this.$forceUpdate()
+        // item.up = false;
       } else {
         let extra;
         if (item.homeworkType == 'EXTRA') {
@@ -215,11 +216,13 @@ export default {
         findStudentHomeworkComments({ studentCourseHomeworkId: item.studentHomeworkId, extra, rows: 9999 }).then(res => {
           if (res.code == 200) {
             this.activeCommit = res.data.rows;
-            item.up = false
-            this.dataList.map(res => {
-              res.up = false;
-              return res;
-            })
+            // item.up = false
+            for (let i in this.dataList) {
+              this.dataList[i].data = this.dataList[i].data.map(res => {
+                res.up = false;
+                return res;
+              });
+            }
             item.up = true;
           }
         })

+ 2 - 3
vue.config.js

@@ -21,9 +21,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.27:8000' // 箭河
 // let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:8000' //勇哥
-// let target = 'http://admin.dayaedu.com' // 测试服
-let target = 'http://192.168.3.48:8080' // 乔
-// let target = 'http://dyme.cn1.utools.club'// 乔家
+let target = 'http://admin.dayaedu.com' // 测试服
+// let target = 'http://192.168.3.48:8080' // 乔
 // let target = 'http://195s22s709.imwork.net/' // 邹璇家
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {