|
|
@ -1,10 +1,10 @@ |
|
|
|
<template> |
|
|
|
<div class="g-main"> |
|
|
|
<div > |
|
|
|
<div> |
|
|
|
<div class="m-search"> |
|
|
|
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'100px'"> |
|
|
|
<div> |
|
|
|
<el-form-item label="所属组织" prop="gridId"> |
|
|
|
<el-form-item label="所属网格" prop="gridId"> |
|
|
|
<el-select class="u-item-width-normal" v-model="formData.gridId" placeholder="全部" size="small" clearable> |
|
|
|
<el-option v-for="item in gridList" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
|
</el-select> |
|
|
@ -19,7 +19,7 @@ |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="隐患内容" prop="dangerContent"> |
|
|
|
<el-input v-model="formData.dangerContent" class="u-item-width-normal" size="small" clearable placeholder="请输入"></el-input> |
|
|
|
<el-input v-model="formData.dangerContent" class="u-item-width-normal" size="small" clearable placeholder="请输入"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="上报人" prop="reportPerson"> |
|
|
|
<el-input v-model="formData.reportPerson" class="u-item-width-normal" size="small" clearable placeholder="请输入"></el-input> |
|
|
@ -28,9 +28,7 @@ |
|
|
|
<el-input v-model="formData.location" class="u-item-width-normal" size="small" clearable placeholder="请输入"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="上报时间" prop="reportTime"> |
|
|
|
|
|
|
|
<el-date-picker v-model="formData.reportTime" type="date" class="input-width" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker> |
|
|
|
|
|
|
|
<el-date-picker v-model="formData.reportTime" type="date" class="input-width" value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker> |
|
|
|
</el-form-item> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24" align="right"> |
|
|
@ -69,21 +67,36 @@ |
|
|
|
<el-table :data="tableData" border class="m-table-item" style="width: 100%" @selection-change="handleSelectionChange" :height="maxTableHeight"> |
|
|
|
<!-- <el-table-column label="" fixed="left" type="selection" align="center" width="50" /> --> |
|
|
|
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> |
|
|
|
<el-table-column prop="gridName" align="center" label="所属组织" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="gridName" align="center" label="所属网格" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="location" align="center" width="80" label="隐患位置"></el-table-column> |
|
|
|
<el-table-column prop="dangerPlaceName" label="隐患场所" min-width="140" align="center" :show-overflow-tooltip="true" /> |
|
|
|
<el-table-column prop="reportPerson" align="center" width="110" label="上报人" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="mobile" align="center" :show-overflow-tooltip="true" label="联系电话"></el-table-column> |
|
|
|
<el-table-column prop="reportTime" align="center" :show-overflow-tooltip="true" label="上报时间"></el-table-column> |
|
|
|
<el-table-column prop="dangerContent" align="center" :show-overflow-tooltip="true" label="隐患内容"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="handleStateName" align="center" label="处理结果" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column fixed="right" label="操作" align="center" width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button @click="handleAdd(scope.row, 'view')" type="text" size="small">查看</el-button> |
|
|
|
|
|
|
|
<el-button v-if="scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">编辑</el-button> |
|
|
|
<el-button v-if="!scope.row.latitude&&agencyId==scope.row.agencyId" style="margin-right: 10px" @click="handleAdd(scope.row, 'edit')" size="small" type="text">待完善</el-button> |
|
|
|
<el-button @click="handleDel(scope.row)" v-if="agencyId==scope.row.agencyId" type="text" size="small" class="">删除</el-button> |
|
|
|
<el-button |
|
|
|
v-if="scope.row.latitude && agencyId == scope.row.agencyId" |
|
|
|
style="margin-right: 10px" |
|
|
|
@click="handleAdd(scope.row, 'edit')" |
|
|
|
size="small" |
|
|
|
type="text" |
|
|
|
> |
|
|
|
编辑 |
|
|
|
</el-button> |
|
|
|
<el-button |
|
|
|
v-if="!scope.row.latitude && agencyId == scope.row.agencyId" |
|
|
|
style="margin-right: 10px" |
|
|
|
@click="handleAdd(scope.row, 'edit')" |
|
|
|
size="small" |
|
|
|
type="text" |
|
|
|
> |
|
|
|
待完善 |
|
|
|
</el-button> |
|
|
|
<el-button @click="handleDel(scope.row)" v-if="agencyId == scope.row.agencyId" type="text" size="small" class="">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
@ -101,8 +114,10 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div > |
|
|
|
<addForm v-if="dialogVisible" :dialogVisible="dialogVisible" |
|
|
|
<div> |
|
|
|
<addForm |
|
|
|
v-if="dialogVisible" |
|
|
|
:dialogVisible="dialogVisible" |
|
|
|
:pageType="pageType" |
|
|
|
:disabled="disabled" |
|
|
|
:detailId="detailId" |
|
|
@ -124,7 +139,8 @@ import axios from 'axios'; |
|
|
|
|
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return {dialogVisible: false, |
|
|
|
return { |
|
|
|
dialogVisible: false, |
|
|
|
importLoading: false, |
|
|
|
disabled: false, |
|
|
|
user: '', |
|
|
@ -150,8 +166,7 @@ export default { |
|
|
|
detailId: '', |
|
|
|
detailData: {}, |
|
|
|
multipleSelection: [], |
|
|
|
rowObj: {}, |
|
|
|
|
|
|
|
rowObj: {} |
|
|
|
}; |
|
|
|
}, |
|
|
|
components: { addForm }, |
|
|
@ -232,7 +247,6 @@ export default { |
|
|
|
handleAdd(row, type) { |
|
|
|
if (row.id) { |
|
|
|
this.detailId = row.id; |
|
|
|
|
|
|
|
} |
|
|
|
this.pageType = type; |
|
|
|
if (type == 'view') { |
|
|
@ -240,9 +254,10 @@ export default { |
|
|
|
} else { |
|
|
|
this.disabled = false; |
|
|
|
} |
|
|
|
this.dialogVisible=true; |
|
|
|
this.dialogVisible = true; |
|
|
|
}, |
|
|
|
handleClose() {this.dialogVisible = false; |
|
|
|
handleClose() { |
|
|
|
this.dialogVisible = false; |
|
|
|
this.pageType = 'list'; |
|
|
|
this.detailId = ''; |
|
|
|
this.getTableData(); |
|
|
@ -271,7 +286,7 @@ export default { |
|
|
|
}, |
|
|
|
async del(id) { |
|
|
|
const url = '/actual/base/hiddenDangerRecord/delete'; |
|
|
|
let idArr=[id] |
|
|
|
let idArr = [id]; |
|
|
|
const { data, code, msg } = await requestPost(url, idArr); |
|
|
|
if (code === 0) { |
|
|
|
this.$message.success('删除成功!'); |
|
|
|