feat: 接口对接

This commit is contained in:
cgd_mac 2022-01-19 11:04:40 +08:00
parent 72ad8374db
commit 20d7f5f335
5 changed files with 91 additions and 64 deletions

View File

@ -1,39 +1,5 @@
[*] [*.{js,jsx,ts,tsx,vue}]
charset=utf-8 indent_style = space
end_of_line=lf indent_size = 2
insert_final_newline=false trim_trailing_whitespace = true
indent_style=space insert_final_newline = true
indent_size=2
[{*.ng,*.sht,*.html,*.shtm,*.shtml,*.htm}]
indent_style=space
indent_size=2
[{*.jhm,*.xslt,*.xul,*.rng,*.xsl,*.xsd,*.ant,*.tld,*.fxml,*.jrxml,*.xml,*.jnlp,*.wsdl}]
indent_style=space
indent_size=2
[{.babelrc,.stylelintrc,jest.config,.eslintrc,.prettierrc,*.json,*.jsb3,*.jsb2,*.bowerrc}]
indent_style=space
indent_size=2
[*.svg]
indent_style=space
indent_size=2
[*.js.map]
indent_style=space
indent_size=2
[*.less]
indent_style=space
indent_size=2
[*.vue]
indent_style=space
indent_size=2
[{.analysis_options,*.yml,*.yaml}]
indent_style=space
indent_size=2

View File

@ -1,24 +1,27 @@
{ {
"printWidth": 120, "printWidth": 100,
"tabWidth": 2, "overrides": [
"singleQuote": true, {
"trailingComma": "none", "files": ".prettierrc",
"semi": false, "options": { "parser": "json" }
"wrap_line_length": 220,
"wrap_attributes": "false",
"proseWrap": "auto",
"arrowParens": "avoid",
"bracketSpacing": true,
"jsxBracketSameLine": true,
"useTabs": false,
"eslintIntegration":true,
"overrides": [
{
"files": ".prettierrc",
"options": {
"parser": "json"
} }
} ],
], "tabWidth": 2,
"endOfLine": "auto" "useTabs": false,
"semi": true,
"singleQuote": true,
"proseWrap": "preserve",
"arrowParens": "avoid",
"bracketSpacing": true,
"disableLanguages": ["vue"],
"endOfLine": "auto",
"eslintIntegration": false,
"htmlWhitespaceSensitivity": "ignore",
"ignorePath": ".prettierignore",
"jsxBracketSameLine": false,
"jsxSingleQuote": false,
"requireConfig": false,
"stylelintIntegration": false,
"trailingComma": "es5",
"prettier.tslintIntegration": false
} }

View File

@ -0,0 +1,49 @@
<template>
<div>
<a-row>
<a-col class="title-info">
<span class="label">课程名称</span>
<span class="value">安全培训项目第一期</span>
</a-col>
<a-col class="title-info">
<span class="label">课时统计</span>
<span class="value">10课时1/10</span>
</a-col>
<a-col class="title-info">
<span class="label">考试成绩</span>
<span class="value">100</span>
</a-col>
<a-col class="title-info">
<span class="label">学习时间</span>
<span class="value">100分钟</span>
</a-col>
<a-col class="title-info">
<span class="label">学习方式</span>
<span class="value">学习+考试</span>
</a-col>
</a-row>
</div>
</template>
<script>
export default {
props: {
data: {
type: Object,
default: () => ({})
}
},
data () {
return {}
}
}
</script>
<style lang="less" scoped>
.title-info {
font-size: 16px;
font-weight: bold;
line-height: 2;
color: #333;
}
</style>

View File

@ -1,10 +1,14 @@
<template> <template>
<div>学习统计</div> <div>
<DbLearnCount></DbLearnCount>
</div>
</template> </template>
<script> <script>
import DbLearnCount from '@/components/DbLearnCount/index'
import { reqMycourseCount } from '@/api/mycourse/index' import { reqMycourseCount } from '@/api/mycourse/index'
export default { export default {
components: { DbLearnCount },
data () { data () {
return { return {
data: {} data: {}

View File

@ -25,10 +25,14 @@
</div> </div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="3" tab="作业"> <a-tab-pane key="3" tab="作业">
<OperationModule></OperationModule> <div class="tab-box">
<OperationModule></OperationModule>
</div>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="4" tab="学习统计"> <a-tab-pane key="4" tab="学习统计">
<StatisticalLearning></StatisticalLearning> <div class="tab-box">
<StatisticalLearning></StatisticalLearning>
</div>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
@ -45,10 +49,11 @@ import CourseCatalogue from './CourseCatalogue.vue'
import SimulationTest from './SimulationTest.vue' import SimulationTest from './SimulationTest.vue'
import ExamDialog from './ExamDialog.vue' import ExamDialog from './ExamDialog.vue'
import OperationModule from './OperationModule.vue' import OperationModule from './OperationModule.vue'
import StatisticalLearning from './StatisticalLearning.vue'
import { reqCourseDetail, reqCourseCatalogue } from '@/api/mycourse/index' import { reqCourseDetail, reqCourseCatalogue } from '@/api/mycourse/index'
export default { export default {
components: { CourseCatalogue, OperationModule, SimulationTest, ExamDialog, videoPlayer }, components: { CourseCatalogue, OperationModule, SimulationTest, ExamDialog, StatisticalLearning, videoPlayer },
data () { data () {
return { return {
activeTab: '1', activeTab: '1',