dev_202412
yujialong 2 months ago
parent aca04f3719
commit a6a5fe7bc2
  1. 1
      src/api/index.js
  2. 14
      src/pages/achievement/list/index.vue
  3. 20
      src/pages/lesson/content/index.vue
  4. 19
      src/pages/lesson/content/source.vue
  5. 19
      src/pages/project/list/index.vue
  6. 7
      src/pages/resourse/upload.vue
  7. 21
      src/pages/student/list/index.vue
  8. 40
      src/pages/system/list/index.vue
  9. 2
      src/pages/theoryExam/index.vue

@ -74,6 +74,7 @@ export default {
getDetailByAccount: `occupationlab/occupationlab/architecture/getDetailByAccount`, // 新增用户前调用:按帐户获取详细信息 getDetailByAccount: `occupationlab/occupationlab/architecture/getDetailByAccount`, // 新增用户前调用:按帐户获取详细信息
importStudent: `${host}occupationlab/occupationlab/architecture/importStudent`, // 批量导入学生 importStudent: `${host}occupationlab/occupationlab/architecture/importStudent`, // 批量导入学生
exportFailure: `${host}occupationlab/occupationlab/architecture/exportFailure`, // 批量导入学生失败数据导出 exportFailure: `${host}occupationlab/occupationlab/architecture/exportFailure`, // 批量导入学生失败数据导出
excelExportStudentList: `${host}occupationlab/occupationlab/architecture/excelExportStudentList`,
removeStudent: `occupationlab/occupationlab/architecture/removeStudent`, // 移除学生 removeStudent: `occupationlab/occupationlab/architecture/removeStudent`, // 移除学生
organizationalStudentList: `occupationlab/occupationlab/architecture/organizationalStudentList`, // 根据组织架构筛选学生列表 organizationalStudentList: `occupationlab/occupationlab/architecture/organizationalStudentList`, // 根据组织架构筛选学生列表
studentList: `occupationlab/occupationlab/architecture/studentList`, // 学生列表 studentList: `occupationlab/occupationlab/architecture/studentList`, // 学生列表

@ -1,15 +1,12 @@
<template> <template>
<div class="page"> <div class="page">
<div class="tabs"> <div class="tabs">
<a class="item" <a class="item" v-for="(item, index) in tabs" :key="index" :class="{ active: index == active }"
v-for="(item,index) in tabs" @click="tabChange(index)">{{ item }}</a>
:key="index"
:class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div> </div>
<div class="page-content"> <div class="page-content">
<Course v-if="active == 'tab1'" /> <Course v-if="active == 'tab1'" />
<Project v-if="active == 'tab2'" /> <Project v-if="active == 'tab2' || active == 'tab3'" />
</div> </div>
</div> </div>
</template> </template>
@ -32,7 +29,7 @@ export default {
tabs: { tabs: {
tab1: '课程维度', tab1: '课程维度',
tab2: '项目维度', tab2: '项目维度',
// tab3: '', tab3: '我的课程',
}, },
}; };
}, },
@ -66,5 +63,4 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -96,8 +96,8 @@
:close-on-click-modal="false"> :close-on-click-modal="false">
<el-form ref="form" :model="sectionForm" label-width="80px" @submit.native.prevent> <el-form ref="form" :model="sectionForm" label-width="80px" @submit.native.prevent>
<el-form-item label="资源添加"> <el-form-item label="资源添加">
<Upload :max-size="100000" :file-list="uploadList" :on-remove="handleRemove" @beforeUpload="beforeUpload" <Upload :max-size="100000" :limit="10000" :file-list="uploadList" :on-remove="handleRemove"
@onSuccess="uploadSuccess"> @beforeUpload="beforeUpload" @onSuccess="uploadSuccess">
<template slot="tip"> <template slot="tip">
<p>视频请上传MP4格式大小不超过150Moffice文件大小不要超过10M</p> <p>视频请上传MP4格式大小不超过150Moffice文件大小不要超过10M</p>
</template> </template>
@ -117,8 +117,8 @@
<el-dialog title="更换文件" :visible.sync="switchVisible" width="540px" :close-on-click-modal="false" <el-dialog title="更换文件" :visible.sync="switchVisible" width="540px" :close-on-click-modal="false"
@close="closeSwitch"> @close="closeSwitch">
<div style="text-align: center"> <div style="text-align: center">
<Upload :max-size="100000" :file-list="uploadList" :on-remove="handleRemove" @beforeUpload="beforeUpload" <Upload :max-size="100000" :limit="10000" :file-list="uploadList" :on-remove="handleRemove"
@onSuccess="uploadSuccess"> @beforeUpload="beforeUpload" @onSuccess="uploadSuccess">
<div slot="tip"></div> <div slot="tip"></div>
</Upload> </Upload>
</div> </div>
@ -389,6 +389,10 @@ export default {
this.fileType = file.format this.fileType = file.format
this.fileUrl = file.url this.fileUrl = file.url
this.fileName = file.name this.fileName = file.name
this.uploadList = [{
name: file.name,
url: file.url,
}]
}, },
uploadError (err, file, fileList) { uploadError (err, file, fileList) {
this.$message({ this.$message({
@ -586,9 +590,13 @@ export default {
}, },
// //
editSection () { editSection () {
this.sectionForm.sectionName = this.curSection.name const row = this.curSection
this.sectionForm.sectionName = row.name
this.fileUrl = '' this.fileUrl = ''
this.uploadList = [] this.uploadList = [{
name: row.originalFileName,
url: row.fileUrl,
}]
this.isAddSection = false this.isAddSection = false
this.sectionVisible = true this.sectionVisible = true
}, },

@ -63,9 +63,8 @@
<span>资源类型</span> <span>资源类型</span>
</div> </div>
<ul class="lines"> <ul class="lines">
<li v-for="(item, i) in sourceType" :key="i" class="line"> <li v-for="(item, i) in sourceType" :key="i" :class="['line', { active: curType === item.name }]"
<el-checkbox v-model="item.check" :label="item.name" @change="getCourse"></el-checkbox> @click="checkType(item)">{{ item.name }}</li>
</li>
</ul> </ul>
</div> </div>
@ -144,6 +143,7 @@ export default {
tab3: '文件素材', tab3: '文件素材',
}, },
sourceType: SourceConst.types, sourceType: SourceConst.types,
curType: '',
sources: [], sources: [],
checkAll: false, checkAll: false,
keyword: '', keyword: '',
@ -193,7 +193,7 @@ export default {
platformId: Setting.platformId, platformId: Setting.platformId,
type: 2, type: 2,
keyword: this.keyword, keyword: this.keyword,
displayFileType: this.sourceType.filter(e => e.check).map(e => e.name), displayFileType: this.curType ? [this.curType] : [],
}) })
const list = page.records const list = page.records
list.forEach(e => { list.forEach(e => {
@ -315,6 +315,11 @@ export default {
this.sourceChange(e) this.sourceChange(e)
}) })
}, },
//
checkType ({ name }) {
this.curType = name
this.getCourse()
},
// //
sourceChange (row) { sourceChange (row) {
const { check } = row const { check } = row
@ -575,6 +580,12 @@ export default {
.line { .line {
margin-bottom: 10px; margin-bottom: 10px;
cursor: pointer;
&.active {
font-weight: 600;
color: #062c87;
}
} }
} }

@ -6,7 +6,7 @@
<div class="page"> <div class="page">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter" style="flex-wrap: wrap;">
<li> <li>
<label>创建人</label> <label>创建人</label>
<el-select v-model="form.founder" placeholder="请选择创建人" @change="founderChange"> <el-select v-model="form.founder" placeholder="请选择创建人" @change="founderChange">
@ -28,6 +28,13 @@
:value="item.value"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</li> </li>
<li>
<label>类型</label>
<el-radio-group v-model="form.type" @change="initData">
<el-radio v-for="(item, i) in projectType" :key="i" :label="item.id" border>{{ item.name
}}</el-radio>
</el-radio-group>
</li>
<li> <li>
<label>课程</label> <label>课程</label>
<el-cascader v-model="cid" :options="curs" :props="{ checkStrictly: true, value: 'id' }" <el-cascader v-model="cid" :options="curs" :props="{ checkStrictly: true, value: 'id' }"
@ -161,6 +168,7 @@ export default {
cid: this.$route.query.cid ? +this.$route.query.cid : '', cid: this.$route.query.cid ? +this.$route.query.cid : '',
mallId: this.$route.query.mallId ? +this.$route.query.mallId : '', mallId: this.$route.query.mallId ? +this.$route.query.mallId : '',
systemId: this.$route.query.systemId ? +this.$route.query.systemId : '', systemId: this.$route.query.systemId ? +this.$route.query.systemId : '',
type: 0,
}, },
status: "", status: "",
listData: [], listData: [],
@ -180,6 +188,15 @@ export default {
label: "竞赛" label: "竞赛"
} }
], ],
projectType: [
{
id: 0,
name: '校本课程'
}, {
id: 1,
name: '我的课程'
}
],
permissionsKeys: { permissionsKeys: {
0: "练习", 0: "练习",
1: "考核", 1: "考核",

@ -4,7 +4,7 @@
<el-form label-width="80px" style="padding: 20px"> <el-form label-width="80px" style="padding: 20px">
<el-form-item prop="userName"> <el-form-item prop="userName">
<el-upload name="file" ref="upload" class="import-file" drag :before-upload="beforeUpload" <el-upload name="file" ref="upload" class="import-file" drag :before-upload="beforeUpload"
:on-remove="handleRemove" :on-error="uploadError" :before-remove="beforeRemove" :limit="1" :on-remove="handleRemove" :on-error="uploadError" :before-remove="beforeRemove" :limit="10000"
:disabled="uploading" v-loading="uploading" :on-exceed="handleExceed" :file-list="uploadList" action="" :disabled="uploading" v-loading="uploading" :on-exceed="handleExceed" :file-list="uploadList" action=""
:http-request="handleRequest"> :http-request="handleRequest">
<!-- <img v-if="form.coverUrl" :src="form.coverUrl" class="avatar"> --> <!-- <img v-if="form.coverUrl" :src="form.coverUrl" class="avatar"> -->
@ -105,6 +105,11 @@ export default {
this.form.fileUrl = res.url this.form.fileUrl = res.url
this.form.fileName = res.name this.form.fileName = res.name
this.handleType(res.format) this.handleType(res.format)
this.uploadList = [{
name: res.name,
url: res.url
}]
}) })
}, },
uploadError () { uploadError () {

@ -73,6 +73,8 @@
<el-button type="info" @click="batchGenerate">一键批量生成账号</el-button> <el-button type="info" @click="batchGenerate">一键批量生成账号</el-button>
<el-button type="info" v-auth="'/student/list:新增学生'" @click="addStudent">新增学生</el-button> <el-button type="info" v-auth="'/student/list:新增学生'" @click="addStudent">新增学生</el-button>
<el-button type="primary" v-auth="'/student/list:批量导入'" @click="batchImport">批量导入</el-button> <el-button type="primary" v-auth="'/student/list:批量导入'" @click="batchImport">批量导入</el-button>
<el-button type="primary" :loading="exporting" @click="exportData">{{ exporting ? '正在导出' : '批量导出'
}}</el-button>
<el-button type="primary" v-auth="'/student/list:批量删除'" @click="delAllSelection">批量删除</el-button> <el-button type="primary" v-auth="'/student/list:批量删除'" @click="delAllSelection">批量删除</el-button>
</div> </div>
</div> </div>
@ -213,6 +215,7 @@ import Setting from '@/setting'
import OrgTree from "@/components/org-tree/src/tree"; import OrgTree from "@/components/org-tree/src/tree";
import { mapState } from "vuex"; import { mapState } from "vuex";
import _ from 'lodash' import _ from 'lodash'
import axios from 'axios'
export default { export default {
components: { OrgTree }, components: { OrgTree },
data () { data () {
@ -357,6 +360,8 @@ export default {
{ required: true, message: '请输入账号数', trigger: 'blur' } { required: true, message: '请输入账号数', trigger: 'blur' }
], ],
}, },
exporting: false,
}; };
}, },
computed: { computed: {
@ -999,7 +1004,21 @@ export default {
this.handleClose(); this.handleClose();
this.handleRefresh(); this.handleRefresh();
this.initData(); this.initData();
} },
// ()
async exportData () {
if (this.listData.length) {
this.exporting = true
//
const res = await axios.post(this.api.excelExportStudentList, this.multipleSelection.length ? this.multipleSelection : [], {
headers: this.headers,
responseType: 'blob'
})
const name = res.headers['content-disposition']
Util.downloadFileDirect(name ? decodeURI(name) : '学生列表.xlsx', new Blob([res.data]))
this.exporting = false
}
},
} }
}; };
</script> </script>

@ -1,13 +1,17 @@
<template> <template>
<div class="page" style="padding: 0"> <div class="page" style="padding: 10px;">
<div class="tabs"> <el-tabs v-model="active" type="card">
<el-tab-pane v-for="(item, i) in tabs" :key="i" :label="item.name" :name="item.id"></el-tab-pane>
</el-tabs>
<!-- <div class="tabs">
<a class="item" v-for="(item, index) in tabs" :key="index" :class="{ active: index == active }" <a class="item" v-for="(item, index) in tabs" :key="index" :class="{ active: index == active }"
@click="tabChange(index)">{{ item }}</a> @click="tabChange(index)">{{ item }}</a>
</div> </div> -->
<staff v-if="active == 'staff'"></staff> <staff v-if="active === '1'"></staff>
<role v-if="active == 'role'"></role> <role v-if="active === '2'"></role>
<logo v-if="active == 'logo'"></logo> <logo v-if="active === '3'"></logo>
</div> </div>
</template> </template>
@ -20,12 +24,21 @@ import logo from "./logo";
export default { export default {
data () { data () {
return { return {
active: "staff", active: '1',
tabs: { tabs: [
staff: "教师管理", {
role: "角色权限", id: '1',
logo: "系统logo设置", name: '教师管理'
} },
{
id: '2',
name: '角色权限'
},
{
id: '3',
name: '系统logo设置'
},
],
}; };
}, },
computed: { computed: {
@ -42,9 +55,6 @@ export default {
Setting.dynamicRoute && this.initTabs() Setting.dynamicRoute && this.initTabs()
}, },
methods: { methods: {
tabChange (index) {
this.active = index
},
initTabs () { initTabs () {
const { btns } = this const { btns } = this
const tab1 = btns.includes('/system/list:教师管理') const tab1 = btns.includes('/system/list:教师管理')

@ -178,7 +178,7 @@ export default {
token: Util.local.get(Setting.tokenKey), token: Util.local.get(Setting.tokenKey),
paperId: +this.$route.query.paperId, // id paperId: +this.$route.query.paperId, // id
cid: +this.$route.query.cid, cid: +this.$route.query.cid,
mallId: +this.$route.query.mallId, mallId: +this.$route.query.mallId || '',
curriculumName: this.$route.query.curriculumName, curriculumName: this.$route.query.curriculumName,
assessmentId: this.$route.query.assessmentId, // id assessmentId: this.$route.query.assessmentId, // id
classId: this.$route.query.classId, classId: this.$route.query.classId,

Loading…
Cancel
Save