需求优化
This commit is contained in:
parent
be8bf45d97
commit
236fd6f667
|
|
@ -113,7 +113,7 @@
|
||||||
style="width: 400px"
|
style="width: 400px"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="签到二维码:" prop="qrCodeUrl">
|
<!-- <el-form-item label="签到二维码:" prop="qrCodeUrl">
|
||||||
<vue-qr
|
<vue-qr
|
||||||
ref="qrCode"
|
ref="qrCode"
|
||||||
:text="queryParams.qrCodeUuid"
|
:text="queryParams.qrCodeUuid"
|
||||||
|
|
@ -122,12 +122,52 @@
|
||||||
width="100"
|
width="100"
|
||||||
height="100"
|
height="100"
|
||||||
></vue-qr>
|
></vue-qr>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
|
|
||||||
|
<!-- 添加课件 -->
|
||||||
|
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
|
<el-button type="primary" size="mini" @click="handleAddCourseWare">添加课件</el-button>
|
||||||
<el-button type="primary" size="mini" @click="handleAddExam" :disabled="examTableData.length > 0">
|
<el-button type="primary" size="mini" @click="handleAddExam" :disabled="examTableData.length > 0">
|
||||||
添加考试
|
添加考试
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="课件信息:">
|
||||||
|
<el-card :style="{ marginTop: '20px' }">
|
||||||
|
<!-- 课件信息 -->
|
||||||
|
<div>
|
||||||
|
<el-table :data="courseWareSelectionRows" highlight-current-row style="width: 100%" border>
|
||||||
|
<el-table-column type="index" width="55" label="序号" align="center" />
|
||||||
|
<el-table-column prop="coursewareName" label="课件名称" align="center" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="coursewareSize" label="大小" align="center">
|
||||||
|
<template slot-scope="scope">{{ scope.row.coursewareSize }}MB</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="studyTime" label="时长" align="center">
|
||||||
|
<template slot-scope="scope">{{ (scope.row.studyTime / 60).toFixed(2) }}分钟</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
style="color: #e47470"
|
||||||
|
@click="handleDeleteCourseWare(scope.row)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <div class="bottom-btn">
|
||||||
|
<el-button type="primary" size="mini">确定</el-button>
|
||||||
|
<el-button size="mini">取消</el-button>
|
||||||
|
</div> -->
|
||||||
|
</el-card>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="考试信息:">
|
<el-form-item label="考试信息:">
|
||||||
<el-card :style="{ marginTop: '20px' }">
|
<el-card :style="{ marginTop: '20px' }">
|
||||||
<!-- 考试信息 -->
|
<!-- 考试信息 -->
|
||||||
|
|
@ -187,6 +227,41 @@
|
||||||
<el-button @click="dialogTransfer = false">取 消</el-button>
|
<el-button @click="dialogTransfer = false">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 添加课件 -->
|
||||||
|
<el-dialog title="添加课件" :visible.sync="addCourseWareDialogVisible" width="50%">
|
||||||
|
<el-form :model="queryCourseWareParams" ref="queryCourseWareParams" label-width="120px" inline>
|
||||||
|
<el-form-item label="课件名称" prop="CourseWareName">
|
||||||
|
<el-input v-model="queryCourseWareParams.coursewareName" placeholder="请输入课件名称" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button size="mini" icon="el-icon-search" type="primary" @click="getCourseWareList">查询</el-button>
|
||||||
|
<el-button size="mini" icon="el-icon-refresh" type="warning" @click="handleResetCourseWare">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-table :data="courseWareTableData" border @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="index" width="55" label="序号" align="center" />
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column prop="coursewareName" label="课件名称" align="center" />
|
||||||
|
<el-table-column prop="coursewareSize" label="大小" align="center" />
|
||||||
|
<el-table-column prop="studyTime" label="时长" align="center" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="courseWareTotal > 0"
|
||||||
|
:total="courseWareTotal"
|
||||||
|
:page.sync="queryCourseWareParams.pageNum"
|
||||||
|
:limit.sync="queryCourseWareParams.pageSize"
|
||||||
|
@pagination="getCourseWareList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleAddCourseWareConfirm" v-preventReClick="5000">确定添加</el-button>
|
||||||
|
<el-button @click="addCourseWareDialogVisible = false">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -204,6 +279,8 @@ import {
|
||||||
import { StrUtil } from '@/utils/StrUtil'
|
import { StrUtil } from '@/utils/StrUtil'
|
||||||
import GeneralDialog from '@/views/educationalTraining/learningManagement/learningTasks/components/GeneralDialog.vue'
|
import GeneralDialog from '@/views/educationalTraining/learningManagement/learningTasks/components/GeneralDialog.vue'
|
||||||
|
|
||||||
|
import { getCoursewareTreeTableByTask } from '@/api/educationalTraining/resourceAdministration'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { GeneralDialog, ExamDialog, CreateTestPaperDialog, treeTransfer, VueQr },
|
components: { GeneralDialog, ExamDialog, CreateTestPaperDialog, treeTransfer, VueQr },
|
||||||
dicts: ['sys_train_level', 'sys_edu_type'],
|
dicts: ['sys_train_level', 'sys_edu_type'],
|
||||||
|
|
@ -286,6 +363,23 @@ export default {
|
||||||
currentTreeData: [],
|
currentTreeData: [],
|
||||||
currentUserList: [],
|
currentUserList: [],
|
||||||
qrCodeImage: '',
|
qrCodeImage: '',
|
||||||
|
// 课件表格数据
|
||||||
|
courseWareTableData: [],
|
||||||
|
// 添加课件表单
|
||||||
|
addCourseWareForm: {
|
||||||
|
CourseWareName: '',
|
||||||
|
},
|
||||||
|
|
||||||
|
queryCourseWareParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
keyWord: '',
|
||||||
|
coursewareName: '',
|
||||||
|
},
|
||||||
|
|
||||||
|
courseWareTotal: 0,
|
||||||
|
addCourseWareDialogVisible: false,
|
||||||
|
courseWareSelectionRows: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -308,6 +402,8 @@ export default {
|
||||||
this.queryParams.timeRange = [data.startDate, data.endDate]
|
this.queryParams.timeRange = [data.startDate, data.endDate]
|
||||||
console.log('🚀 ~ getDetail ~ this.queryParams:', this.queryParams)
|
console.log('🚀 ~ getDetail ~ this.queryParams:', this.queryParams)
|
||||||
this.examTableData = data.examPaperList
|
this.examTableData = data.examPaperList
|
||||||
|
|
||||||
|
this.courseWareSelectionRows = data.coursewareVos
|
||||||
this.userIdList = data.userIdList
|
this.userIdList = data.userIdList
|
||||||
this.currentUserList = data.userIdList
|
this.currentUserList = data.userIdList
|
||||||
await this.getPersonTreeByType()
|
await this.getPersonTreeByType()
|
||||||
|
|
@ -327,6 +423,43 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 添加课件
|
||||||
|
async handleAddCourseWare() {
|
||||||
|
this.getCourseWareList()
|
||||||
|
this.addCourseWareDialogVisible = true
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取课件列表
|
||||||
|
async getCourseWareList() {
|
||||||
|
this.queryCourseWareParams.keyWord = this.queryCourseWareParams.coursewareName
|
||||||
|
const res = await getCoursewareTreeTableByTask(this.queryCourseWareParams)
|
||||||
|
this.courseWareTotal = res.total
|
||||||
|
this.courseWareTableData = res.rows
|
||||||
|
},
|
||||||
|
|
||||||
|
// 重置
|
||||||
|
handleResetCourseWare() {
|
||||||
|
this.queryCourseWareParams.pageNum = 1
|
||||||
|
this.queryCourseWareParams.pageSize = 10
|
||||||
|
this.queryCourseWareParams.coursewareName = ''
|
||||||
|
this.getCourseWareList()
|
||||||
|
},
|
||||||
|
|
||||||
|
// 添加课件-确定
|
||||||
|
handleAddCourseWareConfirm() {
|
||||||
|
this.addCourseWareDialogVisible = false
|
||||||
|
},
|
||||||
|
|
||||||
|
handleSelectionChange(val) {
|
||||||
|
console.log('---123', val)
|
||||||
|
this.courseWareSelectionRows = val
|
||||||
|
},
|
||||||
|
|
||||||
|
handleDeleteCourseWare(row) {
|
||||||
|
this.courseWareTableData = this.courseWareTableData.filter(item => item.coursewareId !== row.coursewareId)
|
||||||
|
},
|
||||||
|
|
||||||
// 学习对象
|
// 学习对象
|
||||||
changeTaskFor(val) {
|
changeTaskFor(val) {
|
||||||
// 清除培训人数
|
// 清除培训人数
|
||||||
|
|
@ -546,6 +679,7 @@ export default {
|
||||||
userIdList: this.userIdList, // 人员ids
|
userIdList: this.userIdList, // 人员ids
|
||||||
examPaperList: this.examTableData, // 考试数组
|
examPaperList: this.examTableData, // 考试数组
|
||||||
delExamPaperIds: this.delExamPaperIds, // 删除的考试ids
|
delExamPaperIds: this.delExamPaperIds, // 删除的考试ids
|
||||||
|
coursewareIdList: this.courseWareSelectionRows.map(item => item.coursewareId), // 课件数组
|
||||||
trainId: this.trainId || '',
|
trainId: this.trainId || '',
|
||||||
}
|
}
|
||||||
delete params.timeRange
|
delete params.timeRange
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="二维码" align="center">
|
<!-- <el-table-column label="二维码" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<el-image
|
<el-image
|
||||||
fit="cover"
|
fit="cover"
|
||||||
|
|
@ -107,7 +107,7 @@
|
||||||
:src="'data:image/png;base64,' + row.qrCodeUuid"
|
:src="'data:image/png;base64,' + row.qrCodeUuid"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="操作" align="center" width="220">
|
<el-table-column label="操作" align="center" width="220">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue