zengyicheng 1 рік тому
батько
коміт
736521267d

+ 1 - 1
dist/index.html

@@ -24,4 +24,4 @@
             height: 100%;
             width: 100%;
             background: #e6eaf0;
-        }</style><link href=./static/css/app.dd65da7bf43b5b8c78be1ed8d262b5fa.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.f73e1f5407603f6a733b.js></script><script type=text/javascript src=./static/js/vendor.0c21445a4cd992a83ee9.js></script><script type=text/javascript src=./static/js/app.a50d411d691bfa29b4af.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>
+        }</style><link href=./static/css/app.b744c12131ca6a26356fddbc7212906a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.f73e1f5407603f6a733b.js></script><script type=text/javascript src=./static/js/vendor.0c21445a4cd992a83ee9.js></script><script type=text/javascript src=./static/js/app.06364a400634f8bc4354.js></script></body></html><script>document.domain = document.domain.split(".").slice(-2).join(".");</script>

Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/css/app.b744c12131ca6a26356fddbc7212906a.css


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/css/app.b744c12131ca6a26356fddbc7212906a.css.map


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/css/app.dd65da7bf43b5b8c78be1ed8d262b5fa.css.map


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/app.06364a400634f8bc4354.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/app.06364a400634f8bc4354.js.map


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/app.a50d411d691bfa29b4af.js


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/app.a50d411d691bfa29b4af.js.map


Різницю між файлами не показано, бо вона завелика
+ 0 - 0
dist/static/js/manifest.f73e1f5407603f6a733b.js.map


+ 152 - 17
src/components/pages/disAdmin/anliList.vue

@@ -79,14 +79,39 @@
             <div>{{ a.time }}</div>
           </div>
           <div class="anliButton">
-            <div>
-              <el-button @click="lookDetail(a.id)">查看</el-button>
+            <div
+              :style="{
+                width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
+              }"
+              @click="lookDetail(a.id)"
+            >
+              查看
             </div>
-            <div>
-              <el-button @click="openScore(a, 1)">评分</el-button>
+            <div
+              :style="{
+                width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
+              }"
+              @click="openScore(a, 1)"
+            >
+              评分
             </div>
-            <div>
-              <el-button @click="openScore(a, 2)">推荐</el-button>
+            <div
+              :style="{
+                width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
+              }"
+              @click="openScore(a, 2)"
+            >
+              推荐
+            </div>
+            <div
+              v-if="a.score"
+              style="min-width: 80px"
+              :style="{
+                width: a.score ? 'calc(100% / 4 - 15px)' : 'calc(100% / 3)',
+              }"
+              @click="lookAnliScore(a.id)"
+            >
+              查看评分
             </div>
           </div>
         </div>
@@ -299,6 +324,64 @@
         </div>
       </div>
     </el-dialog>
+    <el-dialog
+      title="查看评分"
+      :visible.sync="dialogVisibleAllScore"
+      :append-to-body="true"
+      width="70%"
+      height="80%"
+      :before-close="handleClose"
+      class="dialog_diy customWidth1"
+    >
+      <el-table :data="anliScoreList" stripe border style="width: 100%">
+        <el-table-column label="姓名" min-width="10" align="center">
+          <template slot-scope="scope">
+            <div>{{ scope.row.name ? scope.row.name : "-" }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="项目式学习" min-width="10">
+          <template slot-scope="scope">
+            <div>{{ scope.row.score.first ? scope.row.score.first : "-" }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="项目成果" min-width="10">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.score.second ? scope.row.score.second : "-" }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="项目评价" min-width="10">
+          <template slot-scope="scope">
+            <div>{{ scope.row.score.third ? scope.row.score.third : "-" }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="平均分" min-width="10">
+          <template slot-scope="scope">
+            <div>{{ scope.row.sum ? scope.row.sum : "-" }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="评价时间" min-width="10">
+          <template slot-scope="scope">
+            <div>{{ scope.row.time ? scope.row.time : "-" }}</div>
+          </template>
+        </el-table-column>
+        <el-table-column label="评语" min-width="30">
+          <template slot-scope="scope">
+            <div>
+              {{ scope.row.score.content ? scope.row.score.content : "-" }}
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="reScore">
+        <div>当前平均分</div>
+        <div>
+          <span>{{ allScoreSum }}</span
+          >分
+        </div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -348,6 +431,9 @@ export default {
           sumScore: 0,
         },
       ],
+      anliScoreList: [],
+      dialogVisibleAllScore: false,
+      allScoreSum: 0,
     };
   },
   methods: {
@@ -479,14 +565,35 @@ export default {
           this.tableData = res.data[0];
           for (var i = 0; i < this.tableData.length; i++) {
             this.tableData[i].info = JSON.parse(this.tableData[i].info);
-            this.tableData[i].overview = JSON.parse(this.tableData[i].overview);
-            this.tableData[i].process = JSON.parse(this.tableData[i].process);
-            this.tableData[i].proact = JSON.parse(this.tableData[i].proact);
-            this.tableData[i].proexc = JSON.parse(this.tableData[i].proexc);
-            this.tableData[i].results = JSON.parse(this.tableData[i].results);
+            // this.tableData[i].overview = JSON.parse(this.tableData[i].overview);
+            // this.tableData[i].process = JSON.parse(this.tableData[i].process);
+            // this.tableData[i].proact = JSON.parse(this.tableData[i].proact);
+            // this.tableData[i].proexc = JSON.parse(this.tableData[i].proexc);
+            // this.tableData[i].results = JSON.parse(this.tableData[i].results);
           }
+          this.sScore(this.tableData);
           this.isLoading = false;
         })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    sScore(t) {
+      this.ajax
+        .get(this.$store.state.api + "selectAllScore")
+        .then((res) => {
+          var scoreList = res.data[0];
+          for (var i = 0; i < t.length; i++) {
+            for (var j = 0; j < scoreList.length; j++) {
+              if (t[i].id == scoreList[j].rid) {
+                t[i].score = scoreList[j].score;
+              }
+            }
+          }
+          this.tableData = t;
+          this.$forceUpdate();
+        })
         .catch((err) => {
           console.error(err);
         });
@@ -741,6 +848,34 @@ export default {
           aid
       );
     },
+    lookAnliScore(id) {
+      this.anliScoreList = [];
+      let params = {
+        rid: id,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectAnliScore", params)
+        .then((res) => {
+          var sList = res.data[0];
+          var allScoreSum = 0;
+          for (var i = 0; i < sList.length; i++) {
+            sList[i].score = JSON.parse(sList[i].score);
+            var point = sList[i].score;
+            var a = parseInt(point.first);
+            var b = parseInt(point.second);
+            var c = parseInt(point.third);
+            var sumScore = Math.round((a + b + c) / 3);
+            sList[i].sum = sumScore;
+            allScoreSum += sList[i].sum;
+          }
+          this.allScoreSum = Math.round(allScoreSum / sList.length);
+          this.anliScoreList = sList;
+          this.dialogVisibleAllScore = true;
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
   },
   created() {
     // this.getAnliList();
@@ -906,19 +1041,19 @@ export default {
   flex-direction: row;
   flex-wrap: nowrap;
   align-items: center;
-  justify-content: flex-end;
+  justify-content: center;
   padding: 10px 0 0 0;
+  width: 100%;
 }
 
 .anliButton > div {
   margin-right: 5px;
+  text-align: center;
+  cursor: pointer;
 }
 
-.anliButton > div > .el-button {
-  background: #409efe;
-  color: #fff;
-  width: 80px;
-  border-radius: 5px;
+.anliButton > div:not(:last-child) {
+  border-right: 1px solid #ccc;
 }
 
 .customWidth >>> .el-dialog {

+ 1 - 54
src/components/pages/munAdmin/anliList.vue

@@ -313,60 +313,6 @@
       :before-close="handleClose"
       class="dialog_diy customWidth1"
     >
-      <!-- <div v-for="(item, index) in anliScoreList" :key="index">
-        <el-descriptions class="margin-top" :column="3" border>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-s-custom"></i>
-              姓名
-            </template>
-            {{ item.name }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-s-custom"></i>
-              项目式学习
-            </template>
-            {{ item.score.first }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-s-custom"></i>
-              项目成果
-            </template>
-            {{ item.score.second }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-s-custom"></i>
-              项目评价
-            </template>
-            {{ item.score.third }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-s-custom"></i>
-              平均分
-            </template>
-            {{ item.sum }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-s-custom"></i>
-              评价时间
-            </template>
-            {{ item.time }}
-          </el-descriptions-item>
-          <el-descriptions-item>
-            <template slot="label">
-              <i class="el-icon-s-custom"></i>
-              评语
-            </template>
-            {{ item.score.content }}
-          </el-descriptions-item>
-        </el-descriptions>
-      </div> -->
-
       <el-table :data="anliScoreList" stripe border style="width: 100%">
         <el-table-column label="姓名" min-width="10" align="center">
           <template slot-scope="scope">
@@ -620,6 +566,7 @@ export default {
           this.isLoading = false;
         })
         .catch((err) => {
+          this.isLoading = false;
           console.error(err);
         });
     },

+ 1 - 0
src/components/pages/proAdmin/anliList.vue

@@ -470,6 +470,7 @@ export default {
           this.isLoading = false;
         })
         .catch((err) => {
+          this.isLoading = false;
           console.error(err);
         });
     },

Деякі файли не було показано, через те що забагато файлів було змінено