|
|
@ -26,7 +26,7 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="14"> |
|
|
<el-col :span="14"> |
|
|
<el-alert |
|
|
<el-alert |
|
|
:title="$t('share.prompt')" |
|
|
|
|
|
|
|
|
title="提示" |
|
|
type="info" |
|
|
type="info" |
|
|
:description="$t('site_management.promptMsg') + ';'" |
|
|
:description="$t('site_management.promptMsg') + ';'" |
|
|
show-icon |
|
|
show-icon |
|
|
@ -123,14 +123,14 @@ |
|
|
:render-header="addRedStar" |
|
|
:render-header="addRedStar" |
|
|
> |
|
|
> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
|
|
|
{{ patrolTypeNameFn(scope.row.patrolTypeIds) }} |
|
|
<el-select |
|
|
<el-select |
|
|
multiple |
|
|
multiple |
|
|
v-model="scope.row.patrolTypeId" |
|
|
|
|
|
|
|
|
v-model="scope.row.patrolTypeIds" |
|
|
:placeholder=" |
|
|
:placeholder=" |
|
|
$t('share.PleaseChoose') + |
|
|
$t('share.PleaseChoose') + |
|
|
$t('site_management.InspectionType') |
|
|
$t('site_management.InspectionType') |
|
|
" |
|
|
" |
|
|
disabled |
|
|
|
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="item in InspectionTypeData" |
|
|
v-for="item in InspectionTypeData" |
|
|
@ -379,10 +379,9 @@ |
|
|
prop="patrolTypeId" |
|
|
prop="patrolTypeId" |
|
|
> |
|
|
> |
|
|
<el-select |
|
|
<el-select |
|
|
v-model="monitorPointForm.patrolTypeId" |
|
|
|
|
|
|
|
|
v-model="monitorPointForm.patrolTypeIds" |
|
|
multiple |
|
|
multiple |
|
|
filterable |
|
|
filterable |
|
|
allow-create |
|
|
|
|
|
default-first-option |
|
|
default-first-option |
|
|
:placeholder=" |
|
|
:placeholder=" |
|
|
$t('share.PleaseChoose') + $t('site_management.InspectionType') |
|
|
$t('share.PleaseChoose') + $t('site_management.InspectionType') |
|
|
@ -784,11 +783,14 @@ import { |
|
|
// listByEqIdAndChannelId |
|
|
// listByEqIdAndChannelId |
|
|
} from "@/api/point/site_management"; |
|
|
} from "@/api/point/site_management"; |
|
|
import siteVideoDialog from "./components/site_VideoDialog.vue"; |
|
|
import siteVideoDialog from "./components/site_VideoDialog.vue"; |
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect"; |
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
|
|
export default { |
|
|
export default { |
|
|
name: "SiteManagement", |
|
|
name: "SiteManagement", |
|
|
components: { |
|
|
components: { |
|
|
videoPlayer, |
|
|
videoPlayer, |
|
|
siteVideoDialog, |
|
|
siteVideoDialog, |
|
|
|
|
|
Treeselect, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
@ -919,6 +921,7 @@ export default { |
|
|
}), |
|
|
}), |
|
|
getPatroltypeList().then((res) => { |
|
|
getPatroltypeList().then((res) => { |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
|
|
|
console.log(res.rows, 1111111111); |
|
|
this.InspectionTypeData = res.rows; |
|
|
this.InspectionTypeData = res.rows; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@ -954,6 +957,12 @@ export default { |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
this.tableData = res.rows; |
|
|
this.tableData = res.rows; |
|
|
this.tableData.forEach((item) => { |
|
|
this.tableData.forEach((item) => { |
|
|
|
|
|
// item.patrolTypeIds = item.patrolTypeId.split(","); |
|
|
|
|
|
// item.patrolTypeIds = item.patrolTypeId.split(",").map(Number)||[]; |
|
|
|
|
|
item.patrolTypeIds = (item.patrolTypeId || "") |
|
|
|
|
|
.split(",") |
|
|
|
|
|
.map(Number) |
|
|
|
|
|
.filter(Boolean); |
|
|
let id = item.algSubtypeIds.split(","); |
|
|
let id = item.algSubtypeIds.split(","); |
|
|
item.patrolTypeId = id.map(Number); |
|
|
item.patrolTypeId = id.map(Number); |
|
|
}); |
|
|
}); |
|
|
@ -991,6 +1000,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
tabsClick() {}, |
|
|
tabsClick() {}, |
|
|
add() { |
|
|
add() { |
|
|
|
|
|
this.monitorPointForm={} |
|
|
this.type = 0; |
|
|
this.type = 0; |
|
|
this.monitorPointDialogVisible = true; |
|
|
this.monitorPointDialogVisible = true; |
|
|
this.monitorPointTitle = this.$t("site_management.AddMonitoringPoints"); |
|
|
this.monitorPointTitle = this.$t("site_management.AddMonitoringPoints"); |
|
|
@ -999,20 +1009,16 @@ export default { |
|
|
this.monitorPointDialogVisible = false; |
|
|
this.monitorPointDialogVisible = false; |
|
|
}, |
|
|
}, |
|
|
monitorPointEdit(data) { |
|
|
monitorPointEdit(data) { |
|
|
|
|
|
this.monitorPointForm={} |
|
|
this.type = 1; |
|
|
this.type = 1; |
|
|
this.monitorPointDialogVisible = true; |
|
|
this.monitorPointDialogVisible = true; |
|
|
this.monitorPointTitle = this.$t( |
|
|
this.monitorPointTitle = this.$t( |
|
|
"site_management.ModifyMonitoringPoints" |
|
|
"site_management.ModifyMonitoringPoints" |
|
|
); |
|
|
); |
|
|
this.monitorPointForm = data; |
|
|
|
|
|
// this.tableData.forEach((item) => { |
|
|
|
|
|
// if (item.patrolpointId == data.patrolpointId) { |
|
|
|
|
|
// // console.log(item, 11111111111111); |
|
|
|
|
|
// editItem(item.patrolpointId).then((res) => { |
|
|
|
|
|
// console.log(res, 111111111); |
|
|
|
|
|
// }); |
|
|
|
|
|
// } |
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
this.monitorPointForm = { |
|
|
|
|
|
...data, |
|
|
|
|
|
patrolTypeIds: data.patrolTypeIds || [], |
|
|
|
|
|
}; |
|
|
}, |
|
|
}, |
|
|
// 关闭绑定可见光监测点弹窗 |
|
|
// 关闭绑定可见光监测点弹窗 |
|
|
bindingMonitorPointClose() { |
|
|
bindingMonitorPointClose() { |
|
|
@ -1052,9 +1058,9 @@ export default { |
|
|
InspectionBtn() { |
|
|
InspectionBtn() { |
|
|
this.InspectionDialogVisible = true; |
|
|
this.InspectionDialogVisible = true; |
|
|
eqpbookList(this.eqpbookListQuery).then((res) => { |
|
|
eqpbookList(this.eqpbookListQuery).then((res) => { |
|
|
console.log(res,1111) |
|
|
|
|
|
if(res.code==200){ |
|
|
|
|
|
this.InspectionTableData=res.rows |
|
|
|
|
|
|
|
|
console.log(res, 1111); |
|
|
|
|
|
if (res.code == 200) { |
|
|
|
|
|
this.InspectionTableData = res.rows; |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
@ -1094,7 +1100,7 @@ export default { |
|
|
this.$refs["ruleForm"].validate((valid) => { |
|
|
this.$refs["ruleForm"].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
this.monitorPointForm.patrolTypeId = |
|
|
this.monitorPointForm.patrolTypeId = |
|
|
this.monitorPointForm.patrolTypeId.toString(); |
|
|
|
|
|
|
|
|
this.monitorPointForm.patrolTypeIds.toString(); |
|
|
if (this.type == 0) { |
|
|
if (this.type == 0) { |
|
|
postAdd(this.monitorPointForm).then((res) => { |
|
|
postAdd(this.monitorPointForm).then((res) => { |
|
|
if (res.code == 200) { |
|
|
if (res.code == 200) { |
|
|
@ -1190,6 +1196,27 @@ export default { |
|
|
dialogChannelImgHandleClose() { |
|
|
dialogChannelImgHandleClose() { |
|
|
this.dialogChannelImg = false; |
|
|
this.dialogChannelImg = false; |
|
|
}, |
|
|
}, |
|
|
|
|
|
patrolTypeNameFn(arr) { |
|
|
|
|
|
// console.log(str, 1111111111); |
|
|
|
|
|
if (Array.isArray(arr) && arr.length > 0) { |
|
|
|
|
|
// return this.InspectionTypeData.filter(item => item.id == str)[0].name; |
|
|
|
|
|
console.log(this.InspectionTypeData, "存在", arr); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// handleSelectPointCode(node, row) { |
|
|
|
|
|
// row.patrolTypeId.push(node.id); |
|
|
|
|
|
// console.log( row.patrolTypeId,2222222) |
|
|
|
|
|
// return |
|
|
|
|
|
// this.handleChangePointCode(row); |
|
|
|
|
|
// }, |
|
|
|
|
|
// handleDeSelectPointCode(node, row) { |
|
|
|
|
|
// if (row.patrolTypeId.indexOf(node.id) != -1) { |
|
|
|
|
|
// row.patrolTypeId.splice(row.patrolTypeId.indexOf(node.id), 1); |
|
|
|
|
|
// console.log( row.patrolTypeId,2222222) |
|
|
|
|
|
// return |
|
|
|
|
|
// this.handleChangePointCode(row); |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|