This commit is contained in:
sjl
2026-01-12 14:01:43 +08:00
parent e65df4daad
commit 20e6d3719a
7 changed files with 7 additions and 8 deletions

View File

@@ -25,14 +25,10 @@ export const useMonitoringPoint = defineStore(
val: any
) => {
state[key] = val
}
const setShowCheckBox = (val: boolean) => {
if (val && state.lineIds.length === 0) {
state.lineIds = [state.lineId]
// console.log('====================================')
// console.log(state.lineIds)
// console.log('====================================')
}
state.showCheckBox = val
}

View File

@@ -20,7 +20,7 @@
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
</el-radio-group>
</div>
<div v-if="information">
<div >
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>

View File

@@ -91,8 +91,10 @@ const submit = () => {
formRef.value.validate(async (valid: boolean) => {
if (valid) {
if (urlList.value.length > 0) {
const promises = urlList.value.map(async (item: any) => {
if (urlList.value[0].raw) {
return new Promise((resolve, reject) => {
uploadFile(item.raw, '/supervision/')
.then((res: any) => {

View File

@@ -46,7 +46,7 @@ watch(
if (!newLineId) return
// 在这里处理 lineId 的变化
console.log('newLineId')
monitoringPoint.setValue('lineId', router.currentRoute.value.query.lineId)
monitoringPoint.setValue('lineName', router.currentRoute.value.query.lineName)
setTimeout(() => {

View File

@@ -75,6 +75,7 @@ onMounted(() => {
})
const handleNodeClick = (data: any, node: any) => {
if (data.level === 6) {
monitoringPoint.setValue('lineId', data.id)
monitoringPoint.setValue('pid', data.pids)
monitoringPoint.setValue('lineName', data.alias)

View File

@@ -71,10 +71,8 @@ const handleNodeClick = (data: any, node: any) => {
if (window.localStorage.getItem('BMAP_SECKEY') == null) {
flag.value = false
}
monitoringPoint.setValue('lineId', data.id)
monitoringPoint.setValue('lineName', data.alias)
}
setTimeout(() => {
flag.value = true

View File

@@ -246,12 +246,14 @@ const handler = async ({ BMap, map }: any) => {
() => monitoringPoint.state.lineId,
(newLineId, oldLineId) => {
let value = areaLineInfo.value.find((item: any) => item.lineId == newLineId)
if (value == undefined) return
center.value.lng = value.lng
center.value.lat = value.lat + 0.01
infoWindowPoint.value = value
infoWindowPoint.value.show = true
monitoringPoint.setValue(
'lineName',
value.manufacturer + '>' + value.gdName + '>' + value.subName + '>' + value.lineName