|
|
@@ -6,16 +6,16 @@
|
|
|
<el-form :model="queryParams" class="form-box" ref="queryForm"
|
|
|
:inline="true" style="width:100%;"
|
|
|
>
|
|
|
- <el-form-item label="" prop="queryParamsData1">
|
|
|
+ <el-form-item label="" prop="searchValue">
|
|
|
<el-input
|
|
|
maxLength="30"
|
|
|
- v-model="queryParams.queryParamsData1"
|
|
|
+ v-model="queryParams.searchValue"
|
|
|
placeholder="搜索培训名称、主讲人"
|
|
|
style="width: 200px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData2">
|
|
|
- <el-select v-model="queryParams.queryParamsData2" placeholder="状态" style="width: 200px">
|
|
|
+ <el-form-item label="" prop="status">
|
|
|
+ <el-select v-model="queryParams.status" placeholder="状态" style="width: 200px">
|
|
|
<el-option
|
|
|
v-for="dict in optionListA"
|
|
|
:key="dict.value"
|
|
|
@@ -24,8 +24,8 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData3">
|
|
|
- <el-select v-model="queryParams.queryParamsData3" placeholder="培训方式" style="width: 200px">
|
|
|
+ <el-form-item label="" prop="trainingMode">
|
|
|
+ <el-select v-model="queryParams.trainingMode" placeholder="培训方式" style="width: 200px">
|
|
|
<el-option
|
|
|
v-for="dict in optionListD"
|
|
|
:key="dict.value"
|
|
|
@@ -34,25 +34,25 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="queryParamsData4">
|
|
|
- <el-select v-model="queryParams.queryParamsData4" placeholder="分类" style="width: 200px">
|
|
|
+ <el-form-item label="" prop="categoryId">
|
|
|
+ <el-select v-model="queryParams.categoryId" placeholder="分类" style="width: 200px">
|
|
|
<el-option
|
|
|
v-for="dict in optionListB"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
+ :key="dict.id"
|
|
|
+ :label="dict.categoryName"
|
|
|
+ :value="dict.id"
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" prop="deptId">
|
|
|
+ <el-form-item label="" prop="orgDeptId">
|
|
|
<el-cascader
|
|
|
style="width: 180px"
|
|
|
- v-model="queryParams.deptId"
|
|
|
+ v-model="queryParams.orgDeptId"
|
|
|
:options="optionListC"
|
|
|
:props="{
|
|
|
emitPath:false,
|
|
|
checkStrictly: true,
|
|
|
- value: 'deptId',
|
|
|
+ value: 'orgDeptId',
|
|
|
label: 'deptName',
|
|
|
children: 'child',
|
|
|
}"
|
|
|
@@ -79,39 +79,38 @@
|
|
|
<p class="page-submit-common-style-button"
|
|
|
style="float: right;"
|
|
|
@click="tableButton(1)"
|
|
|
- v-hasPermiRouter="['demo:demo:add']"
|
|
|
>新增</p>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="page-content-box">
|
|
|
<el-table class="table-box" border :data="dataList">
|
|
|
- <el-table-column label="培训名称" prop="name" show-overflow-tooltip>
|
|
|
+ <el-table-column label="培训名称" prop="trainingName" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span @click="tableButton(2)">{{scope.row.name}}</span>
|
|
|
+ <span @click="tableButton(2)">{{scope.row.trainingName}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="分类" prop="content" width="200" show-overflow-tooltip>
|
|
|
+ <el-table-column label="分类" prop="categoryName" width="140" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span style="color:#1857d4;">{{scope.row.name}}</span>
|
|
|
+ <span style="color:#1857d4;">{{scope.row.categoryName}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="培训时间" prop="createTime" width="200" show-overflow-tooltip>
|
|
|
+ <el-table-column label="培训时间" prop="startDate" width="160" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- <p>{{ parseTime(scope.row.createTime,"{y}-{m}-{d} {h}:{i}") }}</p>
|
|
|
- <p>10:00 - 12:00</p>
|
|
|
+ <p>{{ parseTime(scope.row.startDate,"{y}-{m}-{d} {h}:{i}") }} 至</p>
|
|
|
+ <p>{{ parseTime(scope.row.endDate,"{y}-{m}-{d} {h}:{i}") }}</p>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="组织单位" prop="name" width="140" show-overflow-tooltip/>
|
|
|
- <el-table-column label="培训方式" prop="content" width="100" show-overflow-tooltip>
|
|
|
+ <el-table-column label="组织单位" prop="orgDeptName" width="140" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="培训方式" prop="trainingMode" width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{scope.row.name==1?'线上培训':(scope.row.name==2?'线下培训':'')}}</span>
|
|
|
+ <span>{{scope.row.trainingMode==1?'线上培训':(scope.row.trainingMode==2?'线下培训':'')}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="学时/积分" prop="content" width="140" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <span style="color:#10a37f;font-weight:600;">学时{{scope.row.name}} +{{scope.row.name}}分</span>
|
|
|
+ <span style="color:#10a37f;font-weight:600;">学时{{scope.row.creditHours}} +{{scope.row.points}}分</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="进度" prop="content" width="140" show-overflow-tooltip>
|
|
|
@@ -123,52 +122,51 @@
|
|
|
<span>{{scope.row.name}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="状态" prop="content" width="100" show-overflow-tooltip>
|
|
|
+ <el-table-column label="状态" prop="status" width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- <p :class="scope.row.status==1?'border-color-a':(scope.row.status==2?'border-color-b':(scope.row.status==3?'border-color-c':''))">{{scope.row.status==1?'进行中':(scope.row.status==2?'未开始':(scope.row.status==3?'已结束':''))}}</p>
|
|
|
+ <p :class="scope.row.status==1?'border-color-a':(scope.row.status==2?'border-color-b':(scope.row.status==3?'border-color-c':''))">{{scope.row.status==1?'未开始':(scope.row.status==2?'进行中':(scope.row.status==3?'已结束':''))}}</p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="发布" prop="state" width="100" show-overflow-tooltip>
|
|
|
+ <el-table-column label="发布" prop="publishStatus" width="100" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<el-switch
|
|
|
+ v-if="scope.row.status==1"
|
|
|
@click.native="tableButton(3,scope.row)"
|
|
|
class="switch captcha-img"
|
|
|
- :active-value="true"
|
|
|
- :inactive-value="false"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
active-color="#0183FA"
|
|
|
inactive-color="#999"
|
|
|
- v-model="scope.row.state"
|
|
|
+ v-model="scope.row.publishStatus"
|
|
|
active-text="启用"
|
|
|
inactive-text="停用"
|
|
|
disabled
|
|
|
></el-switch>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="240" show-overflow-tooltip v-if="tableButtonType">
|
|
|
+ <el-table-column label="操作" width="240" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
<div class="table-button-box">
|
|
|
<p class="table-button-null"></p>
|
|
|
<p class="table-button-p"
|
|
|
v-if="scope.row.status==3"
|
|
|
@click="tableButton(4,scope.row)"
|
|
|
- v-hasPermiRouter="['demo:demo:detail']"
|
|
|
>查看记录</p>
|
|
|
<p class="table-button-p"
|
|
|
- v-if="scope.row.status!=3"
|
|
|
+ v-if="scope.row.status!=3&&scope.row.trainingMode == 1"
|
|
|
@click="tableButton(5,scope.row)"
|
|
|
- v-hasPermiRouter="['demo:demo:detail']"
|
|
|
>签到码</p>
|
|
|
<p class="table-button-p"
|
|
|
+ v-if="scope.row.status!=1"
|
|
|
@click="tableButton(6,scope.row)"
|
|
|
- v-hasPermiRouter="['demo:demo:edit']"
|
|
|
>进度</p>
|
|
|
<p class="table-button-p"
|
|
|
+ v-if="scope.row.status==1"
|
|
|
@click="tableButton(7,scope.row)"
|
|
|
- v-hasPermiRouter="['demo:demo:edit']"
|
|
|
>编辑</p>
|
|
|
<p class="table-button-p"
|
|
|
+ v-if="scope.row.status==1"
|
|
|
@click="tableButton(8,scope.row)"
|
|
|
- v-hasPermiRouter="['demo:demo:del']"
|
|
|
>删除</p>
|
|
|
<p class="table-button-null"></p>
|
|
|
</div>
|
|
|
@@ -184,7 +182,7 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--<add-page :propsData="propsData" v-if="pageType === 2"></add-page>-->
|
|
|
+ <add-page :propsData="propsData" v-if="pageType === 2"></add-page>
|
|
|
<!--培训二维码-->
|
|
|
<el-dialog class="trainingTask-dialog" title="签到二维码"
|
|
|
append-to-body v-if="dialogType"
|
|
|
@@ -224,13 +222,13 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import vueQr from 'vue-qr'
|
|
|
- //import { getDicts } from "@/api/commonality/noPermission";
|
|
|
- //import { systemUserSelect } from "@/api/commonality/permission";
|
|
|
- //import { getInfo } from "@/api/basicsModules/index";
|
|
|
import trainingProgressDetails from "./trainingProgressDetails.vue";
|
|
|
import trainingRecordDetails from "./trainingRecordDetails.vue";
|
|
|
+ import addPage from "./addPage.vue";
|
|
|
import {
|
|
|
- systemDeptCurrentDept,
|
|
|
+ systemDeptCurrentDept,examElTrainingCategorySimpleList,
|
|
|
+ examElTrainingTaskList,examElTrainingTaskPublish,
|
|
|
+ examElTrainingTaskDel,
|
|
|
} from "@/api/safetyEducationExaminationNew/index";
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
@@ -238,6 +236,7 @@
|
|
|
vueQr,
|
|
|
trainingProgressDetails,
|
|
|
trainingRecordDetails,
|
|
|
+ addPage,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -245,7 +244,7 @@
|
|
|
//页面状态
|
|
|
pageType: 1,
|
|
|
//下拉列表数据
|
|
|
- optionListA: [{ value: '0', label: '未开始' }, { value: '1', label: '进行中' }, { value: '2', label: '已结束' }],
|
|
|
+ optionListA: [{ value: '1', label: '未开始' }, { value: '2', label: '进行中' }, { value: '3', label: '已结束' }],
|
|
|
optionListB: [],
|
|
|
optionListC: [],
|
|
|
optionListD: [{ value: '1', label: '线上培训' }, { value: '2', label: '线下培训' }],
|
|
|
@@ -253,11 +252,11 @@
|
|
|
queryParams: {
|
|
|
page: 1,
|
|
|
pageSize: 20,
|
|
|
- queryParamsData1: '',
|
|
|
- queryParamsData2: null,
|
|
|
- queryParamsData3: null,
|
|
|
- queryParamsData4: null,
|
|
|
- deptId:'',
|
|
|
+ searchValue: '',
|
|
|
+ status: null,
|
|
|
+ trainingMode: null,
|
|
|
+ categoryId: null,
|
|
|
+ orgDeptId:'',
|
|
|
},
|
|
|
//时间数据
|
|
|
dateRange: [],
|
|
|
@@ -289,6 +288,7 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.systemDeptCurrentDept();
|
|
|
+ this.examElTrainingCategorySimpleList();
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -303,11 +303,11 @@
|
|
|
this.$set(this, 'queryParams', {
|
|
|
page: 1,
|
|
|
pageSize: 20,
|
|
|
- queryParamsData1: '',
|
|
|
- queryParamsData2: null,
|
|
|
- queryParamsData3: null,
|
|
|
- queryParamsData4: null,
|
|
|
- deptId:'',
|
|
|
+ searchValue: '',
|
|
|
+ status: null,
|
|
|
+ trainingMode: null,
|
|
|
+ categoryId: null,
|
|
|
+ orgDeptId:'',
|
|
|
})
|
|
|
this.getList()
|
|
|
},
|
|
|
@@ -321,13 +321,10 @@
|
|
|
obj.startTime = ''
|
|
|
obj.endTime = ''
|
|
|
}
|
|
|
- // getListFunction(obj).then(response => {
|
|
|
- // this.$set(this, 'dataList', response.data.records)
|
|
|
- // this.$set(this, 'total', response.data.total)
|
|
|
- // })
|
|
|
-
|
|
|
- this.$set(this, 'dataList', [{createTime:'2026-10-10 10:10',status:1},{createTime:'2026-10-10 10:10',status:2},{createTime:'2026-10-10 10:10',status:3}])
|
|
|
- this.$set(this, 'total', 1)
|
|
|
+ examElTrainingTaskList(obj).then(response => {
|
|
|
+ this.$set(this, 'dataList', response.data.records)
|
|
|
+ this.$set(this, 'total', response.data.total)
|
|
|
+ })
|
|
|
},
|
|
|
//操作按钮
|
|
|
tableButton(type, row) {
|
|
|
@@ -344,14 +341,14 @@
|
|
|
this.$set(this, 'propsData', obj)
|
|
|
}else if (type == 3) {
|
|
|
//启用&停用
|
|
|
- let text = row.state ? '停用' : '启用'
|
|
|
+ let text = row.publishStatus==1 ? '停用' : '启用'
|
|
|
this.$confirm('是否确认' + text + '?', '警告', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(function() {
|
|
|
}).then(() => {
|
|
|
- stateFunction({ id: row.id, state: !row.state }).then(response => {
|
|
|
+ examElTrainingTaskPublish({ id: row.id, publishStatus: row.publishStatus==1?0:1 }).then(response => {
|
|
|
self.msgSuccess(response.message)
|
|
|
self.getList()
|
|
|
})
|
|
|
@@ -367,8 +364,7 @@
|
|
|
//签到码
|
|
|
this.$set(this,'codeData',{
|
|
|
codeName:'实验室生物安全操作规范培训',
|
|
|
- vueQrCodeData:this.identification+'?code='+row.id+'&type=onlineTraining',
|
|
|
- // vueQrCodeData:this.identification+'?code='+row.id+'&type=offlineTraining',
|
|
|
+ vueQrCodeData:this.identification+'?code='+row.id+'&type='+row.trainingMode==1?'onlineTraining':'offlineTraining',
|
|
|
title:'实验室生物安全操作规范培训',
|
|
|
playTime:'2026-08-01 10:00–12:00',
|
|
|
endTime:'2026-08-01 12:30',
|
|
|
@@ -396,7 +392,7 @@
|
|
|
type: 'warning'
|
|
|
}).then(function() {
|
|
|
}).then(() => {
|
|
|
- deleteFunction({ id: row.id }).then(response => {
|
|
|
+ examElTrainingTaskDel({ id: row.id }).then(response => {
|
|
|
self.msgSuccess(response.message)
|
|
|
self.getList()
|
|
|
})
|
|
|
@@ -414,7 +410,14 @@
|
|
|
},
|
|
|
//导出记录
|
|
|
exportButton(){
|
|
|
-
|
|
|
+ let self = this;
|
|
|
+ self.$confirm(`确认导出数据?`, "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(async () => {
|
|
|
+ self.downloadGet('/exam/elTrainingTask/signInExport?id='+self.dialogListPropsData.id, self.dialogListPropsData.trainingName+'-培训记录.xlsx')
|
|
|
+ }).catch(() => {})
|
|
|
},
|
|
|
//学院列表
|
|
|
systemDeptCurrentDept(){
|
|
|
@@ -424,6 +427,12 @@
|
|
|
this.$set(this,'optionListC',list);
|
|
|
});
|
|
|
},
|
|
|
+ //培训分类列表
|
|
|
+ examElTrainingCategorySimpleList(){
|
|
|
+ examElTrainingCategorySimpleList({}).then(response => {
|
|
|
+ this.$set(this,'optionListB',response.data);
|
|
|
+ });
|
|
|
+ },
|
|
|
//进度条
|
|
|
format(percentage) {
|
|
|
return percentage === 100 ? '' : '';
|
|
|
@@ -482,11 +491,11 @@
|
|
|
height:auto;
|
|
|
line-height: 23px;
|
|
|
}
|
|
|
- .color-a{
|
|
|
+ .color-b{
|
|
|
color:#1857d4;
|
|
|
font-weight:600;
|
|
|
}
|
|
|
- .color-b{
|
|
|
+ .color-a{
|
|
|
color:#e67e22;
|
|
|
font-weight:600;
|
|
|
}
|
|
|
@@ -494,7 +503,7 @@
|
|
|
color:#10a37f;
|
|
|
font-weight:600;
|
|
|
}
|
|
|
- .border-color-a{
|
|
|
+ .border-color-b{
|
|
|
display: inline-block;
|
|
|
line-height:23px;
|
|
|
padding:0 10px;
|
|
|
@@ -502,7 +511,7 @@
|
|
|
background-color: #fef6ec;
|
|
|
color:#e67e22;
|
|
|
}
|
|
|
- .border-color-b{
|
|
|
+ .border-color-a{
|
|
|
display: inline-block;
|
|
|
line-height:23px;
|
|
|
padding:0 10px;
|