导出还没通
parent
06920346f8
commit
a116151652
|
@ -8,19 +8,19 @@
|
||||||
style="width: 900px"
|
style="width: 900px"
|
||||||
>
|
>
|
||||||
<el-form-item :label-width="formLabelWidth" label="事故案号" prop="incidentNumber">
|
<el-form-item :label-width="formLabelWidth" label="事故案号" prop="incidentNumber">
|
||||||
<el-input v-model="infoForm.incidentNumber" :disabled="isDisabled" autocomplete="off" />
|
<el-input v-model="infoForm.incidentNumber" :disabled="isDisabled" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label-width="formLabelWidth" label="事故名称" prop="incidentName">
|
<el-form-item :label-width="formLabelWidth" label="事故名称" prop="incidentName">
|
||||||
<el-input v-model="infoForm.incidentName" :disabled="isDisabled" autocomplete="off" />
|
<el-input v-model="infoForm.incidentName" :disabled="isDisabled" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label-width="formLabelWidth" label="事故类型" prop="incidentType">
|
<el-form-item :label-width="formLabelWidth" label="事故类型" prop="incidentType">
|
||||||
<el-select v-model="infoForm.incidentType" :disabled="isDisabled" placeholder="请选择">
|
<el-select v-model="infoForm.incidentType" :disabled="isDisabled" placeholder="请选择">
|
||||||
<el-option v-for="item in incidentTypes" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in incidentTypes" :key="item.id" :label="item.name" :value="item.id"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label-width="formLabelWidth" label="事故级别" prop="incidentLevel">
|
<el-form-item :label-width="formLabelWidth" label="事故级别" prop="incidentLevel">
|
||||||
<el-select v-model="infoForm.incidentLevel" :disabled="isDisabled" placeholder="请选择">
|
<el-select v-model="infoForm.incidentLevel" :disabled="isDisabled" placeholder="请选择">
|
||||||
<el-option v-for="item in incidentLevels" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in incidentLevels" :key="item.id" :label="item.name" :value="item.id"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label-width="formLabelWidth" label="事故发生地点" prop="location">
|
<el-form-item :label-width="formLabelWidth" label="事故发生地点" prop="location">
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
<el-upload
|
<el-upload
|
||||||
ref="upload"
|
ref="upload"
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
:file-list.sync="infoForm.photos"
|
:file-list.sync="fileList"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
:auto-upload="true"
|
:auto-upload="true"
|
||||||
:limit="limitNum"
|
:limit="limitNum"
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
action="#"
|
action="#"
|
||||||
accept=".jpg,.jpeg,.png"
|
accept=".jpg,.jpeg,.png"
|
||||||
list-type="picture-card">
|
list-type="picture-card">
|
||||||
<i class="el-icon-plus" />
|
<i class="el-icon-plus"/>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label-width="formLabelWidth" label="原因分析及责任认定" prop="analysis">
|
<el-form-item :label-width="formLabelWidth" label="原因分析及责任认定" prop="analysis">
|
||||||
|
@ -100,16 +100,17 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogImgVisible">
|
<el-dialog :visible.sync="dialogImgVisible">
|
||||||
<img :src="dialogImageUrl" width="100%" alt="">
|
<img :src="config.fileUrl+infoForm.photos" width="100%" alt="">
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<div class="ui-height" />
|
<div class="ui-height"/>
|
||||||
<div class="ui-foot">
|
<div class="ui-foot">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-arrow-left"
|
icon="el-icon-arrow-left"
|
||||||
plain
|
plain
|
||||||
@click="goBack">返回</el-button>
|
@click="goBack">返回
|
||||||
|
</el-button>
|
||||||
<el-button type="primary" @click="confirm">确 定</el-button>
|
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -139,7 +140,7 @@ export default {
|
||||||
seriouslyInjured: null, // 重伤人数
|
seriouslyInjured: null, // 重伤人数
|
||||||
cause: '', // 事故起因
|
cause: '', // 事故起因
|
||||||
summary: '', // 事故概述
|
summary: '', // 事故概述
|
||||||
photos: [], // 事故照片
|
photos: '', // 事故照片
|
||||||
analysis: '', // 原因分析及责任认定
|
analysis: '', // 原因分析及责任认定
|
||||||
suggestions: '', // 考核建议
|
suggestions: '', // 考核建议
|
||||||
measures: '', // 整改措施
|
measures: '', // 整改措施
|
||||||
|
@ -154,8 +155,8 @@ export default {
|
||||||
tableName: '',
|
tableName: '',
|
||||||
/** 图片上传限制个数 */
|
/** 图片上传限制个数 */
|
||||||
limitNum: 1,
|
limitNum: 1,
|
||||||
/** 预览图片地址 */
|
/** 图片 */
|
||||||
dialogImageUrl: '',
|
fileList: [],
|
||||||
allowRemove: true, // 添加一个控制标志
|
allowRemove: true, // 添加一个控制标志
|
||||||
/** 预览弹窗 */
|
/** 预览弹窗 */
|
||||||
dialogImgVisible: false,
|
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) {
|
handleError(err, file, fileList) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: `${file.name}上传失败, 请稍后重试`,
|
message: `${file.name}上传失败, 请稍后重试`,
|
||||||
|
@ -280,11 +273,7 @@ export default {
|
||||||
formData.append('file', file)
|
formData.append('file', file)
|
||||||
upload('/accident/import/photos', formData).then((data) => {
|
upload('/accident/import/photos', formData).then((data) => {
|
||||||
if (data.result === 'success') {
|
if (data.result === 'success') {
|
||||||
this.infoForm.photos = [{
|
this.infoForm.photos = data.path
|
||||||
name: file.name,
|
|
||||||
url: URL.createObjectURL(file),
|
|
||||||
remotePathName: data.path
|
|
||||||
}]
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return false
|
return false
|
||||||
|
|
|
@ -101,7 +101,6 @@ export default {
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
config: config,
|
|
||||||
// 搜索查询条件
|
// 搜索查询条件
|
||||||
searchForm: {
|
searchForm: {
|
||||||
/** 事故名称 */
|
/** 事故名称 */
|
||||||
|
@ -242,7 +241,7 @@ export default {
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
window.open(config.templatefileUrl + 'template/limitSpace.xls')
|
window.open(config.httpurl + '/export/excel')
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue