diff --git a/src/views/changeJobManagement/trainingRecordManagement.vue b/src/views/changeJobManagement/trainingRecordManagement.vue
index 13ac089d..c24d9a08 100644
--- a/src/views/changeJobManagement/trainingRecordManagement.vue
+++ b/src/views/changeJobManagement/trainingRecordManagement.vue
@@ -15,38 +15,80 @@
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
+ @sort-change="sortChange"
>
- 批量下发
- 资料批量上传
- 培训完成
+
+ 批量下发
+
+
+ 资料批量上传
+
+
+ 培训完成
+
+
+ 培训详情
+
-
- 修改
+ 修改
+
培训详情
- 下发
+
+ 下发
+
资料上传
+ 资料上传
+
完成
+ 完成
+
{{ scope.row.distributeTime ? scope.row.distributeTime.substring(0, 10) : '' }}
@@ -65,7 +107,7 @@
@@ -78,7 +120,12 @@
- 资料下载
+ 资料下载
@@ -141,6 +188,7 @@ import {
} from '@/api/workLicense/trainingRecordManagement';
import { getPlanList } from '@/api/workLicense/jobTransferManagement';
import { getUserList } from '@/api/workLicense/workLicense';
+import { mapGetters } from 'vuex';
export default {
data() {
@@ -163,6 +211,7 @@ export default {
currentPage: 1,
total: 0,
},
+ query: {},
fileDialog: false,
fileForm: {},
fileOption: {
@@ -238,6 +287,7 @@ export default {
labelWidth: 140,
overflow: true,
search: true,
+ sortable: 'custom',
},
{
label: '工号',
@@ -246,6 +296,7 @@ export default {
labelWidth: 140,
overflow: true,
search: true,
+ sortable: 'custom',
},
{
label: '用工类型',
@@ -254,6 +305,7 @@ export default {
span: 8,
labelWidth: 150,
search: false,
+ sortable: 'custom',
width: 200,
editDisplay: false,
rules: [
@@ -276,6 +328,7 @@ export default {
labelWidth: 140,
overflow: true,
search: true,
+ // sortable: 'custom',
},
{
label: '培训周期(天)',
@@ -284,6 +337,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
+ sortable: 'custom',
},
{
label: '预警周期(天)',
@@ -292,6 +346,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
+ sortable: 'custom',
},
{
label: '培训计划',
@@ -300,6 +355,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
+ sortable: 'custom',
},
{
label: '培训师',
@@ -308,6 +364,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
+ // sortable: 'custom',
},
{
label: '培训时间',
@@ -322,6 +379,7 @@ export default {
labelWidth: 140,
overflow: true,
search: false,
+ sortable: 'custom',
},
{
label: '状态',
@@ -331,6 +389,7 @@ export default {
labelWidth: 140,
overflow: true,
search: true,
+ // sortable: 'custom',
dicUrl: '/blade-system/dict/dictionary?code=training_ecord_tatus',
props: {
label: 'dictValue',
@@ -341,15 +400,39 @@ export default {
},
uploadInfo: {},
rowData: {},
- attachLink:''
+ attachLink: '',
};
},
+ computed: {
+ ...mapGetters(['permission']),
+ permissionList() {
+ return {
+ batchDistributionBtn: this.validData(
+ this.permission.trainingRecordManagement_batchDistribution,
+ false
+ ),
+ editBtn: this.validData(this.permission.trainingRecordManagement_edit, false),
+ batchUploadOfMaterialsBtn: this.validData(
+ this.permission.trainingRecordManagement_batchUploadOfMaterials,
+ false
+ ),
+ trainingCompletedBtn: this.validData(
+ this.permission.trainingRecordManagement_trainingCompleted,
+ false
+ ),
+ trainingDetailsBtn: this.validData(
+ this.permission.trainingRecordManagement_trainingDetails,
+ false
+ ),
+ };
+ },
+ },
mounted() {
this.getPlanList();
this.getUserList();
},
methods: {
- downloadFile(link) {
+ downloadFile(link) {
window.open(link);
},
// 修改配置
@@ -393,6 +476,15 @@ export default {
refreshChange() {
this.onLoad(this.page, this.query);
},
+ // 排序
+ sortChange({ prop, order }) {
+ this.query.descs = undefined;
+ this.query.ascs = undefined;
+ let orderByFieldKey = order === 'descending' ? 'descs' : 'ascs';
+ this.query[orderByFieldKey] = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase();
+ // 重新加载数据
+ this.onLoad(this.page, this.query);
+ },
searchReset() {
this.query = {};
this.onLoad(this.page, this.query);
@@ -460,7 +552,7 @@ export default {
},
uploadAfter(res, done, loading, column) {
console.log('uploadAfter', res, done, loading, column);
- this.attachLink = res.link;
+ this.attachLink = res.link;
// this.fileForm.excelFile = [res.link];
// done();
},
@@ -492,10 +584,10 @@ export default {
},
// 批量上传数据
submitUpload() {
- console.log(this.fileForm,this.attachLink , 'fileForm');
+ console.log(this.fileForm, this.attachLink, 'fileForm');
if (this.selectionList.length > 0) {
this.selectionList.forEach(item => {
- item.attachLink = this.attachLink ;
+ item.attachLink = this.attachLink;
});
uploadMaterials(this.selectionList).then(res => {
this.$message.success('上传成功');
@@ -505,7 +597,7 @@ export default {
});
} else {
this.uploadInfo.forEach(item => {
- this.fileForm.attachLink = this.attachLink ;
+ this.fileForm.attachLink = this.attachLink;
});
uploadMaterials(this.uploadInfo).then(res => {
this.$message.success('上传成功');