Browse Source

增加模块卷

谢杰标 3 years ago
parent
commit
42dd2ef10f
1 changed files with 23 additions and 457 deletions
  1. 23 457
      src/views/education/classManageMent/classHoursReview/studyTimes.vue

+ 23 - 457
src/views/education/classManageMent/classHoursReview/studyTimes.vue

@@ -218,7 +218,7 @@
                   'border-right-color': '#0047D0',
                   'border-left-color': '#0047D0',
                 }
-              : asrt.value === 1
+              : asrt.value === 1 ||asrt.value === 5
               ? {
                   'background-color': '#D9ECFA',
                   padding: '8px',
@@ -328,454 +328,9 @@
               </div>
               <!-- type为3时使用该插槽END -->
               <!-- 章表格START -->
-              <el-table
-                v-else
-                border
-                :data="
-                  scope.row.type === 1
-                    ? scope.row.classPeriods
-                    : scope.row.type === 2
-                    ? scope.row.classPeriodSectionList
-                    : ''
-                "
-                :default-expand-all="defaultExpand"
-                :header-cell-style="
-                  scope.row.type === 1
-                    ? {
-                        'background-color': '#D9ECFA',
-                        padding: '8px',
-                        color: '#1565C0',
-                        'border-right-color': '#1565C0',
-                        'border-left-color': '#1565C0',
-                      }
-                    : scope.row.type === 2
-                    ? {
-                        'background-color': '#f5f5f5',
-                        padding: '8px',
-                        color: '#666',
-                      }
-                    : ''
-                "
-              >
-                <!-- 章插槽START -->
-                <el-table-column
-                  type="expand"
-                  :label="
-                    scope.row.type === 1
-                      ? '章'
-                      : scope.row.type === 2
-                      ? '节/卷'
-                      : ''
-                  "
-                  :width="
-                    scope.row.type === 1
-                      ? '70px'
-                      : scope.row.type === 2
-                      ? '80px'
-                      : ''
-                  "
-                >
-                  <template slot-scope="scope2">
-                    <!-- 节插槽START -->
-                    <div
-                      v-if="scope2.row.type === 3 || scope2.row.type === 4"
-                      class="dis_flexs"
-                    >
-                      <ul
-                        style="flex: 1"
-                        v-if="
-                          scope2.row.userStudyRecordPhotoList &&
-                          scope2.row.userStudyRecordPhotoList.length
-                        "
-                      >
-                        <li
-                          v-for="(its, inds) in scope2.row
-                            .userStudyRecordPhotoList"
-                          :key="inds"
-                          class="liImgs"
-                        >
-                          <el-image
-                            style="width: 100%; height: 100%"
-                            :src="$methodsTools.splitImgHost(its.photo)"
-                            :preview-src-list="[
-                              $methodsTools.splitImgHost(its.photo),
-                            ]"
-                          >
-                          </el-image>
-                          <div class="abos">
-                            {{ $methodsTools.onlyForma(its.createTime) }}
-                          </div>
-                        </li>
-                        <div style="clear: both"></div>
-                      </ul>
-                      <p v-else style="text-align: center; width: 100%">
-                        暂无拍照数据
-                      </p>
-                      <div
-                        class="styFlex"
-                        v-if="
-                          (userData.periodStatus === 0 ||
-                            userData.periodStatus === 2 ||
-                            userData.periodStatus === 3) &&
-                          scope2.row.periodStatus === 1
-                        "
-                      >
-                        <div>
-                          <el-checkbox
-                            class="checkboxList"
-                            :label="scope2.row.periodStatusId"
-                            :disabled="
-                              userData.periodStatus === 3
-                                ? false
-                                : scope2.row.status !== 2
-                                ? true
-                                : false
-                            "
-                            ><br
-                          /></el-checkbox>
-                        </div>
-                        <el-button
-                          :disabled="scope2.row.status !== 2"
-                          class="btnstyles"
-                          size="small"
-                          type="success"
-                          :loading="disabledBtn"
-                          @click="
-                            changeStatusCharpter(
-                              scope2.row,
-                              1,
-                              scope.$index,
-                              scope2.$index
-                            )
-                          "
-                          >通过</el-button
-                        >
-                        <el-button
-                          :disabled="scope2.row.status !== 2"
-                          class="btnstyles"
-                          size="small"
-                          type="danger"
-                          @click="
-                            changeStatusCharpter(
-                              scope2.row,
-                              2,
-                              scope.$index,
-                              scope2.$index
-                            )
-                          "
-                          >作弊</el-button
-                        >
-                      </div>
-                    </div>
-                    <!-- 节插槽END -->
-                    <!-- 节表格START -->
-                    <el-table
-                      v-else
-                      border
-                      :data="
-                        scope2.row.type === 2
-                          ? scope2.row.classPeriodSectionList
-                          : ''
-                      "
-                      :default-expand-all="defaultExpand"
-                      :header-cell-style="
-                        scope2.row.type === 2
-                          ? {
-                              'background-color': '#f5f5f5',
-                              padding: '8px',
-                              color: '#666',
-                            }
-                          : ''
-                      "
-                    >
-                      <!-- 节插槽START -->
-                      <el-table-column
-                        type="expand"
-                        :label="scope2.row.type === 2 ? '节/卷' : ''"
-                        width="80px"
-                      >
-                        <template slot-scope="scope3">
-                          <div
-                            v-if="
-                              scope3.row.type === 3 || scope3.row.type === 4
-                            "
-                            class="dis_flexs"
-                          >
-                            <ul
-                              style="flex: 1"
-                              v-if="
-                                scope3.row.userStudyRecordPhotoList &&
-                                scope3.row.userStudyRecordPhotoList.length
-                              "
-                            >
-                              <li
-                                v-for="(its, inds) in scope3.row
-                                  .userStudyRecordPhotoList"
-                                :key="inds"
-                                class="liImgs"
-                              >
-                                <el-image
-                                  style="width: 100%; height: 100%"
-                                  :src="$methodsTools.splitImgHost(its.photo)"
-                                  :preview-src-list="[
-                                    $methodsTools.splitImgHost(its.photo),
-                                  ]"
-                                >
-                                </el-image>
-                                <div class="abos">
-                                  {{ $methodsTools.onlyForma(its.createTime) }}
-                                </div>
-                              </li>
-                              <div style="clear: both"></div>
-                            </ul>
-                            <p v-else style="text-align: center; width: 100%">
-                              暂无拍照数据
-                            </p>
-                            <div
-                              class="styFlex"
-                              v-if="
-                                (userData.periodStatus === 0 ||
-                                  userData.periodStatus === 2 ||
-                                  userData.periodStatus === 3) &&
-                                scope3.row.periodStatus === 1
-                              "
-                            >
-                              <div>
-                                <el-checkbox
-                                  class="checkboxList"
-                                  :label="scope3.row.periodStatusId"
-                                  :disabled="
-                                    userData.periodStatus === 3
-                                      ? false
-                                      : scope3.row.status !== 2
-                                      ? true
-                                      : false
-                                  "
-                                  ><br
-                                /></el-checkbox>
-                              </div>
-                              <el-button
-                                :disabled="scope3.row.status !== 2"
-                                class="btnstyles"
-                                size="small"
-                                type="success"
-                                :loading="disabledBtn"
-                                @click="
-                                  changeStatusModule(
-                                    scope3.row,
-                                    1,
-                                    scope.$index,
-                                    scope2.$index,
-                                    scope3.$index
-                                  )
-                                "
-                                >通过</el-button
-                              >
-                              <el-button
-                                :disabled="scope3.row.status !== 2"
-                                class="btnstyles"
-                                size="small"
-                                type="danger"
-                                @click="
-                                  changeStatusModule(
-                                    scope3.row,
-                                    2,
-                                    scope.$index,
-                                    scope2.$index,
-                                    scope3.$index
-                                  )
-                                "
-                                >作弊</el-button
-                              >
-                            </div>
-                          </div>
-                        </template>
-                      </el-table-column>
-                      <!-- 节插槽END -->
-                      <el-table-column
-                        v-for="(item, index) in scope2.row.type === 2
-                          ? tableSet3
-                          : ''"
-                        :width="item.width"
-                        :key="index"
-                        :label="item.label"
-                        align="center"
-                      >
-                        <template slot-scope="scope3">
-                          <span v-if="item.scope === 'select'">
-                            <span
-                              v-for="(k, ds) in item.options"
-                              :key="ds"
-                              :style="
-                                scope3.row[item.prop] === 0
-                                  ? 'color:red;'
-                                  : scope3.row[item.prop] === 2
-                                  ? 'color:#0047D0;'
-                                  : scope3.row[item.prop] === 1
-                                  ? 'color:#67C23A;'
-                                  : ''
-                              "
-                            >
-                              {{
-                                k.value == scope3.row[item.prop] ? k.label : ""
-                              }}
-                            </span>
-                          </span>
-                          <div v-else-if="item.scope === 'activeNum'">
-                            <el-select
-                              v-model="scope3.row[item.prop]"
-                              placeholder="请选择"
-                              @change="
-                                getNewListMores(
-                                  scope.$index,
-                                  scope2.$index,
-                                  scope3.$index,
-                                  $event,
-                                  scope3.row
-                                )
-                              "
-                            >
-                              <el-option
-                                v-for="(items, indexs) in scope3.row['numList']"
-                                :key="indexs"
-                                :label="'第' + items + '次审核记录'"
-                                :value="items"
-                              >
-                              </el-option>
-                            </el-select>
-                          </div>
-                          <span v-else-if="item.scope === 'typeOptions'">
-                            <span v-for="(is, ds) in item.options" :key="ds">
-                              <span v-if="is.value === scope3.row[item.prop]">{{
-                                is.label
-                              }}</span>
-                            </span>
-                          </span>
-                          <span v-else-if="item.scope === 'aTime'">
-                            {{ $methodsTools.onlyForma(scope3.row[item.prop]) }}
-                          </span>
-                          <span v-else-if="item.scope === 'durTime'">
-                            {{
-                              $methodsTools.secondToDate(
-                                scope3.row[item.prop],
-                                false
-                              )
-                            }}
-                          </span>
-                          <div v-else-if="item.scope === 'aTimeSE'">
-                            <span
-                              v-if="
-                                scope3.row['type'] === 3 &&
-                                scope3.row['durationTime'] &&
-                                scope3.row['studyStartTime'] &&
-                                scope3.row['studyEndTime']
-                              "
-                              :style="comput(scope3.row)"
-                            >
-                              {{
-                                $methodsTools.onlyForma(scope3.row[item.prop])
-                              }}
-                            </span>
-                            <span v-else>
-                              {{
-                                $methodsTools.onlyForma(scope3.row[item.prop])
-                              }}
-                            </span>
-                          </div>
-                          <span v-else> {{ scope3.row[item.prop] }} </span>
-                        </template>
-                      </el-table-column>
-                    </el-table>
-                    <!-- 节表格END -->
-                  </template>
-                </el-table-column>
-                <!-- 章插槽END -->
-                <el-table-column
-                  v-for="(item, index) in scope.row.type === 1
-                    ? tableSet2
-                    : scope.row.type === 2
-                    ? tableSet3
-                    : ''"
-                  :width="item.width"
-                  :key="index"
-                  :label="item.label"
-                  align="center"
-                >
-                  <template slot-scope="scope2">
-                    <span v-if="item.scope === 'select'">
-                      <span
-                        v-for="(k, ds) in item.options"
-                        :key="ds"
-                        :style="
-                          scope2.row[item.prop] === 0
-                            ? 'color:red;'
-                            : scope2.row[item.prop] === 2
-                            ? 'color:#0047D0;'
-                            : scope2.row[item.prop] === 1
-                            ? 'color:#67C23A;'
-                            : ''
-                        "
-                      >
-                        {{ k.value == scope2.row[item.prop] ? k.label : "" }}
-                      </span>
-                    </span>
-                    <div v-else-if="item.scope === 'activeNum'">
-                      <el-select
-                        v-model="scope2.row[item.prop]"
-                        placeholder="请选择"
-                        @change="
-                          getNewListchapt(
-                            scope.$index,
-                            scope2.$index,
-                            $event,
-                            scope2.row
-                          )
-                        "
-                      >
-                        <el-option
-                          v-for="(items, indexs) in scope2.row['numList']"
-                          :key="indexs"
-                          :label="'第' + items + '次审核记录'"
-                          :value="items"
-                        >
-                        </el-option>
-                      </el-select>
-                    </div>
-                    <span v-else-if="item.scope === 'typeOptions'">
-                      <span v-for="(is, ds) in item.options" :key="ds">
-                        <span v-if="is.value === scope2.row[item.prop]">{{
-                          is.label
-                        }}</span>
-                      </span>
-                    </span>
-                    <span v-else-if="item.scope === 'aTime'">
-                      {{ $methodsTools.onlyForma(scope2.row[item.prop]) }}
-                    </span>
-                    <span v-else-if="item.scope === 'durTime'">
-                      {{
-                        $methodsTools.secondToDate(scope2.row[item.prop], false)
-                      }}
-                    </span>
-                    <div v-else-if="item.scope === 'aTimeSE'">
-                      <span
-                        v-if="
-                          scope2.row['type'] === 3 &&
-                          scope2.row['durationTime'] &&
-                          scope2.row['studyStartTime'] &&
-                          scope2.row['studyEndTime']
-                        "
-                        :style="comput(scope2.row)"
-                      >
-                        {{ $methodsTools.onlyForma(scope2.row[item.prop]) }}
-                      </span>
-                      <span v-else>
-                        {{ $methodsTools.onlyForma(scope2.row[item.prop]) }}
-                      </span>
-                    </div>
-                    <span v-else> {{ scope2.row[item.prop] }} </span>
-                  </template>
-                </el-table-column>
-              </el-table>
+              
+            
+              
               <!-- 章表格END -->
             </template>
           </el-table-column>
@@ -1084,12 +639,17 @@ export default {
           label: "节",
           value: 2,
         },
+        {
+          label: "模块卷1",
+          value: 5,
+        },
       ],
       arr: ["tableData1", "tableData2", "tableData3"],
       listData: {
         tableData1: [],
         tableData2: [],
         tableData3: [],
+        tableData5: [],
       },
       getAllList: [], //统计得到待审核列表所有
       userData: {},
@@ -1818,6 +1378,7 @@ export default {
           let tab1 = [];
           let tab2 = [];
           let tab3 = [];
+          let tab5 = [];
           for (let i = 0; i < res.rows.length; i++) {
             if (res.rows[i].type === 1) {
               tab1.push(res.rows[i]);
@@ -1828,7 +1389,11 @@ export default {
             if (res.rows[i].type === 3) {
               tab3.push(res.rows[i]);
             }
+            if (res.rows[i].type === 5) {
+              tab5.push(res.rows[i]);
+            }
           }
+          console.log(tab1, tab2, tab3, 123);
           let allArrays = [];
           /**
            * 统计模块-章-节所有的待审核列表ID getAllList1
@@ -1836,16 +1401,17 @@ export default {
           let getAllList1 = [];
           tab1.forEach((item) => {
             item.classPeriods.forEach((items) => {
-              items.classPeriodSectionList.forEach((itemsxs) => {
-                if (self.userData.periodStatus === 3) {
-                  getAllList1.push(itemsxs.periodStatusId);
-                  allArrays.push(itemsxs);
-                } else {
-                  if (itemsxs.status === 2) {
+              items.classPeriodSectionList &&
+                items.classPeriodSectionList.forEach((itemsxs) => {
+                  if (self.userData.periodStatus === 3) {
                     getAllList1.push(itemsxs.periodStatusId);
+                    allArrays.push(itemsxs);
+                  } else {
+                    if (itemsxs.status === 2) {
+                      getAllList1.push(itemsxs.periodStatusId);
+                    }
                   }
-                }
-              });
+                });
             });
           });
           /**