|
@@ -38,6 +38,7 @@
|
|
|
<el-cascader
|
|
|
:options="areaTree"
|
|
|
clearable
|
|
|
+ v-model="queryParams.areaList"
|
|
|
:props="{ multiple: true }"
|
|
|
size="small"
|
|
|
placeholder="区域ID"
|
|
@@ -62,15 +63,21 @@
|
|
|
:value="item.value"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- <el-input
|
|
|
+ <el-select
|
|
|
v-model="queryParams.positionList"
|
|
|
clearable
|
|
|
- multiple
|
|
|
size="small"
|
|
|
- placeholder="输入点位名称"
|
|
|
- style="width: 160px"
|
|
|
+ placeholder="点位名称"
|
|
|
class="filter-item"
|
|
|
- />
|
|
|
+ style="width: 220px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in positionList"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
<el-input
|
|
|
v-model="queryParams.taskIdLike"
|
|
|
clearable
|
|
@@ -138,9 +145,8 @@
|
|
|
<!-- 表单组件 -->
|
|
|
<el-dialog
|
|
|
append-to-body
|
|
|
- :close-on-click-modal="false"
|
|
|
- :before-close="crud.cancelCU"
|
|
|
- :visible.sync="crudCU"
|
|
|
+ :before-close="closeInfoWindow"
|
|
|
+ :visible="infoDisable"
|
|
|
title="巡检记录"
|
|
|
width="880px"
|
|
|
>
|
|
@@ -164,7 +170,21 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="识别状态" prop="recognizeState">
|
|
|
- <el-input v-model="form.recognizeState" size="small" class="filter-item" />
|
|
|
+ <el-select
|
|
|
+ v-model="form.recognizeState"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ placeholder="识别状态"
|
|
|
+ class="filter-item"
|
|
|
+ style="width: 300px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in recognizeStateOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item label="导航点编号" prop="naviSequence">
|
|
|
<el-input v-model="form.naviSequence" size="small" class="filter-item" />
|
|
@@ -269,7 +289,7 @@
|
|
|
<div style="margin-left: 22px; color: #000; font-weight: bold">
|
|
|
<div>缺陷阈值参考:</div>
|
|
|
<el-image
|
|
|
- style="margin:20px;width: 93%; height: 100%"
|
|
|
+ style="margin: 20px; width: 93%; height: 100%"
|
|
|
v-if="form.resourceList[0].processedUrl"
|
|
|
:src="pictureUrl"
|
|
|
lazy
|
|
@@ -279,24 +299,45 @@
|
|
|
<el-row :gutter="40">
|
|
|
<div style="margin-left: 22px; color: #000; font-weight: bold">
|
|
|
<div>地图:</div>
|
|
|
- <Map style="margin:20px;" ref="form" name="robot-map" :runningTask="form.naviId"></Map>
|
|
|
+ <Map style="margin: 20px" ref="form" name="robot-map" :runningTask="this.form.naviId"></Map>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
<el-row :gutter="40">
|
|
|
<div style="margin: 0 22px 10px; color: #000; font-weight: bold">
|
|
|
<div>缺陷处理:</div>
|
|
|
</div>
|
|
|
- <el-form style="margin:20px;" ref="form" :model="form" :rules="rules" size="small" label-width="100px">
|
|
|
+ <el-form
|
|
|
+ style="margin: 20px"
|
|
|
+ ref="form"
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ size="small"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="巡检结果" prop="recognizeState">
|
|
|
- <el-input v-model="form.recognizeState" size="small" class="filter-item" />
|
|
|
+ <el-select
|
|
|
+ v-model="form.recognizeState"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ placeholder="识别状态"
|
|
|
+ class="filter-item"
|
|
|
+ style="width: 300px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in recognizeStateOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="修正后等级" prop="modifiedGrade">
|
|
|
<el-select
|
|
|
v-model="form.modifiedGrade"
|
|
|
clearable
|
|
|
size="small"
|
|
|
- placeholder="修正后等级等级"
|
|
|
+ placeholder="修正后等级"
|
|
|
class="filter-item"
|
|
|
style="width: 300px"
|
|
|
>
|
|
@@ -328,7 +369,21 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="处理结果" prop="reviewState">
|
|
|
- <el-input v-model="form.reviewState" size="small" class="filter-item" />
|
|
|
+ <el-select
|
|
|
+ v-model="form.reviewState"
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ placeholder="处理结果"
|
|
|
+ class="filter-item"
|
|
|
+ style="width: 300px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in reviewStateOptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-form>
|
|
@@ -355,6 +410,16 @@
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<!-- 编辑与删除 -->
|
|
|
+ <el-table-column label="缺陷等级" width="130px" align="center" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ showDefectGrade(scope.row.defectGrade) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="监测值" width="130px" align="center" fixed="right">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.value ? scope.row.value + scope.row.unit : scope.row.value }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
v-if="
|
|
|
checkPer(['admin', 'robotSLG:patrolRecord:list:edit', 'robotSLG:patrolRecord:list:del'])
|
|
@@ -365,7 +430,8 @@
|
|
|
fixed="right"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <udOperation :data="scope.row" :permission="permission" />
|
|
|
+ <el-button type="primary" @click="openInfoWindow(scope.row)">查看</el-button>
|
|
|
+ <!-- <udOperation :data="scope.row" :permission="permission" /> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -405,7 +471,7 @@ import {
|
|
|
getRobotToken,
|
|
|
getPatrolRecordList,
|
|
|
} from '@/api/robotSLG/public'
|
|
|
-import Map from "@/views/robotSLG/patrolRecord/map";
|
|
|
+import Map from '@/views/robotSLG/patrolRecord/map'
|
|
|
|
|
|
const defaultForm = {
|
|
|
id: '', //主键ID
|
|
@@ -467,11 +533,12 @@ export default {
|
|
|
name: 'PatrolRecord',
|
|
|
directives: { permission },
|
|
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
|
|
- components: { ...crudComps, DateRangePicker,Map },
|
|
|
+ components: { ...crudComps, DateRangePicker, Map },
|
|
|
cruds() {
|
|
|
return CRUD({
|
|
|
title: '巡检记录',
|
|
|
- url: 'explosive-api/patrol-record/list',
|
|
|
+ url: 'Personal/GetInfo',
|
|
|
+ // url: 'explosive-api/patrol-record/list',
|
|
|
query: { pageIndex: 1, pageSize: 10 },
|
|
|
listOrder: [],
|
|
|
crudMethod: { ...crudVisualIntercom },
|
|
@@ -565,20 +632,7 @@ export default {
|
|
|
createTime: '', //创建时间
|
|
|
},
|
|
|
],
|
|
|
- areaTree: {
|
|
|
- id: '', //主键ID
|
|
|
- parentId: '', //父节点ID
|
|
|
- parent: '', //父节点名称
|
|
|
- path: '', //区域树路径
|
|
|
- level: '', //层级
|
|
|
- sort: '', //排序比重值
|
|
|
- name: '', //区域名称
|
|
|
- memo: '', //备注
|
|
|
- editor: '', //编辑人
|
|
|
- createTime: '', //创建时间
|
|
|
- subList: '', //下级区域节点
|
|
|
- naviList: '', //下辖导航点
|
|
|
- },
|
|
|
+ areaTree: null,
|
|
|
navPointList: [
|
|
|
{
|
|
|
id: '', //主键ID
|
|
@@ -884,8 +938,42 @@ export default {
|
|
|
label: '未识别',
|
|
|
},
|
|
|
],
|
|
|
+ recognizeStateOptions: [
|
|
|
+ {
|
|
|
+ value: 'PREPARED',
|
|
|
+ label: '已准备',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'SUCCEED',
|
|
|
+ label: '识别成功',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'UNRECOGNIZED',
|
|
|
+ label: '未识别',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'OVERDUE',
|
|
|
+ label: '超时',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ reviewStateOptions: [
|
|
|
+ {
|
|
|
+ value: 'PENDING',
|
|
|
+ label: '待确认',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'AFFIRMED',
|
|
|
+ label: '属实',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'MISREPORTED',
|
|
|
+ label: '误报',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ positionList: [],
|
|
|
resourceList: [],
|
|
|
pictureUrl: '',
|
|
|
+ infoDisable: false,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -900,7 +988,7 @@ export default {
|
|
|
this.getPositionOption()
|
|
|
this.getTaskListOption()
|
|
|
this.getPatrolRecordListOption()
|
|
|
- }, 500)
|
|
|
+ }, 300)
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
@@ -934,16 +1022,18 @@ export default {
|
|
|
try {
|
|
|
let res = await getAreaTree({ token: this.robotToken, id: '' })
|
|
|
if (res.code === 1) {
|
|
|
- this.areaTree = {
|
|
|
- value: res.data.id,
|
|
|
- label: res.data.name,
|
|
|
- children: res.data.subList.map((a) => {
|
|
|
- return {
|
|
|
- value: a.id,
|
|
|
- label: a.name,
|
|
|
- }
|
|
|
- }),
|
|
|
- }
|
|
|
+ this.areaTree = [
|
|
|
+ {
|
|
|
+ value: res.data.id,
|
|
|
+ label: res.data.name,
|
|
|
+ children: res.data.subList.map((a) => {
|
|
|
+ return {
|
|
|
+ value: a.id,
|
|
|
+ label: a.name,
|
|
|
+ }
|
|
|
+ }),
|
|
|
+ },
|
|
|
+ ]
|
|
|
} else {
|
|
|
this.getRobotToken()
|
|
|
}
|
|
@@ -984,10 +1074,11 @@ export default {
|
|
|
async getPositionOption() {
|
|
|
try {
|
|
|
let res = await getPositionList({ token: this.robotToken, pageIndex: 1, pageSize: 100 })
|
|
|
+ // console.log(res);
|
|
|
if (res.code === 1) {
|
|
|
- this.positionList = res.data.map((a) => {
|
|
|
+ this.positionList = res.data.list.map((a) => {
|
|
|
return {
|
|
|
- label: a.naviSequence,
|
|
|
+ label: a.indicatorName,
|
|
|
value: a.id,
|
|
|
}
|
|
|
})
|
|
@@ -1089,14 +1180,17 @@ export default {
|
|
|
token: this.robotToken,
|
|
|
pageIndex: this.pageIndex,
|
|
|
pageSize: this.pageSize,
|
|
|
- idList: this.queryParams.idList ? this.queryParams.idList : null, //记录ID列表
|
|
|
- taskIdList: this.queryParams.taskIdList ? this.queryParams.taskIdList : null, //任务ID列表
|
|
|
+ // idList: this.queryParams.idList ? this.queryParams.idList : null, //记录ID列表
|
|
|
taskIdLike: this.queryParams.taskIdLike ? this.queryParams.taskIdLike : null, //任务ID模糊查询
|
|
|
taskTitleLike: this.queryParams.taskTitleLike ? this.queryParams.taskTitleLike : null, //任务标题(模糊查询)
|
|
|
robotId: this.queryParams.robotId ? this.queryParams.robotId : null, //机器人ID
|
|
|
mapId: this.queryParams.mapId ? this.queryParams.mapId : null, //地图ID
|
|
|
- areaList: this.queryParams.areaList ? this.queryParams.areaList : null, //区域ID列表
|
|
|
- positionList: this.queryParams.positionList ? this.queryParams.positionList : null, //点位ID列表
|
|
|
+ areaIdList: this.queryParams.areaList
|
|
|
+ ? this.queryParams.areaList.map((a) => {
|
|
|
+ return a[a.length - 1]
|
|
|
+ })
|
|
|
+ : [], //区域ID列表
|
|
|
+ positionList: this.queryParams.positionList ? this.queryParams.positionList : [], //点位ID列表
|
|
|
defectGradeList: this.queryParams.defectGradeList
|
|
|
? this.queryParams.defectGradeList
|
|
|
: null, //缺陷等级
|
|
@@ -1116,6 +1210,45 @@ export default {
|
|
|
}
|
|
|
} catch (error) {}
|
|
|
},
|
|
|
+ showDefectGrade(type) {
|
|
|
+ let value = ''
|
|
|
+ switch (type) {
|
|
|
+ case 0:
|
|
|
+ value = '正常'
|
|
|
+ break
|
|
|
+ case 1:
|
|
|
+ value = '轻微'
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ value = '预警'
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ value = '严重'
|
|
|
+ break
|
|
|
+ case 4:
|
|
|
+ value = '危及'
|
|
|
+ break
|
|
|
+ case -1:
|
|
|
+ value = '未识别'
|
|
|
+ break
|
|
|
+
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ return value
|
|
|
+ },
|
|
|
+ openInfoWindow(val) {
|
|
|
+ this.form = val
|
|
|
+ this.pictureUrl =
|
|
|
+ 'http://' + '172.16.214.237:8080' + '/robotPicture' + this.form.resourceList[0].processedUrl
|
|
|
+ // 'http://' + window.location.host + '/robotPicture' + this.form.resourceList[0].processedUrl
|
|
|
+ // console.log(this.pictureUrl)
|
|
|
+ // console.log(this.form)
|
|
|
+ this.infoDisable = true
|
|
|
+ },
|
|
|
+ closeInfoWindow() {
|
|
|
+ this.infoDisable = false
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|