Files
school-developer/src/const/crud/aj/scjajclassinfo.js
guochunsi 74c06bb8a0 a
2025-12-31 17:40:01 +08:00

182 lines
3.8 KiB
JavaScript
Executable File

/*
* Copyright (c) 2018-2025, cyweb All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* Neither the name of the pig4cloud.com developer nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
*/
export const YES_OR_NO=[
{
label:'展示',
value:'0'
},
{
label:'不展示',
value:'1'
}
]
export const tableOption = {
border: true,
index: true,
indexLabel: '序号',
stripe: true,
menuAlign: 'center',
align: 'center',
delBtn: false,
addBtn: false,
column: [
{
label: '班级名称',
prop: 'className',
editDisabled:true,
search:true
},
{
label: '培训年份',
prop: 'trainYear',
editDisabled:true,
search:true
},
{
label: '类型',
prop: 'companyType',
type:'select',
editDisabled:true,
dicUrl: '/aj/scjajcompanytype/getAllTypeList',
props:{
label:'typeName',
value:'id'
},
},
{
label: '培训地点',
prop: 'trainLocation',
editDisabled:true
},
{
label: '人员类型',
prop: 'personType',
type:'select',
editDisabled:true,
dicUrl: '/admin/dict/item/type/person_type',
props:{
label:'label',
value:'value'
},
},
{
label: '培训类型',
prop: 'trainType',
search:true,
type:'select',
editDisabled:true,
dicUrl: '/admin/dict/item/type/train_class_type',
props:{
label:'label',
value:'value'
},
},
{
label: '报名截止日期',
prop: 'signEndTime',
type:'date',
format:'yyyy-MM-dd HH:mm',
valueFormat:'yyyy-MM-dd HH:mm:ss',
disabled:true
},
{
label: '开始时间',
prop: 'trainStart',
type:'date',
format:'yyyy-MM-dd',
editDisabled:true
},
{
label: '结束时间',
prop: 'trainEnd',
type:'date',
format:'yyyy-MM-dd',
editDisabled:true
},
{
label: '培训费',
prop: 'price',
type:'number',
precision: 2,
min:0,
rules:[
{ validator: function (rule, value, callback) {
if(value!=''){
var reg =/^(\d|[1-9]\d+)(\.\d+)?$/
if(!reg.test(value)){
callback(new Error('请填写大于0的金额'));
}else{
callback()
}
}
}, trigger: 'blur' }
]
},
{
label: '预招人数',
prop: 'totalNums',
type:'number',
disabled:true
},
{
label: '是否展示',
prop: 'status',
type:'radio',
dicData:YES_OR_NO,
props:{
label:'label',
value:'value'
},
search:true
}
]
}
export const tableAddressOption = {
border: true,
index: true,
indexLabel: '序号',
stripe: true,
menuAlign: 'center',
align: 'center',
column: [
{
label: '详细地址',
prop: 'detailAddress',
rules: [{
required: true,
message: '请输入地址',
trigger: 'blur'
}],
},
{
label: '创建时间',
prop: 'createTime',
addDisabled:true,
addDisplay:false,
editDisabled:true,
},
]
}