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 val: any
) => { ) => {
state[key] = val state[key] = val
} }
const setShowCheckBox = (val: boolean) => { const setShowCheckBox = (val: boolean) => {
if (val && state.lineIds.length === 0) { if (val && state.lineIds.length === 0) {
state.lineIds = [state.lineId] state.lineIds = [state.lineId]
// console.log('====================================')
// console.log(state.lineIds)
// console.log('====================================')
} }
state.showCheckBox = val 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-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
</el-radio-group> </el-radio-group>
</div> </div>
<div v-if="information"> <div >
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button> <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-Edit" type="primary" @click="revise">修改</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</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) => { formRef.value.validate(async (valid: boolean) => {
if (valid) { if (valid) {
if (urlList.value.length > 0) { if (urlList.value.length > 0) {
const promises = urlList.value.map(async (item: any) => { const promises = urlList.value.map(async (item: any) => {
if (urlList.value[0].raw) { if (urlList.value[0].raw) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uploadFile(item.raw, '/supervision/') uploadFile(item.raw, '/supervision/')
.then((res: any) => { .then((res: any) => {

View File

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

View File

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

View File

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

View File

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