123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <template>
- <div class="curricula-manager">
- <div class="curricula-manager-header">
- <el-input v-model="input" placeholder="请输入" suffix-icon="el-icon-search"> </el-input>
- </div>
- <div class="curricula-manager-body">
- <div class="curricula-manager-body1">
- <el-button
- @click="click(item.status, index)"
- :class="background == index ? 'changeColor' : 'bgcolor'"
- v-for="(item, index) in statusList"
- :key="index"
- >
- {{ item.val }}
- </el-button>
- </div>
- <div class="sort">
- <span>排序:</span>
- <div class="sort-body" v-for="item in sortList" :key="item.id">
- {{ item.name }}
- <i class="el-icon-sort"></i>
- </div>
- </div>
- <div class="curricula-manager-body2">
- <el-button class="bgcolor" @click="add()">新建课程</el-button>
- </div>
- </div>
- <div class="curricula-manager-foot">
- <div v-for="(item, inx) in taskList" :key="inx">
- <div v-if="item.status == isstatus" class="circulation">
- <div class="curricula-manager-foot1">
- <span>{{ item.subject }}</span>
- <span>{{ item.val }}</span>
- </div>
- <div class="curricula-manager-foot2">
- <span>{{ item.createTime }}</span>
- <span class="curricula-manager-foot3">{{ item.onclassTime }}</span>
- <span class="curricula-manager-foot3">授课教师:{{ item.teacher }}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- name: 'CurriculaManager',
- data() {
- return {
- input: '',
- background: 0,
- isstatus: 1,
- sortList: [
- {
- id: '1',
- name: '创建时间',
- sortType: 'createTime', // 数组对象中的哪一个属性进行排序
- order: false //升序还是降序
- },
- {
- id: '2',
- name: '编辑时间',
- sortType: 'editTime',
- order: false
- },
- {
- id: '3',
- name: '开课时间',
- sortType: 'onclassTime',
- order: false
- }
- ],
- statusList: [
- {
- status: '1',
- val: '进行中'
- },
- {
- status: '2',
- val: '待开始'
- },
- {
- status: '3',
- val: '已结束'
- }
- ],
- taskList: [
- {
- subject: '中文 轻松学中文初段 暑假 0813',
- createTime: '2021/3/28',
- onclassTime: '2021/4/25',
- teacher: '张一三',
- val: '进行中',
- status: '1'
- },
- {
- subject: '中文 轻松学中文初段 暑假 0813',
- createTime: '2021/3/12',
- onclassTime: '2021/4/23',
- teacher: '张一三',
- val: '进行中',
- status: '1'
- },
- {
- subject: '中文 轻松学中文初段 暑假 0813',
- createTime: '2021/3/22',
- onclassTime: '2021/4/17',
- teacher: '张一三',
- val: '已结束',
- status: '3'
- },
- {
- subject: '中文 轻松学中文初段 暑假 0813',
- createTime: '2021/3/2',
- onclassTime: '2021/4/28',
- teacher: '张一三',
- val: '待开始',
- status: '2'
- },
- {
- subject: '中文 轻松学中文初段 暑假 0813',
- createTime: '2021/3/6',
- onclassTime: '2021/4/1',
- teacher: '张一三',
- val: '进行中',
- status: '1'
- },
- {
- subject: '中文 轻松学中文初段 暑假 0813',
- createTime: '2021/3/19',
- onclassTime: '2021/4/9',
- teacher: '张一三',
- val: '已结束',
- status: '3'
- },
- {
- subject: '中文 轻松学中文初段 暑假 0813',
- createTime: '2021/3/16',
- onclassTime: '2021/4/25',
- teacher: '张一三',
- val: '待开始',
- status: '2'
- },
- {
- subject: '中文 轻松学中文初段 暑假 0813',
- createTime: '2021/3/21',
- onclassTime: '2021/4/11',
- teacher: '张一三',
- val: '进行中',
- status: '1'
- }
- ]
- };
- },
- methods: {
- click(status, index) {
- this.isstatus = status;
- this.background = index;
- console.log(status);
- console.log(index);
- },
- add() {
- console.log(123);
- }
- }
- };
- </script>
- <style lang="scss">
- .curricula-manager {
- .changeColor {
- background: #e5e5e5;
- border: 1px solid #e5e5e5;
- border-radius: 0;
- color: #0c0c0c;
- margin-bottom: 20px;
- }
- .curricula-manager-header .el-input {
- width: 365px;
- margin-top: 50px;
- margin-left: 359px;
- }
- .curricula-manager-body1 .el-button {
- width: 145px;
- height: 75px;
- font-size: 20px;
- margin-top: 50px;
- margin-left: 325px;
- }
- .bgcolor {
- background: #c4c4c4;
- border: 1px solid #c4c4c4;
- border-radius: 0;
- color: #0c0c0c;
- margin-bottom: 20px;
- }
- .el-button + .el-button {
- margin-left: 0;
- }
- .sort {
- display: flex;
- margin-top: 30px;
- margin-bottom: -35px;
- .sort-body {
- margin-left: 20px;
- }
- }
- .curricula-manager-body {
- .curricula-manager-body2 {
- margin-top: 5px;
- margin-left: 930px;
- }
- }
- .curricula-manager-foot {
- .circulation {
- margin: 0 0 20px 0;
- width: 1030px;
- height: 100px;
- background-color: #eee;
- padding: 20px 20px 0 20px;
- }
- .curricula-manager-foot1 {
- display: flex;
- justify-content: space-between;
- }
- .curricula-manager-foot2 {
- padding: 20px 0 0 0;
- }
- .curricula-manager-foot3 {
- margin-left: 20px;
- }
- }
- }
- </style>
|