|
|
@@ -32,7 +32,7 @@
|
|
|
<el-radio-button label="courseware">课件列表</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
<!-- <el-button v-teacher-permission="{role:'teacher'}" plain type="warning">添加发布</el-button>-->
|
|
|
- <el-popover v-model:visible="showPopover" :width="160" placement="bottom">
|
|
|
+ <el-popover v-if="tabName==='notice'" v-model:visible="showPopover" :width="160" placement="bottom">
|
|
|
<div class="sel-notice-type">
|
|
|
<div :style="{color:themeColor.orange}" class="notice-type-icon">
|
|
|
公告
|
|
|
@@ -62,6 +62,8 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-popover>
|
|
|
+ <el-button v-if="tabName==='courseware'" v-teacher-permission="{role:'teacher'}" plain type="primary">上传课件
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div class="course-tab-content">
|
|
|
<div v-if="tabName==='notice'" class="tab-notice">
|
|
|
@@ -70,6 +72,12 @@
|
|
|
<div v-else-if="tabName==='tasks'" class="tab-tasks">
|
|
|
</div>
|
|
|
<div v-else-if="tabName==='courseware'" class="tab-courseware">
|
|
|
+ <FileEntry v-for="(entry,index) in fileEntryList"
|
|
|
+ :key="index"
|
|
|
+ :file-entry-info="entry"
|
|
|
+ @downloadFileIconClick="handleDownloadFileIconClick"
|
|
|
+ ></FileEntry>
|
|
|
+
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -111,10 +119,6 @@
|
|
|
<el-radio v-model="newNoticeInfo.priority" border label="2" size="large">一般</el-radio>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="new-notice-item">
|
|
|
- <span>附件:  </span>
|
|
|
- <div></div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="new-notice-btn">
|
|
|
<el-button style="margin-right: 32px" type="primary">确认</el-button>
|
|
|
@@ -132,6 +136,7 @@
|
|
|
<script setup>
|
|
|
import GlobalHeader from "../../../src/components/GlobalHeader";
|
|
|
import NoticeItem from "./components/NoticeItem";
|
|
|
+import FileEntry from "./components/FileEntry";
|
|
|
import {reactive, ref} from "vue";
|
|
|
|
|
|
const newNoticeType = reactive({type: "", title: "", color: ""});
|
|
|
@@ -202,6 +207,35 @@ const courseInfo = {
|
|
|
moocLink: "https://www.icourse163.org/"
|
|
|
};
|
|
|
|
|
|
+
|
|
|
+//处理上传的文件相关
|
|
|
+const fileEntryList = reactive([
|
|
|
+ {
|
|
|
+ id: 1,
|
|
|
+ name: "课程作业",
|
|
|
+ size: "12.6MB",
|
|
|
+ uploadTime: "2021-12-12 08:22:23",
|
|
|
+ url: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 2,
|
|
|
+ name: "测试",
|
|
|
+ size: "6KB",
|
|
|
+ uploadTime: "2021-12-12 08:22:23",
|
|
|
+ url: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 3,
|
|
|
+ name: "小练习",
|
|
|
+ size: "45KB",
|
|
|
+ uploadTime: "2021-12-12 08:22:23",
|
|
|
+ url: ""
|
|
|
+ }
|
|
|
+]);
|
|
|
+
|
|
|
+const handleDownloadFileIconClick = function (url) {
|
|
|
+ window.open(url);
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|