事故调查管理代码提交

hyx_2024-9-25_tongbu
shanao 2024-09-06 16:19:59 +08:00
parent f58761937f
commit f921dd8c52
2 changed files with 40 additions and 41 deletions

View File

@ -8,9 +8,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="发生时间" prop="incidentName"> <el-form-item label="发生时间" prop="incidentDates">
<el-date-picker <el-date-picker
v-model="searchForm.incidentName" v-model="searchForm.incidentDates"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
style="width: 100%" style="width: 100%"
type="daterange" type="daterange"
@ -24,21 +24,20 @@
<el-input v-model="searchForm.location" placeholder="请输入关键字" class="filter-item"/> <el-input v-model="searchForm.location" placeholder="请输入关键字" class="filter-item"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- TODO 待实现数据字典--> <el-col :span="4">
<!-- <el-col :span="4">--> <el-form-item label="事故类型" prop="incidentType">
<!-- <el-form-item label="事故类型" prop="keySource">--> <el-select v-model="searchForm.incidentType" placeholder="请选择">
<!-- <el-select v-model="searchForm.incidentType" placeholder="请选择">--> <el-option v-for="item in incidentTypes" :key="item.value" :label="item.label" :value="item.value" />
<!-- <el-option v-for="item in incidentTypes" :key="item.value" :label="item.label" :value="item.value" />--> </el-select>
<!-- </el-select>--> </el-form-item>
<!-- </el-form-item>--> </el-col>
<!-- </el-col>--> <el-col :span="4">
<!-- <el-col :span="4">--> <el-form-item label="事故等级" prop="incidentLevel">
<!-- <el-form-item label="事故等级" prop="keySource">--> <el-select v-model="searchForm.incidentLevel" placeholder="请选择">
<!-- <el-select v-model="searchForm.incidentLevel" placeholder="请选择">--> <el-option v-for="item in incidentLevels" :key="item.value" :label="item.label" :value="item.value" />
<!-- <el-option v-for="item in incidentLevels" :key="item.value" :label="item.label" :value="item.value" />--> </el-select>
<!-- </el-select>--> </el-form-item>
<!-- </el-form-item>--> </el-col>
<!-- </el-col>-->
<el-col :span="4"> <el-col :span="4">
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getList"> <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getList">
查询 查询
@ -101,25 +100,30 @@
<el-form-item :label-width="formLabelWidth" label="事故名称"> <el-form-item :label-width="formLabelWidth" label="事故名称">
<el-input v-model="infoForm.incidentName" autocomplete="off"/> <el-input v-model="infoForm.incidentName" autocomplete="off"/>
</el-form-item> </el-form-item>
<!-- TODO 需要数据字典--> <el-form-item :label-width="formLabelWidth" label="事故类型">
<!-- <el-form-item :label-width="formLabelWidth" label="事故类型">--> <el-select v-model="infoForm.hiddenPartList" placeholder="请选择">
<!-- <el-select v-model="hiddenPartList" placeholder="请选择活动区域">--> <el-option
<!-- <el-option label="区域一" value="shanghai"/>--> v-for="item in hiddenPartList"
<!-- <el-option label="区域二" value="beijing"/>--> :key="item.id"
<!-- </el-select>--> :label="item.type"
<!-- </el-form-item>--> :value="item.id"/>
</el-select>
</el-form-item>
<!-- <el-form-item :label-width="formLabelWidth" label="所属公司">--> <!-- <el-form-item :label-width="formLabelWidth" label="所属公司">-->
<!-- <el-select v-model="form.region" placeholder="请选择活动区域">--> <!-- <el-select v-model="form.region" placeholder="请选择">-->
<!-- <el-option label="区域一" value="shanghai"/>-->
<!-- <el-option label="区域二" value="beijing"/>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label-width="formLabelWidth" label="事故级别">-->
<!-- <el-select v-model="incidentLevels" placeholder="请选择活动区域">-->
<!-- <el-option label="区域一" value="shanghai"/>--> <!-- <el-option label="区域一" value="shanghai"/>-->
<!-- <el-option label="区域二" value="beijing"/>--> <!-- <el-option label="区域二" value="beijing"/>-->
<!-- </el-select>--> <!-- </el-select>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item :label-width="formLabelWidth" label="事故级别">
<el-select v-model="infoForm.incidentLevels" placeholder="请选择">
<el-option
v-for="item in incidentLevels"
:key="item.id"
:label="item.type"
:value="item.id"/>
</el-select>
</el-form-item>
<el-form-item :label-width="formLabelWidth" label="事故发生地点"> <el-form-item :label-width="formLabelWidth" label="事故发生地点">
<el-input v-model="infoForm.location" autocomplete="off"/> <el-input v-model="infoForm.location" autocomplete="off"/>
</el-form-item> </el-form-item>
@ -452,11 +456,7 @@ export default {
this.$parent.activeName = 'Detail' this.$parent.activeName = 'Detail'
this.$parent.hiddenId = id this.$parent.hiddenId = id
}, },
translate(id, list) {
for (let i = 0; i < list.length; i++) {
if (list[i].BIANMA === id || list[i].value === id || list[i].id === id) return list[i].NAME || list[i].label
}
},
formatDate(date, format) { formatDate(date, format) {
return formatDate(date, format) return formatDate(date, format)
} }

View File

@ -2,18 +2,17 @@
<!-- <component :is="activeName" />--> <!-- <component :is="activeName" />-->
<div> <div>
<List v-show="activeName==='List'" ref="list"/> <List v-show="activeName==='List'" ref="list"/>
<Detail v-if="activeName==='Detail'"/> <!-- <Detail v-if="activeName==='Detail'"/>-->
</div> </div>
</template> </template>
<script> <script>
import List from './list.vue' import List from './components/list.vue'
import Detail from './components/detail'
export default { export default {
components: { components: {
List: List, List: List
Detail: Detail // Detail: Detail
}, },
data() { data() {
return { return {