Explorar o código

修改项目组人数逻辑

SanHQin hai 1 ano
pai
achega
bcf07e286d

+ 1 - 1
src/views/projectApply/MakerSpaceApply.vue

@@ -344,7 +344,7 @@ export default {
           beh: this.wordData["begin_at"], //项目开始时间,
           apply: this.wordData["applicationDate"], //申请日期
           members:
-            this.wordData["student"].length + this.wordData["teacher"].length,
+            this.wordData["student"].filter(i=>i.name!='').length + this.wordData["teacher"].filter(i=>i.name!='').length,
         };
         // return console.log(pram);
         this.ajax

+ 3 - 3
src/views/projectApply/components/MakerSpaceWord.vue

@@ -116,12 +116,12 @@
       <div class="han">
         <div class="label">项目组人数</div>
         <div class="value">
-          {{ wordData["teacher"].length + wordData["student"].length }}
+          {{ wordData["teacher"].filter(i=>i.name!='').length + wordData["student"].filter(i=>i.name!='').length }}
         </div>
         <div class="label">参与教师人数</div>
-        <div class="value">{{ wordData["teacher"].length }}</div>
+        <div class="value">{{ wordData["teacher"].filter(i=>i.name!='').length }}</div>
         <div class="label">参与学生人数</div>
-        <div class="value">{{ wordData["student"].length }}</div>
+        <div class="value">{{ wordData["student"].filter(i=>i.name!='').length }}</div>
       </div>
       <div class="member" id="five">
         <div class="memberLabel">

+ 1 - 1
src/views/projectApply/components/MakerSpaceWordDetail.vue

@@ -238,7 +238,7 @@ export default {
         mon: encodeURIComponent(JSON.stringify(this.wordData["fund"])), //预算经费
         planEnd: this.wordData["plannedEnd_at"], //计划完成时间,
         beh: this.wordData["begin_at"], //项目开始时间,
-        mem: this.wordData["student"].length + this.wordData["teacher"].length, //项目组人数
+        mem: this.wordData["student"].filter(i=>i.name!='').length + this.wordData["teacher"].filter(i=>i.name!='').length, //项目组人数
       };
       this.ajax
         .post(this.$store.state.api + "/updateMakerSpaceWordData", pram)

+ 3 - 3
src/views/projectApply/components/studentProjectWord.vue

@@ -190,15 +190,15 @@
       <tr>
         <td colspan="2" class="bold">项 目 组 人 数</td>
         <td>
-          {{ wordData.studentS.length + wordData.teacherS.length }}
+          {{ wordData.studentS.filter(i=>i.name!='').length + wordData.teacherS.filter(i=>i.name!='').length }}
         </td>
         <td class="bold">参与学生人数</td>
         <td>
-          {{ wordData.studentS.length }}
+          {{ wordData.studentS.filter(i=>i.name!='').length }}
         </td>
         <td class="bold">参与教师人数</td>
         <td>
-          {{ wordData.teacherS.length }}
+          {{ wordData.teacherS.filter(i=>i.name!='').length }}
         </td>
       </tr>
       <tr id="studentS">

+ 1 - 1
src/views/projectApply/components/studentProjectWordDetail.vue

@@ -718,7 +718,7 @@ export default {
         f: this.wordData["total"], //总经费
         apply: this.wordData["applicationDate"], //申请日期
         mem:
-          this.wordData["teacherS"].length + this.wordData["studentS"].length,
+          this.wordData["teacherS"].filter(i=>i.name!='').length + this.wordData["studentS"].filter(i=>i.name!='').length,
       };
       this.ajax
         .post(this.$store.state.api + "/updateStudentProjectData", param)

+ 3 - 3
src/views/projectApply/components/studentProjectWordShow.vue

@@ -76,9 +76,9 @@
             <td ref="endTime"><span class="jc">计划完成时间</span></td><td colspan="2" v-text="downWordData.endTime.split(' ')[0]"></td>
           </tr>
           <tr>
-            <td colspan="2"><span class="jc">项 目 组 人 数</span></td><td v-text="downWordData.studentS.length + downWordData.teacherS.length"></td>
-            <td>参与学生人数</td><td v-text='downWordData.studentS.length'> </td>
-            <td>参与教师人数</td><td v-text="downWordData.teacherS.length"></td>
+            <td colspan="2"><span class="jc">项 目 组 人 数</span></td><td v-text="downWordData.studentS.filter(i=>i.name!='').length + downWordData.teacherS.filter(i=>i.name!='').length"></td>
+            <td>参与学生人数</td><td v-text="downWordData.studentS.filter(i=>i.name!='').length"> </td>
+            <td>参与教师人数</td><td v-text="downWordData.teacherS.filter(i=>i.name!='').length"></td>
           </tr>
           <tr id="studentS">
             <!-- <td :rowspan="downWordData.studentS.length+1" ref="studentS"><span class="jc">项目组</span><br><span class="jc">学生成员</span><br> (至少2 <br>个学院以上<br> 学生构成<br>,团队 5人以上)</td><td>姓名</td><td colspan="2">所在学院/部门/专业</td><td colspan="3">项目组角色分工</td> -->

+ 1 - 1
src/views/projectApply/newStudentProjectApply.vue

@@ -338,7 +338,7 @@ export default {
           f: this.wordData["total"], //总经费
           apply: this.wordData["applicationDate"], //申请日期
           mem:
-            this.wordData["studentS"].length + this.wordData["teacherS"].length, //项目组人数
+            this.wordData["studentS"].filter(i=>i.name!='').length + this.wordData["teacherS"].filter(i=>i.name!='').length, //项目组人数
         };
         // return
         this.ajax

+ 4 - 4
src/views/projectManage/components/Closingstatement.vue

@@ -163,14 +163,14 @@
         <td colspan="2">项目组人数</td>
         <td colspan="2">
           {{
-            myArrayProp[0].course_student.length +
-            myArrayProp[0].course_teacher.length
+            myArrayProp[0].course_student.filter(i=>i.name!='').length +
+            myArrayProp[0].course_teacher.filter(i=>i.name!='').length
           }}人
         </td>
         <td>学生人数</td>
-        <td>{{ myArrayProp[0].course_student.length }}</td>
+        <td>{{ myArrayProp[0].course_student.filter(i=>i.name!='').length }}</td>
         <td>教师人数</td>
-        <td>{{ myArrayProp[0].course_teacher.length }}</td>
+        <td>{{ myArrayProp[0].course_teacher.filter(i=>i.name!='').length }}</td>
       </tr>
       <tr>
         <td style="font-size: 21px">项目起始时间</td>

+ 3 - 3
src/views/projectManage/components/MakerSpaceWordShow.vue

@@ -50,12 +50,12 @@
       <div class="han">
         <div class="label">项目组人数</div>
         <div class="value">
-          {{ wordData["teacher"].length + wordData["student"].length }}
+          {{ wordData["teacher"].filter(i=>i.name!='').length + wordData["student"].filter(i=>i.name!='').length }}
         </div>
         <div class="label">参与教师人数</div>
-        <div class="value">{{ wordData["teacher"].length }}</div>
+        <div class="value">{{ wordData["teacher"].filter(i=>i.name!='').length }}</div>
         <div class="label">参与学生人数</div>
-        <div class="value">{{ wordData["student"].length }}</div>
+        <div class="value">{{ wordData["student"].filter(i=>i.name!='').length }}</div>
       </div>
       <div class="member" id="five">
         <div class="memberLabel">

+ 3 - 3
src/views/projectManage/components/studentProjectWordShow.vue

@@ -98,12 +98,12 @@
       <tr>
         <td colspan="2">项 目 组 人 数</td>
         <td
-          v-text="downWordData.studentS.length + downWordData.teacherS.length"
+          v-text="downWordData.studentS.filter(i=>i.name!='').length + downWordData.teacherS.filter(i=>i.name!='').length"
         ></td>
         <td>参与学生人数</td>
-        <td v-text="downWordData.studentS.length"></td>
+        <td v-text="downWordData.studentS.filter(i=>i.name!='').length"></td>
         <td>参与教师人数</td>
-        <td v-text="downWordData.teacherS.length"></td>
+        <td v-text="downWordData.teacherS.filter(i=>i.name!='').length"></td>
       </tr>
       <tr id="studentS">
         <td :rowspan="downWordData.studentS.length + 1" ref="studentS">

+ 3 - 3
src/views/projectSettlement/components/studentProjectWordShow.vue

@@ -67,9 +67,9 @@
             <td ref="endTime">计划完成时间</td><td colspan="2" v-text="downWordData.endTime.split(' ')[0]"></td>
           </tr>
           <tr>
-            <td colspan="2">项 目 组 人 数</td><td v-text="downWordData.studentS.length + downWordData.teacherS.length"></td>
-            <td>参与学生人数</td><td v-text='downWordData.studentS.length'> </td>
-            <td>参与教师人数</td><td v-text="downWordData.teacherS.length"></td>
+            <td colspan="2">项 目 组 人 数</td><td v-text="downWordData.studentS.filter(i=>i.name!='').length + downWordData.teacherS.filter(i=>i.name!='').length"></td>
+            <td>参与学生人数</td><td v-text="downWordData.studentS.filter(i=>i.name!='').length"> </td>
+            <td>参与教师人数</td><td v-text="downWordData.teacherS.filter(i=>i.name!='').length"></td>
           </tr>
           <tr id="studentS">
             <td :rowspan="downWordData.studentS.length+1" ref="studentS">项目组学生成员(至少2个学院以上学生构成,团队5人以上)</td><td>姓名</td><td colspan="2">所在学院/部门/专业</td><td colspan="3">项目组角色分工</td>

+ 3 - 3
src/views/projectSettlement/components/studentProjectWordShowNew.vue

@@ -82,9 +82,9 @@
             <td ref="endTime">计划完成时间</td><td colspan="2" v-text="downWordData.endTime.split(' ')[0]"></td>
           </tr>
           <tr>
-            <td colspan="2">项 目 组 人 数</td><td v-text="downWordData.studentS.length + downWordData.teacherS.length"></td>
-            <td>参与学生人数</td><td v-text='downWordData.studentS.length'> </td>
-            <td>参与教师人数</td><td v-text="downWordData.teacherS.length"></td>
+            <td colspan="2">项 目 组 人 数</td><td v-text="downWordData.studentS.filter(i=>i.name!='').length + downWordData.teacherS.filter(i=>i.name!='').length"></td>
+            <td>参与学生人数</td><td v-text="downWordData.studentS.filter(i=>i.name!='').length"> </td>
+            <td>参与教师人数</td><td v-text="downWordData.teacherS.filter(i=>i.name!='').length"></td>
           </tr>
           <tr id="studentS">
             <td :rowspan="downWordData.studentS.length+1" ref="studentS" style="padding:10px"><span style="margin-bottom: 5px;">项目组学生成员</span></td><td>姓名</td><td colspan="2">所在学院/部门/专业</td><td colspan="3">项目组角色分工</td>