diff --git a/src/views/accident/records/components/addOrEdit.vue b/src/views/accident/records/components/addOrEdit.vue
index 03c30f1..9b3f0c1 100644
--- a/src/views/accident/records/components/addOrEdit.vue
+++ b/src/views/accident/records/components/addOrEdit.vue
@@ -30,13 +30,12 @@
+ />
-
+
@@ -90,11 +89,9 @@
@@ -162,8 +159,7 @@ export default {
rules: {
incidentNumber: [{ required: true, message: '事故案号不能为空', trigger: 'blur' }],
incidentName: [{ required: true, message: '事故名称不能为空', trigger: 'blur' }],
- HIDDENTYPE: [{ required: true, message: '事故类型不能为空', trigger: 'blur' }],
- incidentType: [{ required: true, message: '隐患类型不能为空', trigger: 'blur' }],
+ incidentType: [{ required: true, message: '事故类型不能为空', trigger: 'blur' }],
incidentLevel: [{ required: true, message: '事故级别不能为空', trigger: 'blur' }],
incidentNature: [{ required: true, message: '事故性质不能为空', trigger: 'blur' }],
location: [{ required: true, message: '事故发生地点不能为空', trigger: 'blur' }],
@@ -339,21 +335,26 @@ export default {
* 表单确认按钮
*/
confirm() {
- const params = {
- ...this.infoForm,
- photos: this.infoForm.fileList[0].remotePathName
- }
- delete params.fileList
- requestFN('/accident' + (this.tableName === '修改' ? '/update' : '/save'), params)
- .then((response) => {
- // 删除成功后的处理
- this.$message.success(this.tableName + '成功')
- this.infoForm = this.$options.data().infoForm
- this.$parent.activeName = 'List'
- // eslint-disable-next-line handle-callback-err
- }).catch((error) => {
- this.$message.error(this.tableName + '失败')
- })
+ this.$refs.form.validate(valid => {
+ if (!valid) {
+ return false
+ }
+ const params = {
+ ...this.infoForm,
+ photos: this.infoForm.fileList[0].remotePathName
+ }
+ delete params.fileList
+ requestFN('/accident' + (this.tableName === '修改' ? '/update' : '/save'), params)
+ .then((response) => {
+ // 删除成功后的处理
+ this.$message.success(this.tableName + '成功')
+ this.infoForm = this.$options.data().infoForm
+ this.$parent.activeName = 'List'
+ // eslint-disable-next-line handle-callback-err
+ }).catch((error) => {
+ this.$message.error(this.tableName + '失败')
+ })
+ })
},
/**
diff --git a/src/views/accident/records/components/list.vue b/src/views/accident/records/components/list.vue
index 4bd8c47..b2e52e8 100644
--- a/src/views/accident/records/components/list.vue
+++ b/src/views/accident/records/components/list.vue
@@ -4,16 +4,16 @@
-
+
-
+
-
+
-
+
@@ -53,7 +53,6 @@
新增
全部导出
- 刷新
批量删除
@@ -74,7 +73,11 @@
-
+
+
+ {{ formatDate(row.incidentDate,'YYYY-MM-DD HH:mm:ss') }}
+
+
@@ -96,6 +99,7 @@