|
@ -12,7 +12,7 @@ |
|
|
size="small" |
|
|
size="small" |
|
|
class="w-202 ml-10" |
|
|
class="w-202 ml-10" |
|
|
:maxlength="50" |
|
|
:maxlength="50" |
|
|
v-model="paramsData.patrolName" |
|
|
v-model="paramsData.name" |
|
|
placeholder="请输入名称" |
|
|
placeholder="请输入名称" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
@ -23,14 +23,14 @@ |
|
|
clearable |
|
|
clearable |
|
|
size="small" |
|
|
size="small" |
|
|
class="w-202 ml-10" |
|
|
class="w-202 ml-10" |
|
|
v-model="paramsData.patrolType" |
|
|
v-model="paramsData.type" |
|
|
:popper-append-to-body="false" |
|
|
:popper-append-to-body="false" |
|
|
filterable |
|
|
filterable |
|
|
placeholder="请选择" |
|
|
placeholder="请选择" |
|
|
> |
|
|
> |
|
|
<el-option label="全部" value=""> </el-option> |
|
|
<el-option label="全部" value=""> </el-option> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in xcTypeOptions" |
|
|
v-for="item in maintenanceType" |
|
|
:key="item.dictValue" |
|
|
:key="item.dictValue" |
|
|
:label="item.dictLabel" |
|
|
:label="item.dictLabel" |
|
|
:value="item.dictValue" |
|
|
:value="item.dictValue" |
|
@ -44,7 +44,7 @@ |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
size="small" |
|
|
size="small" |
|
|
class="ml-10" |
|
|
class="ml-10" |
|
|
v-model="paramsData.patrolTime" |
|
|
v-model="paramsData.time" |
|
|
type="daterange" |
|
|
type="daterange" |
|
|
value-format="yyyy-MM-dd" |
|
|
value-format="yyyy-MM-dd" |
|
|
range-separator="至" |
|
|
range-separator="至" |
|
@ -72,14 +72,19 @@ |
|
|
clearable |
|
|
clearable |
|
|
size="small" |
|
|
size="small" |
|
|
class="w-202 ml-10" |
|
|
class="w-202 ml-10" |
|
|
v-model="paramsData.patrolCategory" |
|
|
v-model="paramsData.category" |
|
|
:popper-append-to-body="false" |
|
|
:popper-append-to-body="false" |
|
|
filterable |
|
|
filterable |
|
|
placeholder="请选择" |
|
|
placeholder="请选择" |
|
|
> |
|
|
> |
|
|
<el-option label="全部" value=""> </el-option> |
|
|
<el-option label="全部" value=""> </el-option> |
|
|
<el-option label="机电巡查" value="0"> </el-option> |
|
|
<el-option |
|
|
<el-option label="工程巡查" value="1"> </el-option> |
|
|
v-for="item in maintenanceCategory" |
|
|
|
|
|
:key="item.dictValue" |
|
|
|
|
|
:label="item.dictLabel" |
|
|
|
|
|
:value="item.dictValue" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
@ -89,15 +94,19 @@ |
|
|
clearable |
|
|
clearable |
|
|
size="small" |
|
|
size="small" |
|
|
class="w-202 ml-10" |
|
|
class="w-202 ml-10" |
|
|
v-model="paramsData.patrolStatus" |
|
|
v-model="paramsData.status" |
|
|
:popper-append-to-body="false" |
|
|
:popper-append-to-body="false" |
|
|
filterable |
|
|
filterable |
|
|
placeholder="请选择" |
|
|
placeholder="请选择" |
|
|
> |
|
|
> |
|
|
<el-option label="全部" value=""> </el-option> |
|
|
<el-option label="全部" value=""> </el-option> |
|
|
<el-option label="日常巡查" value="0"> </el-option> |
|
|
<el-option |
|
|
<el-option label="不定期巡查" value="1"> </el-option> |
|
|
v-for="item in maintenanceStatus" |
|
|
<el-option label="汛前巡查" value="2"> </el-option> |
|
|
:key="item.dictValue" |
|
|
|
|
|
:label="item.dictLabel" |
|
|
|
|
|
:value="item.dictValue" |
|
|
|
|
|
> |
|
|
|
|
|
</el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
<div class="flex-1 flex justify-end search-item"> |
|
|
<div class="flex-1 flex justify-end search-item"> |
|
@ -123,30 +132,30 @@ |
|
|
:data="tableData" |
|
|
:data="tableData" |
|
|
border |
|
|
border |
|
|
> |
|
|
> |
|
|
<el-table-column prop="orderNumber" align="center" label="单号" /> |
|
|
<el-table-column prop="id" align="center" label="单号" /> |
|
|
<el-table-column prop="patrolName" align="center" label="巡查名称" /> |
|
|
<el-table-column prop="checkingName" align="center" label="巡查名称" /> |
|
|
<el-table-column prop="patrolType" align="center" label="巡查类型"> |
|
|
<el-table-column prop="type" align="center" label="巡查类型"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span>{{ |
|
|
<span>{{ |
|
|
getDictLabelName(scope.row.patrolType, "xcTypeOptions") |
|
|
getDictLabelName(scope.row.type, "maintenanceType") |
|
|
}}</span> |
|
|
}}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="patrolCategory" align="center" label="巡查类别"> |
|
|
<el-table-column prop="category" align="center" label="巡查类别"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span>{{ |
|
|
<span>{{ |
|
|
getDictLabelName(scope.row.patrolCategory, "xcTypeOptions") |
|
|
getDictLabelName(scope.row.category, "maintenanceCategory") |
|
|
}}</span> |
|
|
}}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="patrolStatus" align="center" label="巡查状态"> |
|
|
<el-table-column prop="status" align="center" label="巡查状态"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span>{{ |
|
|
<span>{{ |
|
|
getDictLabelName(scope.row.patrolStatus, "xcTypeOptions") |
|
|
getDictLabelName(scope.row.status, "maintenanceStatus") |
|
|
}}</span> |
|
|
}}</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="dutyHolder" align="center" label="责任人" /> |
|
|
<el-table-column prop="dutyHolderName" align="center" label="责任人" /> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="startDate" |
|
|
prop="startDate" |
|
|
align="center" |
|
|
align="center" |
|
@ -178,7 +187,7 @@ |
|
|
<el-button |
|
|
<el-button |
|
|
type="text" |
|
|
type="text" |
|
|
size="small" |
|
|
size="small" |
|
|
@click="handleCheckDetails(scope.row, true)" |
|
|
@click="handleEditDetails(scope.row, true)" |
|
|
>编辑</el-button |
|
|
>编辑</el-button |
|
|
> |
|
|
> |
|
|
</template> |
|
|
</template> |
|
@ -201,34 +210,28 @@ |
|
|
</template> |
|
|
</template> |
|
|
<script> |
|
|
<script> |
|
|
import TopBackTitle from "@/components/TopBackTitle/index.vue"; |
|
|
import TopBackTitle from "@/components/TopBackTitle/index.vue"; |
|
|
import { postDFInspectionRecordsList } from "@/api/management"; |
|
|
|
|
|
import { calcTableHeight } from "@/mixins/calcTableHeight"; |
|
|
import { calcTableHeight } from "@/mixins/calcTableHeight"; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
postV2RecordList |
|
|
|
|
|
} from "@/api/dike/patrolMaintenance"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
components: {TopBackTitle}, |
|
|
components: {TopBackTitle}, |
|
|
mixins: [calcTableHeight], |
|
|
mixins: [calcTableHeight], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
tableData: [ |
|
|
tableData: [], |
|
|
{ |
|
|
maintenanceStatus: [], |
|
|
orderNumber: 1, |
|
|
maintenanceCategory: [], |
|
|
patrolName: '测试', |
|
|
maintenanceType: [], |
|
|
patrolType: '1', |
|
|
|
|
|
patrolCategory: '1', |
|
|
|
|
|
patrolStatus: '1', |
|
|
|
|
|
dutyHolder: '测试', |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
xcTypeOptions: [], |
|
|
|
|
|
handleStatusOptions: [], |
|
|
|
|
|
currentRow: {}, |
|
|
|
|
|
paramsData: { |
|
|
paramsData: { |
|
|
patrolName: "", |
|
|
name: "", |
|
|
patrolType: "", |
|
|
type: "", |
|
|
patrolTime: [], |
|
|
time: [], |
|
|
dutyHolder: '', |
|
|
dutyHolder: '', |
|
|
patrolCategory: '', |
|
|
category: '', |
|
|
patrolStatus: '' |
|
|
status: '' |
|
|
}, |
|
|
}, |
|
|
pageData: { |
|
|
pageData: { |
|
|
pageNum: 1, // 当前页 |
|
|
pageNum: 1, // 当前页 |
|
@ -239,9 +242,18 @@ export default { |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
this.getDicts("xs_classfy").then((response) => { |
|
|
this.getDicts("patrol_maintenance_status").then((response) => { |
|
|
this.xcTypeOptions = response.data; |
|
|
this.maintenanceStatus = response.data; |
|
|
|
|
|
}); |
|
|
|
|
|
this.getDicts("patrol_maintenance_category").then((response) => { |
|
|
|
|
|
this.maintenanceCategory = response.data; |
|
|
}); |
|
|
}); |
|
|
|
|
|
this.getDicts("patrol_maintenance_type").then((response) => { |
|
|
|
|
|
this.maintenanceType = response.data; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
mounted() { |
|
|
|
|
|
this.getTableData() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
handleCurrentPageChange(page) { |
|
|
handleCurrentPageChange(page) { |
|
@ -252,10 +264,16 @@ export default { |
|
|
this.pageData.pageSize = pageSize; |
|
|
this.pageData.pageSize = pageSize; |
|
|
this.getTableData(); |
|
|
this.getTableData(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
handleCheckDetails(row) { |
|
|
handleCheckDetails() { |
|
|
|
|
|
this.$router.push({ |
|
|
this.$router.push({ |
|
|
path: "inspectionRecordDetails", |
|
|
path: "inspectionRecordDetails", |
|
|
|
|
|
query: { id: row.id, checkingId: row.checkingId }, |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
handleEditDetails(row) { |
|
|
|
|
|
this.$router.push({ |
|
|
|
|
|
path: "inspectionRecordDetails", |
|
|
|
|
|
query: { id: row.id, checkingId: row.checkingId, mode: "edit" }, |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
getDictLabelName(type, dictListName) { |
|
|
getDictLabelName(type, dictListName) { |
|
@ -273,30 +291,32 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 重置搜索 |
|
|
// 重置搜索 |
|
|
handleResetQuery() { |
|
|
handleResetQuery() { |
|
|
this.paramsData.patrolName = ""; |
|
|
this.paramsData.name = ""; |
|
|
this.paramsData.patrolType = ""; |
|
|
this.paramsData.type = ""; |
|
|
this.paramsData.patrolTime = []; |
|
|
this.paramsData.time = []; |
|
|
this.paramsData.dutyHolder = ""; |
|
|
this.paramsData.dutyHolder = ""; |
|
|
this.paramsData.patrolCategory = ""; |
|
|
this.paramsData.category = ""; |
|
|
this.paramsData.patrolStatus = ""; |
|
|
this.paramsData.status = ""; |
|
|
this.reqCountCalc(); |
|
|
this.reqCountCalc(); |
|
|
this.pageData.pageNum = 1; |
|
|
this.pageData.pageNum = 1; |
|
|
this.getTableData(); |
|
|
this.getTableData(); |
|
|
}, |
|
|
}, |
|
|
getTableData() { |
|
|
getTableData() { |
|
|
postDFInspectionRecordsList({ |
|
|
const data = { |
|
|
|
|
|
name: this.paramsData.name, |
|
|
|
|
|
type: this.paramsData.type, |
|
|
|
|
|
dutyHolder: this.paramsData.dutyHolder, |
|
|
|
|
|
category: this.paramsData.category, |
|
|
|
|
|
status: this.paramsData.status, |
|
|
|
|
|
startTime: this.paramsData.time && this.paramsData.time.length > 1 ? this.paramsData.time[0] : '', |
|
|
|
|
|
endTime: this.paramsData.time && this.paramsData.time.length > 1 ? this.paramsData.time[1] : '', |
|
|
|
|
|
} |
|
|
|
|
|
postV2RecordList({ |
|
|
data: { |
|
|
data: { |
|
|
timeView: { |
|
|
timeView: { |
|
|
timeField: "create_time", |
|
|
timeField: "create_time", |
|
|
}, |
|
|
}, |
|
|
adcd: this.paramsData.adcd, |
|
|
...data, |
|
|
dikeName: this.paramsData.dikeName, |
|
|
|
|
|
dikeType: this.paramsData.dikeType, |
|
|
|
|
|
lineName: this.paramsData.lineName, |
|
|
|
|
|
lineType: this.paramsData.lineType, |
|
|
|
|
|
dutyHolderType: this.paramsData.dutyHolderType, |
|
|
|
|
|
// status: this.paramsData.status, |
|
|
|
|
|
handleStatus: this.paramsData.handleStatus, |
|
|
|
|
|
}, |
|
|
}, |
|
|
params: { |
|
|
params: { |
|
|
sort: "desc", |
|
|
sort: "desc", |
|
@ -306,7 +326,9 @@ export default { |
|
|
pageNum: this.pageData.pageNum, |
|
|
pageNum: this.pageData.pageNum, |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
if (res) { |
|
|
if (res) { |
|
|
this.tableData = res.records; |
|
|
this.tableData = [{ |
|
|
|
|
|
id: 1 |
|
|
|
|
|
}]; |
|
|
this.pageData.total = res.total; |
|
|
this.pageData.total = res.total; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|