li预案校验

liujun0703-新项目开发
liy 2024-07-26 10:44:06 +08:00
parent 7c44202f4e
commit 85774048b9
3 changed files with 64 additions and 3 deletions

View File

@ -315,7 +315,7 @@ export default {
ORG_NAME: [ ORG_NAME: [
{ required: true, message: '运输机构名称不能为空', trigger: 'blur' }, { required: true, message: '运输机构名称不能为空', trigger: 'blur' },
{ min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' } { min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
], ]/*,
ORG_TYPE: [ ORG_TYPE: [
{ required: true, message: '运输机构类型不能为空', trigger: 'blur' }, { required: true, message: '运输机构类型不能为空', trigger: 'blur' },
{ min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' } { min: 2, max: 255, message: '长度在 2 到 255 个字符', trigger: 'blur' }
@ -419,7 +419,7 @@ export default {
REMARK: [ REMARK: [
{ required: true, message: '备注不能为空', trigger: 'blur' }, { required: true, message: '备注不能为空', trigger: 'blur' },
{ min: 1, max: 1000, message: '长度在 1 到 1000 个字符', trigger: 'blur' } { min: 1, max: 1000, message: '长度在 1 到 1000 个字符', trigger: 'blur' }
] ]*/
}, },
FFILE: [], FFILE: [],
caseSummaryList: [], caseSummaryList: [],

View File

@ -123,6 +123,32 @@ export default {
dialogFormShow: false, dialogFormShow: false,
dialogType: 'add', dialogType: 'add',
UNIT: '', UNIT: '',
rules: {
UNIT: [
{ required: true, message: '单位不能为空', trigger: 'blur' }
],
START_TIME: [
{ required: true, message: '开始时间不能为空', trigger: 'blur' }
],
END_TIME: [
{ required: true, message: '结束时间不能为空', trigger: 'blur' }
],
DUTY_RECORD: [
{ required: true, message: '值班记录不能为空', trigger: 'blur' }
],
HANDLING_SITUATION: [
{ required: true, message: '处理情况不能为空', trigger: 'blur' }
],
HANDOVER_ITEMS: [
{ required: true, message: '交接事项不能为空', trigger: 'blur' }
],
DUTY_PERSONNEL: [
{ required: true, message: '值班人员不能为空', trigger: 'blur' }
],
SHIFT_PERSONNEL: [
{ required: true, message: '接班人员不能为空', trigger: 'blur' }
]
},
form: { form: {
ID: '', ID: '',
UNIT: '', UNIT: '',
@ -225,7 +251,13 @@ export default {
this.dialogType = 'saveUser' this.dialogType = 'saveUser'
}, },
confirm() { confirm() {
this.dataSave() this.$refs.form.validate(valid => {
if (valid) {
this.dataSave()
} else {
return false
}
})
}, },
dataSave() { dataSave() {
this.listLoading = true this.listLoading = true

View File

@ -592,6 +592,35 @@ export default {
BRIEF_PROCESS: '', BRIEF_PROCESS: '',
DISPOSAL_SITUATION: '' DISPOSAL_SITUATION: ''
}, },
rules: {
ACCESS_MODE: [
{ required: true, message: '事件标题不能为空', trigger: 'blur' }
],
OWNER_NAME: [
{ required: true, message: '机主姓名不能为空', trigger: 'blur' }
],
INCOMING_PHONE: [
{ required: true, message: '呼入电话不能为空', trigger: 'blur' }
],
EVENT_TYPE: [
{ required: true, message: '事件类型不能为空', trigger: 'blur' }
],
REPORT_TIME: [
{ required: true, message: '接报时间不能为空', trigger: 'blur' }
],
OCCURRENCE_TIME: [
{ required: true, message: '发生时间不能为空', trigger: 'blur' }
],
LONGITUDE: [
{ required: true, message: '经度不能为空', trigger: 'blur' }
],
LATITUDE: [
{ required: true, message: '纬度不能为空', trigger: 'blur' }
],
ISRESCUE: [
{ required: true, message: '是否救援不能为空', trigger: 'blur' }
]
},
// rules: { // rules: {
// EVENT_NAME: [ // EVENT_NAME: [
// { required: true, message: '', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }