diff --git a/src/views/accident/records/components/addOrEdit.vue b/src/views/accident/records/components/addOrEdit.vue
index c2b6983..dd7cbac 100644
--- a/src/views/accident/records/components/addOrEdit.vue
+++ b/src/views/accident/records/components/addOrEdit.vue
@@ -8,19 +8,19 @@
style="width: 900px"
>
-
+
-
+
-
+
-
+
@@ -58,7 +58,7 @@
-
+
@@ -100,16 +100,17 @@
-
+
-
+
@@ -139,7 +140,7 @@ export default {
seriouslyInjured: null, // 重伤人数
cause: '', // 事故起因
summary: '', // 事故概述
- photos: [], // 事故照片
+ photos: '', // 事故照片
analysis: '', // 原因分析及责任认定
suggestions: '', // 考核建议
measures: '', // 整改措施
@@ -154,8 +155,8 @@ export default {
tableName: '',
/** 图片上传限制个数 */
limitNum: 1,
- /** 预览图片地址 */
- dialogImageUrl: '',
+ /** 图片 */
+ fileList: [],
allowRemove: true, // 添加一个控制标志
/** 预览弹窗 */
dialogImgVisible: false,
@@ -224,15 +225,6 @@ export default {
}
},
- /**
- * 单独查询图片流文件
- */
- getFileImageBinaray(fileName) {
- requestFN(`/accident/view/photos`, { path: fileName }).then((res) => {
- console.log('res :>> ', res)
- })
- },
-
/**
* 点击文件列表中已上传的文件时的钩子
*/
@@ -244,6 +236,7 @@ export default {
/**
* 文件上传失败时的钩子处理
*/
+ // eslint-disable-next-line handle-callback-err
handleError(err, file, fileList) {
this.$message({
message: `${file.name}上传失败, 请稍后重试`,
@@ -280,11 +273,7 @@ export default {
formData.append('file', file)
upload('/accident/import/photos', formData).then((data) => {
if (data.result === 'success') {
- this.infoForm.photos = [{
- name: file.name,
- url: URL.createObjectURL(file),
- remotePathName: data.path
- }]
+ this.infoForm.photos = data.path
}
})
return false
diff --git a/src/views/accident/records/components/list.vue b/src/views/accident/records/components/list.vue
index 92478ea..066c430 100644
--- a/src/views/accident/records/components/list.vue
+++ b/src/views/accident/records/components/list.vue
@@ -101,7 +101,6 @@ export default {
data() {
return {
- config: config,
// 搜索查询条件
searchForm: {
/** 事故名称 */
@@ -242,7 +241,7 @@ export default {
type: 'warning'
}).then(() => {
this.listLoading = false
- window.open(config.templatefileUrl + 'template/limitSpace.xls')
+ window.open(config.httpurl + '/export/excel')
}).catch(() => {
this.listLoading = false
})