zhouwx
2024-10-11 91645e9d87249621aa358ef519111ea72679d959
src/views/onlineEducation/courseSupervision/components/courseDialog.vue
@@ -3,7 +3,7 @@
    :visible.sync="dialogVisible"
    :modal-append-to-body="false"
    :close-on-click-modal="false"
    width="600px"
    width="50%"
    :before-close="handleClose"
  >
    <div style="margin:  0 25px">
@@ -26,7 +26,7 @@
<!--      </div>-->
      <div style="display: flex;flex-direction: column">
        <span style="font-size: 20px;font-weight: 550">课程章节资源</span>
        <span style="font-size: 20px;font-weight: 550">课程内容</span>
        <el-table
          border
          :data="courseTable"
@@ -43,6 +43,13 @@
          <el-table-column
            prop="chapterName"
            label="小节名称" align="center">
          </el-table-column>
          <el-table-column
            prop="teacher"
            label="讲师" align="center">
            <template #default="scope">
              <span>{{scope.row.teacher ? scope.row.teacher : '--'}}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="资源类别"
@@ -63,10 +70,13 @@
            </template>
          </el-table-column>
        </el-table>
      </div>
    </div>
    <span slot="footer" class="dialog-footer" v-if="showBtn">
    <el-button type="primary" @click="dialogVisible = false">审核通过</el-button>
    <el-button type="warning" @click="dialogVisible = false">审核驳回</el-button>
    </span>
  </el-dialog>
</template>
@@ -82,25 +92,31 @@
      dialogStatus: '',
      dataForm: {},
      courseTable: [],
      courseList: []
      courseList: [],
      showBtn:false
    }
  },
  created() {
  },
  methods: {
    openDialog (data,type) {
    openDialog (data,type,courseType) {
      this.dialogVisible = true;
      console.log('this.showBtn ',type,courseType )
      if(type === 'course'){
        this.courseList = data.outline
        this.courseTable = this.recursion(data.outline,type)
        if(courseType == 'check'){
          this.showBtn = true
          console.log('this.showBtn ',this.showBtn )
        }
      }else {
        console.log('courseT2222222222able',data.chapterList)
        this.courseList = data.chapterList
        this.courseTable = this.recursion(data.chapterList,type)
      }
      console.log('courseT2222222222able',this.courseTable)
      console.log('coursee',this.courseTable)
    },
    recursion (data,type) {
      let tmp = []
@@ -151,12 +167,13 @@
      this.isClose = !this.isClose
    },
    handleClose() {
      this.showBtn = false
      this.dialogVisible = false;
      this.$emit("getList");
    },
    onSubmit() {
              this.$emit("getList");
              this.dialogVisible = false;
        this.$emit("getList");
        this.dialogVisible = false;
    },
    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
      if(columnIndex === 0) {
@@ -203,4 +220,9 @@
.open{
  height: 15px;
}
.dialog-footer{
  display: flex;
  align-items: center;
  justify-content: space-around;
}
</style>