|
|
|
|
@ -8,16 +8,10 @@
|
|
|
|
|
<slot>
|
|
|
|
|
<div>
|
|
|
|
|
<Input style="width: 200px; margin-right: 10px" v-model="searchFields.KeyWord" placeholder="关键字搜索" />
|
|
|
|
|
<!-- <DatePicker type="datetimerange" v-model="" @on-ok="handleOk"
|
|
|
|
|
<!-- <DatePicker type="datetimerange" v-model="" @on-ok="handleOk"
|
|
|
|
|
format="yyyy-MM-dd HH:mm" placeholder="事故的发生时间范围" style="width: 300px"></DatePicker> -->
|
|
|
|
|
<el-date-picker
|
|
|
|
|
class="searchdate"
|
|
|
|
|
v-model="searchFields.dateRange"
|
|
|
|
|
@change="handleOk"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
type="datetimerange"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="开始发生时间"
|
|
|
|
|
<el-date-picker class="searchdate" v-model="searchFields.dateRange" @change="handleOk"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" range-separator="至" start-placeholder="开始发生时间"
|
|
|
|
|
end-placeholder="结束发生时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
<Button type="primary" @click="search" style="margin-left: 10px">查询</Button>
|
|
|
|
|
@ -87,14 +81,14 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" :offset="8">
|
|
|
|
|
<el-form-item label="事发时间" prop="happen_date" label-position="right" :label-width="formLabelWidth">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="form.happen_date" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
format="yyyy-MM-dd HH:mm:ss" placeholder="选择事发时间">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="form.happen_date" type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" placeholder="选择事发时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="事故类别" prop="type" label-position="right" :label-width="formLabelWidth">
|
|
|
|
|
<el-select style="width:100%" v-model="form.type" placeholder="请选择事故类别">
|
|
|
|
|
<el-select style="width:100%" v-model="form.type" placeholder="请选择事故类别">
|
|
|
|
|
<el-option v-for="item in parameters.accidentType" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
@ -103,8 +97,8 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" :offset="8">
|
|
|
|
|
<el-form-item label="上报时间" prop="report_date" label-position="right" :label-width="formLabelWidth">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="form.report_date" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
|
format="yyyy-MM-dd HH:mm:ss" placeholder="选择上报时间">
|
|
|
|
|
<el-date-picker style="width:100%" v-model="form.report_date" type="datetime"
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss" placeholder="选择上报时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
@ -115,7 +109,7 @@
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="事故等级" prop="level" label-position="right" :label-width="formLabelWidth">
|
|
|
|
|
<el-select style="width:100%" v-model="form.level" placeholder="请选择事故等级">
|
|
|
|
|
<el-select style="width:100%" v-model="form.level" placeholder="请选择事故等级">
|
|
|
|
|
<el-option v-for="item in parameters.accidentLevel" :key="item.id" :label="item.value"
|
|
|
|
|
:value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
@ -168,9 +162,9 @@
|
|
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model="form.unit_overview" style="width: 98%;"></el-input>
|
|
|
|
|
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther"
|
|
|
|
|
action="/uploadApi/api/admin/upload-file" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
|
|
:on-exceed="handleExceed" :file-list="fileList.unit_overview_files">
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther" :action="action"
|
|
|
|
|
:on-remove="handleRemove" :before-remove="beforeRemove" :on-exceed="handleExceed"
|
|
|
|
|
:file-list="fileList.unit_overview_files">
|
|
|
|
|
<el-button size="small" type="primary" @click="toupload('unit_overview_files_list')">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -180,9 +174,9 @@
|
|
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model="form.scene_condition" style="width: 98%;"></el-input>
|
|
|
|
|
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther"
|
|
|
|
|
action="/uploadApi/api/admin/upload-file" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
|
|
:on-exceed="handleExceed" :file-list="fileList.scene_condition_files">
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther" :action="action"
|
|
|
|
|
:on-remove="handleRemove" :before-remove="beforeRemove" :on-exceed="handleExceed"
|
|
|
|
|
:file-list="fileList.scene_condition_files">
|
|
|
|
|
<el-button size="small" type="primary" @click="toupload('scene_condition_files_list')">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -192,9 +186,9 @@
|
|
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model="form.consequence" style="width: 98%;"></el-input>
|
|
|
|
|
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther"
|
|
|
|
|
action="/uploadApi/api/admin/upload-file" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
|
|
:on-exceed="handleExceed" :file-list="fileList.consequence_file">
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther" :action="action"
|
|
|
|
|
:on-remove="handleRemove" :before-remove="beforeRemove" :on-exceed="handleExceed"
|
|
|
|
|
:file-list="fileList.consequence_file">
|
|
|
|
|
<el-button size="small" type="primary" @click="toupload('consequence_file_list')">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -203,9 +197,9 @@
|
|
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model="form.measure" style="width: 98%;"></el-input>
|
|
|
|
|
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther"
|
|
|
|
|
action="/uploadApi/api/admin/upload-file" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
|
|
:on-exceed="handleExceed" :file-list="fileList.measure_file">
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther" :action="action"
|
|
|
|
|
:on-remove="handleRemove" :before-remove="beforeRemove" :on-exceed="handleExceed"
|
|
|
|
|
:file-list="fileList.measure_file">
|
|
|
|
|
<el-button size="small" type="primary" @click="toupload('measure_file_list')">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -213,9 +207,9 @@
|
|
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model="form.other" style="width: 98%;"></el-input>
|
|
|
|
|
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther"
|
|
|
|
|
action="/uploadApi/api/admin/upload-file" :on-remove="handleRemove" :before-remove="beforeRemove"
|
|
|
|
|
:on-exceed="handleExceed" :file-list="fileList.other_file">
|
|
|
|
|
<el-upload class="upload-demo" :on-success="handlesuccess" :data="uploadOther" :action="action"
|
|
|
|
|
:on-remove="handleRemove" :before-remove="beforeRemove" :on-exceed="handleExceed"
|
|
|
|
|
:file-list="fileList.other_file">
|
|
|
|
|
<el-button size="small" type="primary" @click="toupload('other_file_list')">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@ -261,6 +255,8 @@
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
|
|
action: `${process.env.VUE_APP_BASE_API}api/admin/upload-file`,
|
|
|
|
|
touploadType: "",
|
|
|
|
|
checkAll: false,
|
|
|
|
|
isIndeterminate: true,
|
|
|
|
|
@ -331,7 +327,7 @@
|
|
|
|
|
tableHeight: 900,
|
|
|
|
|
searchFields: {
|
|
|
|
|
KeyWord: "",
|
|
|
|
|
dateRange:['','']
|
|
|
|
|
dateRange: ['', '']
|
|
|
|
|
},
|
|
|
|
|
columns: [{
|
|
|
|
|
field: "unit",
|
|
|
|
|
@ -383,7 +379,7 @@
|
|
|
|
|
field: "scene_condition",
|
|
|
|
|
title: "现场情况",
|
|
|
|
|
align: "left",
|
|
|
|
|
width:240
|
|
|
|
|
width: 240
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
field: "created_at",
|
|
|
|
|
@ -431,8 +427,8 @@
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
handleOk(val) {
|
|
|
|
|
this.searchFields.happen_date_start= val? val[0]:""
|
|
|
|
|
this.searchFields.happen_date_end = val? val[1]:""
|
|
|
|
|
this.searchFields.happen_date_start = val ? val[0] : ""
|
|
|
|
|
this.searchFields.happen_date_end = val ? val[1] : ""
|
|
|
|
|
},
|
|
|
|
|
toupload(type) {
|
|
|
|
|
console.log(type)
|
|
|
|
|
@ -493,7 +489,7 @@
|
|
|
|
|
listaccident({
|
|
|
|
|
page: this.paginations.page,
|
|
|
|
|
page_size: this.paginations.page_size,
|
|
|
|
|
keyword:this.searchFields.KeyWord,
|
|
|
|
|
keyword: this.searchFields.KeyWord,
|
|
|
|
|
happen_date_start: this.searchFields.happen_date_start,
|
|
|
|
|
happen_date_end: this.searchFields.happen_date_end
|
|
|
|
|
}).then(res => {
|
|
|
|
|
@ -674,14 +670,17 @@
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
overflow-x: hidden !important;
|
|
|
|
|
}
|
|
|
|
|
.searchdate{
|
|
|
|
|
height: 32px;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
|
|
|
|
.searchdate {
|
|
|
|
|
height: 32px;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
}
|
|
|
|
|
.searchdate.el-date-editor .el-range__icon{
|
|
|
|
|
|
|
|
|
|
.searchdate.el-date-editor .el-range__icon {
|
|
|
|
|
line-height: 25px;
|
|
|
|
|
}
|
|
|
|
|
.searchdate.el-date-editor .el-range-separator{
|
|
|
|
|
|
|
|
|
|
.searchdate.el-date-editor .el-range-separator {
|
|
|
|
|
line-height: 25px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|