jiangbiao преди 1 година
родител
ревизия
f43681d56b
променени са 2 файла, в които са добавени 17 реда и са изтрити 50 реда
  1. 3 3
      ui/src/views/training/bccnew/tsnew/score.vue
  2. 14 47
      ui/src/views/training/bccnew/tsnew/score_student.vue

+ 3 - 3
ui/src/views/training/bccnew/tsnew/score.vue

@@ -65,7 +65,7 @@
               <el-option value="满意" label="满意" key="满意"/>
               <el-option value="差" label="差" key="差"/>
             </el-select>
-            <el-button type="text" @click="saveScore(scope.row)" class="ml5">保存</el-button>
+            <el-button v-if="scope.row.score1Tmp!=null" type="text" @click="saveScore(scope.row)" class="ml5">保存</el-button>
           </div>
           <span v-else>{{ scope.row.score1 }}</span>
         </template>
@@ -85,7 +85,7 @@
               <el-option value="满意" label="满意" key="满意"/>
               <el-option value="差" label="差" key="差"/>
             </el-select>
-            <el-button type="text" @click="saveScore(scope.row)" class="ml5">保存</el-button>
+            <el-button v-if="scope.row.score2Tmp!=null" type="text" @click="saveScore(scope.row)" class="ml5">保存</el-button>
           </div>
           <span v-else>{{ scope.row.score2 }}</span>
         </template>
@@ -105,7 +105,7 @@
               <el-option value="满意" label="满意" key="满意"/>
               <el-option value="差" label="差" key="差"/>
             </el-select>
-            <el-button type="text" @click="saveScore(scope.row)" class="ml5">保存</el-button>
+            <el-button v-if="scope.row.score3Tmp!=null" type="text" @click="saveScore(scope.row)" class="ml5">保存</el-button>
           </div>
           <span v-else>{{ scope.row.score3 }}</span>
         </template>

+ 14 - 47
ui/src/views/training/bccnew/tsnew/score_student.vue

@@ -3,7 +3,8 @@
     <el-row :gutter="10" class="mb8">
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-    <el-table v-loading="loading" :data="dsdtList" :height="clientHeight" @selection-change="handleSelectionChange"
+    <el-table v-loading="loading" :span-method="mergeMethod" :data="dsdtList" :height="clientHeight"
+              @selection-change="handleSelectionChange"
               border>
       <el-table-column type="selection" width="55" align="center" fixed="left"/>
       <el-table-column label="详细计划" align="center" prop="detailPlan" :show-overflow-tooltip="true" width="180"
@@ -27,59 +28,21 @@
           <el-tag v-else-if="scope.row.planStatus == 5" size="small" type="success">已完成待审批</el-tag>
         </template>
       </el-table-column>
-      <el-table-column label="第一次成绩" align="center" prop="score1" :show-overflow-tooltip="true" width="180">
-        <template slot-scope="scope">
-          <div v-if="scope.row.score1 == null&&scope.row.planStatus==2">
-            <el-select v-model="scope.row.score1Tmp" style="width: 130px" placeholder="请选择成绩">
-              <el-option value="好" label="好" key="好"/>
-              <el-option value="满意" label="满意" key="满意"/>
-              <el-option value="差" label="差" key="差"/>
-            </el-select>
-            <el-button type="text" @click="saveScore(scope.row)" class="ml5">保存</el-button>
-          </div>
-          <span v-else>{{ scope.row.score1 }}</span>
-        </template>
-      </el-table-column>
+      <el-table-column label="第一次成绩" align="center" prop="score1" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="附件" align="center" :show-overflow-tooltip="true" width="80">
         <template slot-scope="scope">
           <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-score1')"
                      circle></el-button>
         </template>
       </el-table-column>
-      <el-table-column label="第二次成绩" align="center" prop="score2" :show-overflow-tooltip="true" width="180">
-        <template slot-scope="scope">
-          <div
-            v-if="scope.row.score2 == null&&scope.row.planStatus==2&&(scope.row.score1 == '满意'||scope.row.score1 == '差')">
-            <el-select v-model="scope.row.score2Tmp" style="width: 130px" placeholder="请选择成绩">
-              <el-option value="好" label="好" key="好"/>
-              <el-option value="满意" label="满意" key="满意"/>
-              <el-option value="差" label="差" key="差"/>
-            </el-select>
-            <el-button type="text" @click="saveScore(scope.row)" class="ml5">保存</el-button>
-          </div>
-          <span v-else>{{ scope.row.score2 }}</span>
-        </template>
-      </el-table-column>
+      <el-table-column label="第二次成绩" align="center" prop="score2" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="附件" align="center" :show-overflow-tooltip="true" width="80">
         <template slot-scope="scope">
           <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-score2')"
                      circle></el-button>
         </template>
       </el-table-column>
-      <el-table-column label="第三次成绩" align="center" prop="score3" :show-overflow-tooltip="true" width="180">
-        <template slot-scope="scope">
-          <div
-            v-if="scope.row.score3 == null&&scope.row.planStatus==2&&((scope.row.score1 == '满意'||scope.row.score1 == '差')&&(scope.row.score2 == '满意'||scope.row.score2 == '差'))">
-            <el-select v-model="scope.row.score3Tmp" style="width: 130px" placeholder="请选择成绩">
-              <el-option value="好" label="好" key="好"/>
-              <el-option value="满意" label="满意" key="满意"/>
-              <el-option value="差" label="差" key="差"/>
-            </el-select>
-            <el-button type="text" @click="saveScore(scope.row)" class="ml5">保存</el-button>
-          </div>
-          <span v-else>{{ scope.row.score3 }}</span>
-        </template>
-      </el-table-column>
+      <el-table-column label="第三次成绩" align="center" prop="score3" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="附件" align="center" :show-overflow-tooltip="true" width="80">
         <template slot-scope="scope">
           <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-score3')"
@@ -477,16 +440,20 @@ export default {
       return parseInt((this.file.data.timer / this.file.data.timerNeed * 100).toFixed(2))
     },
     openFileDialog(row) {
+      let num = 1;
       for (let i = 0; i < this.dsdtList.length; i++) {
         if (i === 0) {
           continue;
         }
         let item = this.dsdtList[i];
-        console.log(item.id)
         if (item.id === row.id) {
-          if (this.dsdtList[i - 1].planStatus !== 5) {
-            this.$alert('您必须完成上一项考试才可学习当前资料!', "注意", {dangerouslyUseHTMLString: true});
-            return;
+          if (row.id !== this.dsdtList[i - 1].id) {
+            if (this.dsdtList[i - 1].planStatus !== 5) {
+              this.$alert('您必须完成上一项考试才可学习当前资料!', "注意", {dangerouslyUseHTMLString: true});
+              return;
+            }
+          }else{
+            num++;
           }
         }
       }
@@ -724,7 +691,7 @@ export default {
     //合并单元格
     mergeMethod({row, column, rowIndex, columnIndex}) {
       // console.log(row)
-      if ([1,3, 6, 7, 8, 9, 10, 11, 12, 13, 14].includes(columnIndex)) {
+      if ([1, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14].includes(columnIndex)) {
         const _row = this.setTable(this.dsdtList).merge[rowIndex];
         const _col = _row > 0 ? 1 : 0;
         return {