diff --git a/src/assets/map/index/bianjie.png b/src/assets/map/index/bianjie.png new file mode 100644 index 0000000..5d87f86 Binary files /dev/null and b/src/assets/map/index/bianjie.png differ diff --git a/src/assets/map/index/bianjie_on.png b/src/assets/map/index/bianjie_on.png new file mode 100644 index 0000000..c3420c6 Binary files /dev/null and b/src/assets/map/index/bianjie_on.png differ diff --git a/src/assets/map/index/sisetu.png b/src/assets/map/index/sisetu.png new file mode 100644 index 0000000..bfd3278 Binary files /dev/null and b/src/assets/map/index/sisetu.png differ diff --git a/src/assets/map/index/sisetu_on.png b/src/assets/map/index/sisetu_on.png new file mode 100644 index 0000000..94c3e42 Binary files /dev/null and b/src/assets/map/index/sisetu_on.png differ 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 72c4fd7..b2e52e8 100644 --- a/src/views/accident/records/components/list.vue +++ b/src/views/accident/records/components/list.vue @@ -4,20 +4,22 @@ - + - + + end-placeholder="结束日期" + /> @@ -25,14 +27,14 @@ - + - + @@ -51,7 +53,6 @@ 新增 全部导出 - 刷新 批量删除 @@ -64,14 +65,19 @@ v-loading="listLoading" ref="multipleTable" :data="varList" - border tooltip-effect="dark" style="width: 100%" - @selection-change="handleSelectionChange"> + border + @selection-change="handleSelectionChange" + > - + + +