微调
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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) => {
|
||||||
|
|||||||
@@ -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(() => {
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user