Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gavel-hafms-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李苏
gavel-hafms-vue
Commits
63dde208
Commit
63dde208
authored
Sep 15, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改调用接口,定时查询
parent
e7a162c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
123 additions
and
125 deletions
+123
-125
index.vue
src/views/hzcxbb/szkb/index.vue
+123
-125
No files found.
src/views/hzcxbb/szkb/index.vue
View file @
63dde208
...
...
@@ -194,77 +194,20 @@
Yszx
},
mounted
()
{
/* 地图后端数据*/
doQueryRepDetail
({
"sjlx"
:
'HJ'
}).
then
(
res
=>
{
if
(
res
&&
res
.
success
)
{
/* 获取数据后操作*/
let
{
records
}
=
res
.
data
let
haRecord
=
records
.
filter
(
item
=>
{
return
item
.
gsbz
==
'Y'
})
if
(
haRecord
.
length
!=
0
)
{
/* 取第一条*/
this
.
hapm
=
haRecord
[
0
].
pm
}
/* 其他部门数据 目前按照部门名称进行过滤 */
let
habbList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'淮安供电公司本部'
})
let
jhxList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'金湖县供电公司'
})
let
xyxList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'盱眙县供电公司'
})
let
hzxList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'洪泽县供电公司'
})
let
lsxList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'涟水县供电公司'
})
// 初始地图JSON数据
this
.
$nextTick
(()
=>
{
document
.
getElementById
(
"szkb"
).
addEventListener
(
'dblclick'
,
function
(
e
)
{
fullScreen
(
document
.
getElementById
(
"szkb"
));
},
false
);
/* 初始化地图*/
this
.
szkbmapCharts
=
this
.
initSzkbmapCharts
({
habbList
:
habbList
,
jhxList
:
jhxList
,
xyxList
:
xyxList
,
hzxList
:
hzxList
,
lsxList
:
lsxList
})
this
.
sdtCharts
=
this
.
initsdt
()
this
.
szkbmapCharts
.
on
(
"click"
,
(
params
)
=>
{
if
(
params
.
data
)
{
//获取到定义的数据
let
info
=
params
.
data
.
data
/* 弹框传参查询*/
this
.
dialog
.
bmid
=
info
.
bmid
this
.
dialog
.
DialogTitle
=
info
.
bmName
this
.
dialog
.
showDialog
=
true
}
});
})
}
})
this
.
initLqnd
()
this
.
initLqnd2
()
this
.
initslt
()
this
.
isLoading
=
false
this
.
mounted
()
/* 刷新频率*/
const
DELAY
=
1000
*
60
*
30
this
.
DELAYNUM
=
setInterval
(()
=>
{
this
.
mounted
()
},
DELAY
)
},
destroyed
()
{
clearInterval
(
this
.
DELAYNUM
)
},
data
()
{
return
{
/* 定时器id*/
DELAYNUM
:
null
,
/* 两区农电预算一览 */
lqndylName1
:
''
,
lqndylName2
:
''
,
...
...
@@ -327,72 +270,127 @@
}
},
methods
:
{
initLqnd
()
{
this
.
$post
(
'hafms/yszhcxlog/query'
,
{
lx
:
'A'
mounted
(){
/*初始化*/
/* 地图后端数据*/
doQueryRepDetail
({
"sjlx"
:
'HJ'
}).
then
(
res
=>
{
if
(
res
&&
res
.
success
&&
res
.
data
.
records
&&
res
.
data
.
records
.
length
>
0
)
{
let
newData
=
res
.
data
.
records
[
0
]
this
.
$post
(
'hafms/yszhcxlog/queryDetail'
,
{
mid
:
newData
.
id
,
}).
then
(
res
=>
{
if
(
res
.
success
&&
res
.
data
.
records
)
{
const
{
records
}
=
res
.
data
if
(
records
.
length
!=
0
)
{
let
lxh1
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'1'
)
{
this
.
lqndylName1
=
item
.
gsname
return
true
}
})
let
lxh2
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'2'
)
{
this
.
lqndylName2
=
item
.
gsname
return
true
}
})
this
.
lg1
=
this
.
initlg1
(
lxh1
[
0
])
this
.
lg2
=
this
.
initlg2
(
lxh2
[
0
])
if
(
res
&&
res
.
success
)
{
/* 获取数据后操作*/
let
{
records
}
=
res
.
data
let
haRecord
=
records
.
filter
(
item
=>
{
return
item
.
gsbz
==
'Y'
})
if
(
haRecord
.
length
!=
0
)
{
/* 取第一条*/
this
.
hapm
=
haRecord
[
0
].
pm
}
/* 其他部门数据 目前按照部门名称进行过滤 */
let
habbList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'淮安供电公司本部'
})
let
jhxList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'金湖县供电公司'
})
let
xyxList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'盱眙县供电公司'
})
let
hzxList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'洪泽县供电公司'
})
let
lsxList
=
records
.
filter
(
item
=>
{
return
item
.
bmName
==
'涟水县供电公司'
})
// 初始地图JSON数据
this
.
$nextTick
(()
=>
{
document
.
getElementById
(
"szkb"
).
addEventListener
(
'dblclick'
,
function
(
e
)
{
fullScreen
(
document
.
getElementById
(
"szkb"
));
},
false
);
/* 初始化地图*/
this
.
szkbmapCharts
=
this
.
initSzkbmapCharts
({
habbList
:
habbList
,
jhxList
:
jhxList
,
xyxList
:
xyxList
,
hzxList
:
hzxList
,
lsxList
:
lsxList
})
this
.
sdtCharts
=
this
.
initsdt
()
this
.
szkbmapCharts
.
on
(
"click"
,
(
params
)
=>
{
if
(
params
.
data
)
{
//获取到定义的数据
let
info
=
params
.
data
.
data
/* 弹框传参查询*/
this
.
dialog
.
bmid
=
info
.
bmid
this
.
dialog
.
DialogTitle
=
info
.
bmName
this
.
dialog
.
showDialog
=
true
}
}
}
);
})
this
.
isLoading
=
false
}
})
this
.
initLqnd
()
this
.
initLqnd2
()
this
.
initslt
()
},
initLqnd
()
{
this
.
$post
(
'hafms/yszhcxlog/queryRepDetail'
,
{
lx
:
'A'
}).
then
(
res
=>
{
if
(
res
.
success
&&
res
.
data
.
records
)
{
const
{
records
}
=
res
.
data
if
(
records
.
length
!=
0
)
{
let
lxh1
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'1'
)
{
this
.
lqndylName1
=
item
.
gsname
return
true
}
})
let
lxh2
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'2'
)
{
this
.
lqndylName2
=
item
.
gsname
return
true
}
})
this
.
lg1
=
this
.
initlg1
(
lxh1
[
0
])
this
.
lg2
=
this
.
initlg2
(
lxh2
[
0
])
}
}
})
},
initLqnd2
()
{
this
.
$post
(
'hafms/yszhcxlog/query'
,
{
lx
:
'B'
this
.
$post
(
'hafms/yszhcxlog/query
RepDetail
'
,
{
lx
:
'B'
}).
then
(
res
=>
{
if
(
res
&&
res
.
success
&&
res
.
data
.
records
&&
res
.
data
.
records
.
length
>
0
)
{
let
newData
=
res
.
data
.
records
[
0
]
this
.
$post
(
'hafms/yszhcxlog/queryDetail'
,
{
mid
:
newData
.
id
,
}).
then
(
res
=>
{
if
(
res
.
success
&&
res
.
data
.
records
)
{
const
{
records
}
=
res
.
data
if
(
records
.
length
!=
0
)
{
let
lxh1
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'1'
)
{
this
.
lhName1
=
item
.
gsname
return
true
}
})
let
lxh2
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'2'
)
{
this
.
lhName2
=
item
.
gsname
return
true
}
})
this
.
lg3
=
this
.
initlg3
(
lxh1
[
0
])
this
.
lg4
=
this
.
initlg4
(
lxh2
[
0
])
if
(
res
.
success
&&
res
.
data
.
records
)
{
const
{
records
}
=
res
.
data
if
(
records
.
length
!=
0
)
{
let
lxh1
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'1'
)
{
this
.
lhName1
=
item
.
gsname
return
true
}
}
})
})
let
lxh2
=
records
.
filter
(
item
=>
{
if
(
item
.
lxh
==
'2'
)
{
this
.
lhName2
=
item
.
gsname
return
true
}
})
this
.
lg3
=
this
.
initlg3
(
lxh1
[
0
])
this
.
lg4
=
this
.
initlg4
(
lxh2
[
0
])
}
}
})
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment