|
@@ -1,7 +1,43 @@
|
|
|
<template>
|
|
|
<div class="research-mgmt-container">
|
|
|
+ <div class="static-box">
|
|
|
+ <div class="static-item">
|
|
|
+ <span class="static-value">{{ analysisCount[0].value }}</span>
|
|
|
+ <span class="static-label">总课例数</span>
|
|
|
+ </div>
|
|
|
+ <div class="split-line"></div>
|
|
|
+ <div class="static-item">
|
|
|
+ <span class="static-value">{{ analysisCount[1].value }}</span>
|
|
|
+ <span class="static-label">今日课例</span>
|
|
|
+ </div>
|
|
|
+ <div class="split-line"></div>
|
|
|
+ <div class="static-item">
|
|
|
+ <span class="static-value">{{ analysisCount[2].value }}</span>
|
|
|
+ <span class="static-label">本周课例</span>
|
|
|
+ </div>
|
|
|
+ <div class="split-line"></div>
|
|
|
+ <div class="static-item">
|
|
|
+ <span class="static-value">{{ analysisCount[3].value }}</span>
|
|
|
+ <span class="static-label">本月课例</span>
|
|
|
+ </div>
|
|
|
+ <div class="split-line"></div>
|
|
|
+ <div class="static-item">
|
|
|
+ <span class="static-value">{{ analysisCount[4].value }}</span>
|
|
|
+ <span class="static-label">本学期课例</span>
|
|
|
+ </div>
|
|
|
+ <div class="split-line"></div>
|
|
|
+ <div class="static-item">
|
|
|
+ <span class="static-value">{{ curPeriod.subjects.length }}</span>
|
|
|
+ <span class="static-label">学科数</span>
|
|
|
+ </div>
|
|
|
+ <div class="split-line"></div>
|
|
|
+ <div class="static-item">
|
|
|
+ <span class="static-value">{{ curPeriod.grades.length }}</span>
|
|
|
+ <span class="static-label">年级数</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- 筛选区域 -->
|
|
|
- <div class="filter-box">
|
|
|
+ <div class="filter-box" v-show="isShowFilter">
|
|
|
<div class="filter-section">
|
|
|
<span class="filter-title">{{ $t('lessonRecord.subject') }}</span>
|
|
|
<div class="filter-items">
|
|
@@ -17,16 +53,15 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="filter-section">
|
|
|
- <span class="filter-title">{{ $t('lessonRecord.cate') }}</span>
|
|
|
+ <span class="filter-title">{{ $t('lessonRecord.range') }}</span>
|
|
|
<div class="filter-items">
|
|
|
- <span :class="['filter-item',!tagIndexArr.length ? 'filter-item-active' : '']" @click="onFilterChange('tag',-1)">{{ $t('lessonRecord.all') }}</span>
|
|
|
- <span :class="['filter-item',tagIndexArr.includes(index) ? 'filter-item-active' : '']" v-for="(item,index) in tagList" :key="index" @click="onFilterChange('tag',index)">{{ item }}</span>
|
|
|
+ <span :class="['filter-item',curRangeIndex === index ? 'filter-item-active' : '']" v-for="(item,index) in rangeArr" :key="index" @click="onFilterChange('range',index)">{{ item }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="filter-section">
|
|
|
- <span class="filter-title">{{ $t('lessonRecord.range') }}</span>
|
|
|
+ <span class="filter-title">类型</span>
|
|
|
<div class="filter-items">
|
|
|
- <span :class="['filter-item',curRangeIndex === index ? 'filter-item-active' : '']" v-for="(item,index) in rangeArr" :key="index" @click="onFilterChange('range',index)">{{ item }}</span>
|
|
|
+ <span :class="['filter-item',curTypeIndex === index ? 'filter-item-active' : '']" v-for="(item,index) in typeArr" :key="index" @click="onFilterChange('type',index)">{{ item }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="filter-section">
|
|
@@ -36,15 +71,26 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ad-filter">
|
|
|
- <div class="ad-filter-item" v-show="!hideAdFilter && !showRangePicker">
|
|
|
- <!-- <span class="filter-item-title">{{ $t('lessonRecord.tchName') }}</span> -->
|
|
|
+ <div class="ad-filter-item">
|
|
|
+ <Select v-model="tagIndexArr" style="width:150px;" placeholder="课例类别" multiple @on-change="onCateChange">
|
|
|
+ <Option v-for="(item,index) in tagList" :value="index">{{ item }}</Option>
|
|
|
+ </Select>
|
|
|
+ </div>
|
|
|
+ <div class="ad-filter-item">
|
|
|
+ <Select v-model="filterClassIds" style="width:150px;" placeholder="选择班级">
|
|
|
+ <Option v-for="(item,index) in classArr" :value="item.id">{{ item.name }}</Option>
|
|
|
+ </Select>
|
|
|
+ </div>
|
|
|
+ <div class="ad-filter-item">
|
|
|
<BaseSelectTch @onTchSelect="onTchSelect" ref="tchSelect"></BaseSelectTch>
|
|
|
</div>
|
|
|
- <div class="ad-filter-item" v-show="!hideAdFilter && !showRangePicker">
|
|
|
- <!-- <span class="filter-item-title">{{ $t('lessonRecord.lessonName') }}</span> -->
|
|
|
+ <div class="ad-filter-item">
|
|
|
<Input v-model="filterJson.vName" :placeholder="$t('lessonRecord.lessonNamePlace')" clearable />
|
|
|
</div>
|
|
|
- <div class="ad-filter-item" v-show="!hideAdFilter && !showRangePicker">
|
|
|
+ <div class="ad-filter-item">
|
|
|
+ <DatePicker :value="filterJson.timeRange" :editable="false" :options="timeOptions" format="yyyy/MM/dd" type="daterange" placement="bottom-end" :placeholder="$t('lessonRecord.rangeTip')" @on-change="onTimeRangeChange"></DatePicker>
|
|
|
+ </div>
|
|
|
+ <div class="ad-filter-item">
|
|
|
<div class="cond-items" style="display: inline-block;vertical-align: sub;margin-right:10px;">
|
|
|
<span v-for="(cond,condIndex) in conds">
|
|
|
<Tag v-if="cond.val > 0" color="purple" size="medium" closable @on-close="removeAdvanceFilter(condIndex)">{{ cond.name }}{{ cond.type }}{{ cond.val }}</Tag>
|
|
@@ -68,10 +114,7 @@
|
|
|
</div>
|
|
|
</Dropdown>
|
|
|
</div>
|
|
|
- <div class="ad-filter-item" v-show="showRangePicker">
|
|
|
- <DatePicker :value="filterJson.timeRange" :editable="false" :options="timeOptions" format="yyyy/MM/dd" type="daterange" placement="bottom-end" :placeholder="$t('lessonRecord.rangeTip')" @on-change="onTimeRangeChange"></DatePicker>
|
|
|
- </div>
|
|
|
- <div class="ad-filter-item" v-show="!hideAdFilter || showRangePicker">
|
|
|
+ <div class="ad-filter-item">
|
|
|
<Button type="primary" shape="circle" @click="doSearch">{{ $t('lessonRecord.search') }}</Button>
|
|
|
<Button type="info" shape="circle" @click="doReset">{{ $t('lessonRecord.reset') }}</Button>
|
|
|
</div>
|
|
@@ -79,9 +122,9 @@
|
|
|
</div>
|
|
|
<!-- 查询结果 -->
|
|
|
<div class="search-result">
|
|
|
- <span style="cursor: pointer;margin-right: 10px;color: #04abc8;" @click="onClickAdFilter">
|
|
|
+ <!-- <span style="cursor: pointer;margin-right: 10px;color: #04abc8;" @click="onClickAdFilter">
|
|
|
<Icon type="ios-funnel" color="#04abc8" style="margin-right: 5px;" />{{ hideAdFilter ? $t('lessonRecord.more') : $t('lessonRecord.close') }}
|
|
|
- </span>
|
|
|
+ </span> -->
|
|
|
<span style="cursor: pointer;margin-right: 10px;color: #04abc8;" @click="exportTable">
|
|
|
<Icon type="md-download" color="#04abc8" style="margin:5px;" />{{ $t('assessment.export') }}
|
|
|
</span>
|
|
@@ -89,17 +132,12 @@
|
|
|
</span>{{ $t('lessonRecord.resultTip2') }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<!-- 工具栏 -->
|
|
|
<div class="tools-bar">
|
|
|
- <!-- <div class="tool-item" @click="onAddVideo">
|
|
|
- <Icon type="md-add" />
|
|
|
- <span>添加课例</span>
|
|
|
- </div> -->
|
|
|
- <!-- <div class="tool-item">
|
|
|
- <Icon type="md-download" @click="exportTable()"/>
|
|
|
- <span>{{ $t('lessonRecord.export') }}</span>
|
|
|
- </div> -->
|
|
|
+ <div class="tool-item" @click="isShowFilter = !isShowFilter">
|
|
|
+ <Icon type="md-funnel" />
|
|
|
+ <span>{{ isShowFilter ? '收起筛选' : '展开筛选'}}</span>
|
|
|
+ </div>
|
|
|
<div class="tool-item" @click="onTagMgClick">
|
|
|
<Icon type="logo-buffer" />
|
|
|
<span>{{ $t('lessonRecord.tagMg') }}</span>
|
|
@@ -108,10 +146,6 @@
|
|
|
<Icon type="md-settings" />
|
|
|
<span>{{ $t('lessonRecord.setting') }}</span>
|
|
|
</div>
|
|
|
- <!-- <div class="tool-item">
|
|
|
- <Icon type="ios-paper-plane" />
|
|
|
- <span>分享至公开课</span>
|
|
|
- </div> -->
|
|
|
</div>
|
|
|
<!-- 表格区域 -->
|
|
|
<div class="table-box">
|
|
@@ -138,21 +172,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <!-- <template slot-scope="{ row }" slot="category">
|
|
|
- <span>{{ row.category.length ? row.category.join(',') : '-' }}</span>
|
|
|
+ <!-- 科技手段分数 -->
|
|
|
+ <template slot-scope="{ row,index }" slot="tLevel">
|
|
|
+ <span :style="{ backgroundColor: getLevelColor(row.tLevel),boxShadow:'0 0 6px ' + getLevelColor(row.tLevel) }" class="level-light"></span>
|
|
|
</template>
|
|
|
- <template slot-scope="{ row }" slot="subject">
|
|
|
- <span>{{ curPeriod.subjects.find(j => j.id === row.subjectId).name }}</span>
|
|
|
+ <!-- 教法应用分数 -->
|
|
|
+ <template slot-scope="{ row,index }" slot="pLevel">
|
|
|
+ <span :style="{ backgroundColor: getLevelColor(row.pLevel),boxShadow:'0 0 6px rgba(0, 0, 0, 0.5)' }" class="level-light"></span>
|
|
|
</template>
|
|
|
- <template slot-scope="{ row }" slot="grade">
|
|
|
- <span>{{ row.grade.map(i => curPeriod.grades[+i]).join(',') }}</span>
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row }" slot="className">
|
|
|
- <span>{{ row.groupIds.join(',') }}</span>
|
|
|
- </template>
|
|
|
- <template slot-scope="{ row }" slot="startTime">
|
|
|
- <span>{{ $tools.formatTime(row.startTime,'yyyy-MM-dd') }}</span>
|
|
|
- </template> -->
|
|
|
<template slot-scope="{ row }" slot="action">
|
|
|
<div v-if="row.status !== 404">
|
|
|
<Icon type="md-download" class="action-icon" color="#34cf97" @click="downloadTable(row)" :title="$t('lessonRecord.action1')" />
|
|
@@ -227,10 +254,15 @@ export default {
|
|
|
},
|
|
|
data(vm) {
|
|
|
return {
|
|
|
- rangeArr: [vm.$t('lessonRecord.all'), vm.$t('lessonRecord.week'), vm.$t('lessonRecord.month'), vm.$t('lessonRecord.semester'), vm.$t('lessonRecord.custom')],
|
|
|
+ filterClassIds: [],
|
|
|
+ classArr: [],
|
|
|
+ rangeArr: [vm.$t('lessonRecord.all'), vm.$t('lessonRecord.today'), vm.$t('lessonRecord.week'), vm.$t('lessonRecord.month'), vm.$t('lessonRecord.semester'), vm.$t('lessonRecord.custom')],
|
|
|
statusArr: [vm.$t('lessonRecord.normalStatus'), vm.$t('lessonRecord.expireStatus'), vm.$t('lessonRecord.deleteStatus')],
|
|
|
+ typeArr: [vm.$t('lessonRecord.all'), '双绿灯课例', '双红灯课例'],
|
|
|
curRangeIndex: 0,
|
|
|
curStatusIndex: 0,
|
|
|
+ curTypeIndex: 0,
|
|
|
+ isShowFilter: false,
|
|
|
hideAdFilter: true,
|
|
|
cleanModal: false,
|
|
|
showRangePicker: false,
|
|
@@ -241,7 +273,7 @@ export default {
|
|
|
apiTags: [],
|
|
|
oldNewTags: [],
|
|
|
analysisArr: [vm.$t('lessonRecord.count1'), vm.$t('lessonRecord.count2'), vm.$t('lessonRecord.count3'), vm.$t('lessonRecord.count4'), vm.$t('lessonRecord.count5'), vm.$t('lessonRecord.count6'), vm.$t('lessonRecord.count7')],
|
|
|
- analysisCount: [],
|
|
|
+ analysisCount: [0, 0, 0, 0, 0, 0],
|
|
|
isEdit: false,
|
|
|
editLoading: false,
|
|
|
tagLoading: false,
|
|
@@ -416,77 +448,39 @@ export default {
|
|
|
key: 'clientInteractionCount',
|
|
|
sortable: true,
|
|
|
ellipsis: true,
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: vm.$t('lessonRecord.collateTaskCount'),
|
|
|
key: 'collateTaskCount',
|
|
|
sortable: true,
|
|
|
ellipsis: true,
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: vm.$t('lessonRecord.pushCount'),
|
|
|
key: 'pushCount',
|
|
|
sortable: true,
|
|
|
ellipsis: true,
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
{
|
|
|
title: vm.$t('lessonRecord.examQuizCount'),
|
|
|
key: 'examCount',
|
|
|
sortable: true,
|
|
|
ellipsis: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: `科技互动(T分)`,
|
|
|
+ slot: 'tLevel',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: `教法应用(P分)`,
|
|
|
+ slot: 'pLevel',
|
|
|
+ align: 'center'
|
|
|
},
|
|
|
- // {
|
|
|
- // title: vm.$t('lessonRecord.attendCount'),
|
|
|
- // key: 'attendRate',
|
|
|
- // sortable: true,
|
|
|
- // ellipsis: true,
|
|
|
- // render: function (h, params) {
|
|
|
- // return h('span', (Number(params.row.attendRate)).toFixed(2) + '%')
|
|
|
- // },
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: vm.$t('lessonRecord.groupCount'),
|
|
|
- // key: 'groupCount',
|
|
|
- // sortable: true,
|
|
|
- // ellipsis: true,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: vm.$t('lessonRecord.totalPoint'),
|
|
|
- // key: 'totalPoint',
|
|
|
- // sortable: true,
|
|
|
- // ellipsis: true,
|
|
|
- // },
|
|
|
-
|
|
|
- // {
|
|
|
- // title: vm.$t('lessonRecord.collateCount'),
|
|
|
- // key: 'collateCount',
|
|
|
- // sortable: true,
|
|
|
- // ellipsis: true,
|
|
|
- // },
|
|
|
-
|
|
|
- // {
|
|
|
- // title: vm.$t('lessonRecord.score'),
|
|
|
- // key: 'totalInteractPoint',
|
|
|
- // sortable: true,
|
|
|
- // ellipsis: true,
|
|
|
- // },
|
|
|
- // {
|
|
|
- // title: vm.$t('lessonRecord.interactionCount'),
|
|
|
- // key: 'interactionCount',
|
|
|
- // sortable: true,
|
|
|
- // ellipsis: true,
|
|
|
- // },
|
|
|
-
|
|
|
-
|
|
|
- // {
|
|
|
- // title: vm.$t('lessonRecord.examPointRate'),
|
|
|
- // key: 'examPointRate',
|
|
|
- // sortable: true,
|
|
|
- // ellipsis: true,
|
|
|
- // render: function (h, params) {
|
|
|
- // return h('span', (Number(params.row.examPointRate)).toFixed(2) + '%')
|
|
|
- // },
|
|
|
- // },
|
|
|
{
|
|
|
title: vm.$t('lessonRecord.action'),
|
|
|
slot: 'action',
|
|
@@ -632,14 +626,14 @@ export default {
|
|
|
/* 获取课例统计数据 */
|
|
|
getAnalysisCount() {
|
|
|
let semesterRange = this.$tools.getSemesterTimeRange()
|
|
|
- this.$api.lessonRecord.getAnalysisCount({
|
|
|
+ this.$api.lessonRecord.getStaticData({
|
|
|
"stime": semesterRange.st,
|
|
|
"etime": semesterRange.et,
|
|
|
"code": this.$store.state.userInfo.schoolCode,
|
|
|
"periodId": this.$store.state.user.curPeriod.id
|
|
|
}).then(res => {
|
|
|
console.log(res)
|
|
|
- this.analysisCount = Object.values(res)
|
|
|
+ this.analysisCount = res.total
|
|
|
})
|
|
|
},
|
|
|
/* 保存课例保留时间设置 */
|
|
@@ -728,6 +722,11 @@ export default {
|
|
|
subjectId: '',
|
|
|
timeRange: []
|
|
|
}
|
|
|
+ this.curStatusIndex = 0
|
|
|
+ this.curTypeIndex = 0
|
|
|
+ this.curRangeIndex = 0
|
|
|
+ this.subjectIndexArr = []
|
|
|
+ this.gradeIndexArr = []
|
|
|
this.conds.forEach(i => {
|
|
|
i.val = 0
|
|
|
i.type = '>='
|
|
@@ -754,6 +753,9 @@ export default {
|
|
|
}
|
|
|
this.doFilter()
|
|
|
},
|
|
|
+ onCateChange(val) {
|
|
|
+ this.onFilterChange('tag', val)
|
|
|
+ },
|
|
|
/* 筛选操作 */
|
|
|
onFilterChange(type, index) {
|
|
|
if (type === 'grade') {
|
|
@@ -775,36 +777,38 @@ export default {
|
|
|
}
|
|
|
this.filterParams.subjectId = index === -1 ? [] : this.subjectIndexArr.map(j => this.curPeriod.subjects[j].id)
|
|
|
} else if (type === 'tag') {
|
|
|
- if (index === -1) {
|
|
|
+ if (index.length == 0) {
|
|
|
this.tagIndexArr = []
|
|
|
- } else if (this.tagIndexArr.includes(index)) {
|
|
|
- this.tagIndexArr.splice(this.tagIndexArr.indexOf(index), 1)
|
|
|
- } else {
|
|
|
- this.tagIndexArr.push(index)
|
|
|
}
|
|
|
this.filterParams.category = this.tagIndexArr.map(i => this.tagList[i])
|
|
|
} else if (type === 'range') {
|
|
|
this.curRangeIndex = index
|
|
|
if (index === 1) {
|
|
|
+ const nowTime = new Date();
|
|
|
+ const todayStart = new Date(nowTime.toDateString()).getTime();
|
|
|
+ const todayEnd = new Date(nowTime.toDateString()).getTime() + 3600 * 1000 * 24 - 1;
|
|
|
+ this.filterParams.stime = todayStart
|
|
|
+ this.filterParams.etime = todayEnd
|
|
|
+ } else if (index === 2) {
|
|
|
const end = new Date();
|
|
|
const nowWeekDay = end.getDay() //本周的第几天
|
|
|
const start = new Date();
|
|
|
this.filterParams.stime = new Date(start.toLocaleDateString()).getTime() - 3600 * 1000 * 24 * (nowWeekDay - 1)
|
|
|
this.filterParams.etime = end.getTime()
|
|
|
- } else if (index === 2) {
|
|
|
+ } else if (index === 3) {
|
|
|
const end = new Date();
|
|
|
let curYear = end.getFullYear()
|
|
|
let curMonth = end.getMonth() + 1
|
|
|
const start = new Date(`${curYear}/${curMonth}/01`);
|
|
|
this.filterParams.stime = start.getTime()
|
|
|
this.filterParams.etime = end.getTime()
|
|
|
- } else if (index === 3) {
|
|
|
+ } else if (index === 4) {
|
|
|
let semesterRange = this.$tools.getSemesterTimeRange()
|
|
|
this.filterJson.sTime = semesterRange.st
|
|
|
this.filterJson.eTime = semesterRange.et
|
|
|
this.filterParams.stime = semesterRange.st
|
|
|
this.filterParams.etime = semesterRange.et
|
|
|
- } else if (index === 4) {
|
|
|
+ } else if (index === 5) {
|
|
|
this.showRangePicker = true
|
|
|
return
|
|
|
} else {
|
|
@@ -831,6 +835,18 @@ export default {
|
|
|
this.filterParams.expire = false
|
|
|
this.filterParams.isOk = true
|
|
|
}
|
|
|
+ } else if (type === 'type') {
|
|
|
+ this.curTypeIndex = index
|
|
|
+ if (index === 0) {
|
|
|
+ this.filterParams.doubleGreen = false
|
|
|
+ this.filterParams.doubleRed = false
|
|
|
+ } else if (index === 1) {
|
|
|
+ this.filterParams.doubleGreen = true
|
|
|
+ this.filterParams.doubleRed = false
|
|
|
+ } else if (index === 2) {
|
|
|
+ this.filterParams.doubleGreen = false
|
|
|
+ this.filterParams.doubleRed = true
|
|
|
+ }
|
|
|
}
|
|
|
this.doFilter()
|
|
|
},
|
|
@@ -1050,6 +1066,11 @@ export default {
|
|
|
curPeriod() {
|
|
|
return this.$store.state.user.curPeriod
|
|
|
},
|
|
|
+ getLevelColor() {
|
|
|
+ return level => {
|
|
|
+ return ['#ff2d2d', '#ffc018', '#00b214'][level]
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
'$store.state.user.curPeriod': {
|
|
@@ -1059,7 +1080,7 @@ export default {
|
|
|
if (n) {
|
|
|
this.initFilter()
|
|
|
this.initTags()
|
|
|
- // this.getAnalysisCount()
|
|
|
+ this.getAnalysisCount()
|
|
|
}
|
|
|
}
|
|
|
}
|