Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
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
常超
founder_vue
Commits
74e7a524
Commit
74e7a524
authored
Feb 11, 2022
by
li_hongchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发查询权限 ui问题调整
parent
de4818f8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
944 additions
and
838 deletions
+944
-838
src/views/AllPersonnelBase/gzlb.vue
+16
-3
src/views/SystemManage/QueryPermission.vue
+928
-835
No files found.
src/views/AllPersonnelBase/gzlb.vue
View file @
74e7a524
...
...
@@ -806,10 +806,13 @@ export default {
let
hz
=
this
.
showType
===
1
?
'Ry'
:
'Aj'
return
this
.
qxgzPopName
+
hz
+
index
},
c
lickQxgz
(
index
)
{
if
(
this
.
qxgzPopIndex
!==
-
1
&&
this
.
qxgzPopIndex
!==
index
)
{
c
ancleQxgzPop
(
)
{
if
(
this
.
qxgzPopIndex
!==
-
1
)
{
this
.
$refs
[
this
.
getQxgzPopRef
(
this
.
qxgzPopIndex
)].
cancel
()
}
},
clickQxgz
(
index
)
{
this
.
cancleQxgzPop
()
this
.
qxgzPopIndex
=
index
},
// 获取全部人员列表请求
...
...
@@ -1092,6 +1095,7 @@ export default {
//复制条码列表操作
isShowFztmBtn
(
val
)
{
this
.
cancleQxgzPop
()
//console.log("复制条码", val);
if
(
this
.
showType
==
1
)
{
this
.
type
=
'ry'
...
...
@@ -1155,6 +1159,7 @@ export default {
}
},
isShowFcxBtn1
(
val
)
{
this
.
cancleQxgzPop
()
//console.log("单行人员发查询数据", val);
let
rowVal
=
[]
rowVal
.
push
(
val
)
...
...
@@ -1212,6 +1217,7 @@ export default {
* @return {*}
*/
handleClick
(
row
)
{
this
.
cancleQxgzPop
()
//console.log(row);
if
(
this
.
showType
==
1
)
{
// 清除bus
...
...
@@ -1324,9 +1330,16 @@ export default {
},
mounted
()
{
this
.
search
()
let
_that
=
this
//console.log(this.$route.query.id, 'this.$route.query.id')
this
.
showType
=
this
.
$route
.
query
.
id
||
'1'
document
.
addEventListener
(
'click'
,
function
(
event
)
{
logger
.
info
(
'click'
,
'1111111111111111111111111111111111111'
)
if
(
_that
.
qxgzPopIndex
!==
-
1
)
{
_that
.
$refs
[
_that
.
getQxgzPopRef
(
_that
.
qxgzPopIndex
)].
cancel
()
_that
.
qxgzPopIndex
=
-
1
}
})
},
}
</
script
>
...
...
src/views/SystemManage/QueryPermission.vue
View file @
74e7a524
...
...
@@ -7,860 +7,953 @@
* @FilePath: \founder_vue\src\views\SystemManage\QueryPermission.vue
-->
<
template
>
<div
class=
"querypermission"
>
<div
class=
"maps"
>
<div
class=
"map"
:id=
"id"
></div>
<div
class=
"mapTitle"
></div>
<div
class=
"mapLegend"
>
<div>
<div
class=
"legendBlk less"
></div>
<div>
少
</div>
<div
class=
"persent"
>
(0~30%)
</div>
</div>
<div>
<div
class=
"legendBlk middle"
></div>
<div>
中
</div>
<div
class=
"persent"
>
(30~70%)
</div>
</div>
<div>
<div
class=
"legendBlk many"
></div>
<div>
多
</div>
<div
class=
"persent"
>
(70~100%)
</div>
</div>
</div>
</div>
<div
class=
"tables"
>
<div
class=
"firstLine"
>
<img
class=
"buleBlk"
src=
"@/assets/img/fcxqx/blueBlk.png"
/>
<div
class=
"txt"
>
系统可发送查询总数:
</div>
<el-input
v-model=
"numTotal"
@
input=
"totalNumChanged"
></el-input>
<label>
条/天
</label>
<el-checkbox
class=
"ckbAuto"
fill=
"#055FE7"
v-model=
"isAutoDistribute"
>
省厅总数自动分配
</el-checkbox
>
<button
@
click=
"autoDistribute"
class=
"f-primary-button"
>
一键分配
</button>
</div>
<div
class=
"stTongji"
>
<div>
省/区厅发查询总数:
</div>
<div
class=
"labelBack blue"
></div>
<numberInput
v-bind:text=
"numTotalSt"
v-bind:preText=
"numTotalStUsed.toString() +' /'"
v-on:change=
"changeStTotalNum"
></numberInput>
<div
class=
"awayLeft"
>
其中高优先级:
</div>
<numberInput
v-bind:text=
"numGaoSt"
v-bind:preText=
"numGaoStUsed.toString() + ' /'"
v-on:change=
"changeStGaoNum"
></numberInput>
</div>
<el-table
:data=
"tableDateSt"
tooltip-effect=
"dark"
style=
"width: 100%"
>
<el-table-column
label=
"省/区厅用户名"
prop=
"userName"
>
</el-table-column>
<el-table-column
label=
"已发送/总数"
prop=
"date"
>
<template
slot-scope=
"scope"
>
<editableLable
v-bind:id=
"scope.row.userId.toString()"
v-bind:type=
"0"
v-bind:isSt=
"true"
v-bind:preText=
"
<div
class=
"querypermission"
>
<div
class=
"maps"
>
<div
class=
"map"
:id=
"id"
></div>
<div
class=
"mapTitle"
></div>
<div
class=
"mapLegend"
>
<div>
<div
class=
"legendBlk less"
></div>
<div>
少
</div>
<div
class=
"persent"
>
(0~30%)
</div>
</div>
<div>
<div
class=
"legendBlk middle"
></div>
<div>
中
</div>
<div
class=
"persent"
>
(30~70%)
</div>
</div>
<div>
<div
class=
"legendBlk many"
></div>
<div>
多
</div>
<div
class=
"persent"
>
(70~100%)
</div>
</div>
</div>
</div>
<div
class=
"tables"
>
<div
class=
"firstLine"
>
<img
class=
"buleBlk"
src=
"@/assets/img/fcxqx/blueBlk.png"
/>
<div
class=
"txt"
>
系统可发送查询总数:
</div>
<el-input
v-model=
"numTotal"
@
input=
"totalNumChanged"
></el-input>
<label>
条/天
</label>
<el-checkbox
class=
"ckbAuto"
fill=
"#055FE7"
v-model=
"isAutoDistribute"
>
省厅总数自动分配
</el-checkbox>
<button
@
click=
"autoDistribute"
class=
"f-primary-button"
>
一键分配
</button>
</div>
<div
class=
"stTongji"
>
<div>
省/区厅发查询总数:
</div>
<div
class=
"labelBack blue"
></div>
<numberInput
v-bind:text=
"numTotalSt"
v-bind:preText=
"numTotalStUsed.toString() +' /'"
v-on:change=
"changeStTotalNum"
></numberInput>
<div
class=
"awayLeft"
>
其中高优先级:
</div>
<numberInput
v-bind:text=
"numGaoSt"
v-bind:preText=
"numGaoStUsed.toString() + ' /'"
v-on:change=
"changeStGaoNum"
></numberInput>
</div>
<el-table
:border=
"true"
:data=
"tableDateSt"
tooltip-effect=
"dark"
style=
"width: 100%"
:header-cell-class-name=
"tableRowClassName"
>
<el-table-column
label=
"省/区厅用户名"
prop=
"userName"
>
</el-table-column>
<el-table-column
label=
"已发送/总数"
prop=
"date"
>
<template
slot-scope=
"scope"
>
<editableLable
v-bind:id=
"scope.row.userId.toString()"
v-bind:type=
"0"
v-bind:isSt=
"true"
v-bind:preText=
"
(
scope.row.midUsed +
scope.row.lowUsed +
scope.row.highUsed
).toString() + '/'
"
v-bind:text=
"
v-bind:text=
"
(scope.row.midTotal + scope.row.highTotal).toString()
"
v-on:change=
"changeYonghuTotalNumber"
>
</editableLable>
</
template
>
</el-table-column>
<el-table-column
label=
"其中(高优先级)"
prop=
"highTotal"
>
<
template
slot-scope=
"scope"
>
<editableLable
v-bind:id=
"scope.row.userId.toString()"
v-bind:type=
"1"
v-bind:isSt=
"true"
v-bind:preText=
"scope.row.highUsed.toString() + '/'"
v-bind:text=
"scope.row.highTotal.toString()"
v-on:change=
"changeYonghuTotalNumber"
>
</editableLable>
</
template
>
</el-table-column>
</el-table>
<div
v-show=
"selectedFeature"
class=
"dsTongjiBlk"
>
<label>
地市单位:
</label>
<label>
{{ dsdw + "公安局" }}
</label>
<div
class=
"dsTongji"
>
<div>
地市发查询总数:
</div>
<div
class=
"labelBack pink"
></div>
<numberInput
v-bind:text=
"numTotalDs"
v-bind:preText=
"numTotalDsUsed.toString() + ' /'"
v-on:change=
"changeDsTotalNum"
></numberInput>
<div
class=
"awayLeft"
>
其中高优先级:
</div>
<numberInput
v-bind:text=
"numGaoDs"
v-bind:preText=
"numGaoDsUsed.toString() + ' /'"
v-on:change=
"changeDsGaoNum"
></numberInput>
</div>
</div>
<el-table
ref=
"dishiTable"
:data=
"tableDateDs"
tooltip-effect=
"dark"
style=
"width: 100%"
>
<el-table-column
label=
"省/区厅用户名"
prop=
"userName"
>
</el-table-column>
<el-table-column
label=
"已发送/总数"
prop=
"date"
>
<
template
slot-scope=
"scope"
>
<editableLable
v-bind:id=
"scope.row.userId.toString()"
v-bind:type=
"0"
v-bind:isSt=
"false"
v-bind:preText=
"
v-on:change=
"changeYonghuTotalNumber"
>
</editableLable>
</
template
>
</el-table-column>
<el-table-column
class=
"kkk"
label=
"其中(高优先级)"
prop=
"highTotal"
>
<
template
slot-scope=
"scope"
>
<editableLable
v-bind:id=
"scope.row.userId.toString()"
v-bind:type=
"1"
v-bind:isSt=
"true"
v-bind:preText=
"scope.row.highUsed.toString() + '/'"
v-bind:text=
"scope.row.highTotal.toString()"
v-on:change=
"changeYonghuTotalNumber"
>
</editableLable>
</
template
>
</el-table-column>
</el-table>
<div
v-show=
"selectedFeature"
class=
"dsTongjiBlk"
>
<label>
地市单位:
</label>
<label>
{{ dsdw + '公安局' }}
</label>
<div
class=
"dsTongji"
>
<div>
地市发查询总数:
</div>
<div
class=
"labelBack pink"
></div>
<numberInput
v-bind:text=
"numTotalDs"
v-bind:preText=
"numTotalDsUsed.toString() + ' /'"
v-on:change=
"changeDsTotalNum"
></numberInput>
<div
class=
"awayLeft"
>
其中高优先级:
</div>
<numberInput
v-bind:text=
"numGaoDs"
v-bind:preText=
"numGaoDsUsed.toString() + ' /'"
v-on:change=
"changeDsGaoNum"
></numberInput>
</div>
</div>
<el-table
:border=
"true"
ref=
"dishiTable"
:data=
"tableDateDs"
tooltip-effect=
"dark"
style=
"width: 100%"
:header-cell-class-name=
"tableRowClassName"
>
<el-table-column
label=
"省/区厅用户名"
prop=
"userName"
>
</el-table-column>
<el-table-column
label=
"已发送/总数"
prop=
"date"
>
<
template
slot-scope=
"scope"
>
<editableLable
v-bind:id=
"scope.row.userId.toString()"
v-bind:type=
"0"
v-bind:isSt=
"false"
v-bind:preText=
"
(
scope.row.midUsed +
scope.row.lowUsed +
scope.row.highUsed
).toString() + '/'
"
v-bind:text=
"
v-bind:text=
"
(scope.row.midTotal + scope.row.highTotal).toString()
"
v-on:change=
"changeYonghuTotalNumber"
>
</editableLable>
</
template
>
</el-table-column>
<el-table-column
label=
"其中(高优先级)"
prop=
"highTotal"
>
<
template
slot-scope=
"scope"
>
<editableLable
v-bind:id=
"scope.row.userId.toString()"
v-bind:type=
"1"
v-bind:isSt=
"false"
v-bind:preText=
"scope.row.highUsed.toString() + '/'"
v-bind:text=
"scope.row.highTotal.toString()"
v-on:change=
"changeYonghuTotalNumber"
>
</editableLable>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
v-on:change=
"changeYonghuTotalNumber"
>
</editableLable>
</
template
>
</el-table-column>
<el-table-column
label=
"其中(高优先级)"
prop=
"highTotal"
>
<
template
slot-scope=
"scope"
>
<editableLable
v-bind:id=
"scope.row.userId.toString()"
v-bind:type=
"1"
v-bind:isSt=
"false"
v-bind:preText=
"scope.row.highUsed.toString() + '/'"
v-bind:text=
"scope.row.highTotal.toString()"
v-on:change=
"changeYonghuTotalNumber"
>
</editableLable>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</template>
<
script
>
import
dataR
from
"@/assets/data/xz.json"
;
import
dataP
from
"@/assets/data/xzP.json"
;
import
Map
from
"ol/Map"
;
import
View
from
"ol/View"
;
import
GeoJSON
from
"ol/format/GeoJSON"
;
import
{
Vector
as
VectorSource
}
from
"ol/source"
;
import
{
Vector
as
VectorLayer
}
from
"ol/layer"
;
import
{
Fill
,
Stroke
,
Style
,
Text
,
Icon
}
from
"ol/style"
;
import
{
Point
}
from
"ol/geom"
;
import
marker
from
"@/assets/img/fcxqx/marker.png"
;
import
markers
from
"@/assets/img/fcxqx/markerS.png"
;
import
editableLable
from
"@/views/SystemManage/editableLable.vue"
;
import
numberInput
from
"@/views/SystemManage/numberInput.vue"
;
import
qs
from
"qs"
;
let
selectedRegionLayer
,
selectedPointLayer
;
import
dataR
from
'@/assets/data/xz.json'
import
dataP
from
'@/assets/data/xzP.json'
import
Map
from
'ol/Map'
import
View
from
'ol/View'
import
GeoJSON
from
'ol/format/GeoJSON'
import
{
Vector
as
VectorSource
}
from
'ol/source'
import
{
Vector
as
VectorLayer
}
from
'ol/layer'
import
{
Fill
,
Stroke
,
Style
,
Text
,
Icon
}
from
'ol/style'
import
{
Point
}
from
'ol/geom'
import
marker
from
'@/assets/img/fcxqx/marker.png'
import
markers
from
'@/assets/img/fcxqx/markerS.png'
import
editableLable
from
'@/views/SystemManage/editableLable.vue'
import
numberInput
from
'@/views/SystemManage/numberInput.vue'
import
qs
from
'qs'
let
selectedRegionLayer
,
selectedPointLayer
export
default
{
name
:
"QueryPermission"
,
components
:
{
editableLable
,
numberInput
},
data
()
{
return
{
stDataObj
:
{},
dsDataObj
:
{},
dsdw
:
"拉萨市"
,
tableDateDs
:
[],
tableDateSt
:
[],
isAutoDistribute
:
true
,
id
:
"olGeojsonMap"
,
heightWindow
:
window
.
innerHeight
-
0
+
"px"
,
selectedFeature
:
null
,
colorArr
:
[
"rgba(154, 218, 252, 0.64)"
,
"rgba(130, 199, 253, 1)"
,
"rgba(10, 200, 153, 1)"
,
],
numTotal
:
0
,
numTotalSt
:
0
,
numTotalStUsed
:
0
,
numGaoSt
:
0
,
numGaoStUsed
:
0
,
numTotalDs
:
0
,
numTotalDsUsed
:
0
,
numGaoDs
:
0
,
numGaoDsUsed
:
0
,
intervalNum
:
0
,
regionFeatures
:
[],
pointFeatures
:
[],
shengtingCode
:
"540000000000"
,
dishiCode
:
"540100000000"
,
};
},
methods
:
{
initMap
()
{
const
self
=
this
;
// 地图地址
const
features
=
new
GeoJSON
().
readFeatures
(
dataR
);
this
.
regionFeatures
=
features
;
const
featuresP
=
new
GeoJSON
().
readFeatures
(
dataP
);
this
.
pointFeatures
=
featuresP
;
const
vectorSource
=
new
VectorSource
({
features
:
features
,
});
const
pointLayer
=
new
VectorLayer
({
source
:
new
VectorSource
({
features
:
featuresP
,
}),
style
:
function
(
feature
)
{
const
style
=
[
new
Style
({
text
:
new
Text
({
font
:
"14px HarmonyOS_Sans_SC-Bold, HarmonyOS_Sans_SC"
,
fill
:
new
Fill
({
color
:
"rgba(255, 255, 255, 1)"
,
}),
offsetY
:
-
35
,
textAlign
:
"center"
,
text
:
feature
.
get
(
"totalCount"
)
||
""
,
}),
image
:
new
Icon
({
anchor
:
[
0.5
,
120
],
scale
:
0.5
,
anchorXUnits
:
"fraction"
,
anchorYUnits
:
"pixels"
,
src
:
marker
,
}),
}),
new
Style
({
text
:
new
Text
({
font
:
"14px HarmonyOS_Sans_SC"
,
fill
:
new
Fill
({
color
:
"rgba(255, 255, 255, 1)"
,
}),
backgroundFill
:
new
Fill
({
color
:
"rgba(0, 0, 0, 0.6) "
,
}),
backgroundStroke
:
new
Stroke
({
color
:
"rgba(255, 255, 255, 1)"
,
width
:
1
,
}),
textAlign
:
"center"
,
padding
:
[
3
,
1
,
0
,
3
],
text
:
feature
.
get
(
"MC"
),
}),
}),
];
return
style
;
},
});
const
layer
=
new
VectorLayer
({
source
:
vectorSource
,
style
:
function
(
feature
)
{
const
style
=
new
Style
({
fill
:
new
Fill
({
color
:
self
.
getFeatureColor
(
feature
.
get
(
"percentage"
)),
}),
stroke
:
new
Stroke
({
color
:
"#fff"
,
width
:
2
,
}),
});
return
style
;
},
});
selectedRegionLayer
=
new
VectorLayer
({
source
:
new
VectorSource
(),
style
:
function
(
feature
)
{
const
rstyle
=
new
Style
({
fill
:
new
Fill
({
color
:
"rgba(154, 218, 252, 0)"
,
}),
stroke
:
new
Stroke
({
color
:
"#055FE7"
,
width
:
3
,
}),
});
return
rstyle
;
},
});
selectedPointLayer
=
new
VectorLayer
({
source
:
new
VectorSource
(),
style
:
function
(
feature
)
{
const
pstyle
=
[
new
Style
({
text
:
new
Text
({
font
:
"14px HarmonyOS_Sans_SC-Bold, HarmonyOS_Sans_SC"
,
fill
:
new
Fill
({
color
:
"#333333"
,
}),
offsetY
:
-
35
,
textAlign
:
"center"
,
text
:
feature
.
get
(
"totalCount"
)
||
""
,
}),
image
:
new
Icon
({
scale
:
0.5
,
anchor
:
[
0.5
,
120
],
anchorXUnits
:
"fraction"
,
anchorYUnits
:
"pixels"
,
src
:
markers
,
}),
}),
new
Style
({
text
:
new
Text
({
font
:
"14px HarmonyOS_Sans_SC"
,
fill
:
new
Fill
({
color
:
"rgba(51, 51, 51, 1)"
,
}),
backgroundFill
:
new
Fill
({
color
:
"rgba(255, 255, 255, 1)"
,
}),
textAlign
:
"center"
,
padding
:
[
3
,
1
,
0
,
3
],
text
:
feature
.
get
(
"MC"
),
}),
}),
];
return
pstyle
;
},
});
const
map
=
new
Map
({
layers
:
[
layer
,
selectedRegionLayer
,
pointLayer
,
selectedPointLayer
],
controls
:
[],
target
:
this
.
id
,
view
:
new
View
({
projection
:
"EPSG:4326"
,
}),
});
const
ext
=
vectorSource
.
getExtent
();
map
.
getView
().
fit
(
ext
);
// 地图鼠标移动事件
map
.
on
(
"click"
,
function
(
evt
)
{
const
pixel
=
map
.
getEventPixel
(
evt
.
originalEvent
);
const
features
=
map
.
getFeaturesAtPixel
(
pixel
);
// 原更改样式选中
// 鼠标移出清空则打开
// if (features.length
<=
0
&&
self
.
selectedFeature
)
{
// selectedPointLayer.getSource().clear();
// self.selectedFeature = null;
// self.tableDateDs = [];
// }
for
(
let
i
=
0
;
i
<
features
.
length
;
i
++
)
{
const
fea
=
features
[
i
];
if
(
self
.
selectedFeature
&&
fea
.
get
(
"CODE_LEV"
)
===
self
.
selectedFeature
.
get
(
"CODE_LEV"
)
)
{
return
;
}
if
(
layer
.
getSource
().
hasFeature
(
fea
))
{
if
(
features
&&
features
.
length
>
0
)
{
self
.
selectedFeature
=
fea
.
clone
();
selectedRegionLayer
.
getSource
().
clear
();
selectedPointLayer
.
getSource
().
clear
();
selectedRegionLayer
.
getSource
().
addFeature
(
self
.
selectedFeature
);
// 找到对应的点
const
pFea
=
self
.
pointFeatures
.
filter
(
(
item
)
=>
item
.
get
(
"CODE_LEV"
)
===
fea
.
get
(
"CODE_LEV"
)
)[
0
];
if
(
pFea
)
{
selectedPointLayer
.
getSource
().
addFeature
(
pFea
);
console
.
log
(
"dian"
,
pFea
);
}
const
dsCode
=
fea
.
get
(
"CODE_LEV"
);
self
.
dsdw
=
fea
.
get
(
"MC"
);
self
.
dishiCode
=
fea
.
get
(
"CODE_LEV"
);
if
(
dsCode
)
{
self
.
loadDishiData
(
dsCode
);
}
}
}
}
});
},
// 手动选中某个区域
selectFeature
(
id
)
{
if
(
!
id
)
{
id
=
this
.
dishiCode
;
}
const
pFea
=
this
.
pointFeatures
.
filter
(
(
fea
)
=>
fea
.
get
(
"CODE_LEV"
)
===
id
)[
0
];
const
rFea
=
this
.
regionFeatures
.
filter
(
(
fea
)
=>
fea
.
get
(
"CODE_LEV"
)
===
id
)[
0
];
if
(
pFea
&&
rFea
)
{
this
.
selectedFeature
=
rFea
.
clone
();
selectedRegionLayer
.
getSource
().
clear
();
selectedPointLayer
.
getSource
().
clear
();
selectedRegionLayer
.
getSource
().
addFeature
(
this
.
selectedFeature
);
selectedPointLayer
.
getSource
().
addFeature
(
pFea
.
clone
());
this
.
loadDishiData
(
this
.
dishiCode
);
}
},
getFeatureColor
(
num
=
0
)
{
const
curnum
=
Number
(
num
);
if
(
curnum
>
0.7
)
{
return
this
.
colorArr
[
2
];
}
else
if
(
curnum
>
0.3
)
{
return
this
.
colorArr
[
1
];
}
else
{
return
this
.
colorArr
[
0
];
}
},
loadShengtingData
()
{
const
self
=
this
;
this
.
$axios
({
method
:
"get"
,
url
:
"api/queryCount/provinceMsg/"
+
self
.
shengtingCode
,
loading
:
false
,
}).
then
((
response
)
=>
{
if
(
response
.
data
.
code
===
0
)
{
console
.
log
(
response
.
data
.
detail
.
queryCounts
);
self
.
tableDateSt
=
response
.
data
.
detail
.
queryCounts
;
self
.
numTotal
=
response
.
data
.
detail
.
sysCountTotal
;
self
.
numTotalSt
=
response
.
data
.
detail
.
countTotal
;
self
.
numGaoSt
=
response
.
data
.
detail
.
highLevTotal
;
self
.
numTotalStUsed
=
response
.
data
.
detail
.
usedCount
;
self
.
numGaoStUsed
=
response
.
data
.
detail
.
highLevUsedCount
;
}
else
{
this
.
$message
.
error
(
response
.
data
.
message
);
}
});
},
loadDishiData
(
code
)
{
if
(
!
code
)
{
code
=
this
.
dishiCode
;
}
if
(
!
code
)
{
return
;
}
const
self
=
this
;
this
.
$axios
({
method
:
"get"
,
url
:
"api/queryCount/cityMsg/"
+
code
,
loading
:
false
,
}).
then
((
response
)
=>
{
if
(
response
.
data
.
code
===
0
)
{
self
.
tableDateDs
=
[];
self
.
tableDateDs
=
response
.
data
.
detail
.
queryCounts
;
self
.
numTotalDs
=
response
.
data
.
detail
.
countTotal
;
self
.
numGaoDs
=
response
.
data
.
detail
.
highLevTotal
;
self
.
numTotalDsUsed
=
response
.
data
.
detail
.
usedCount
;
self
.
numGaoDsUsed
=
response
.
data
.
detail
.
highLevUsedCount
;
}
else
{
this
.
$message
.
error
(
response
.
data
.
message
);
}
});
},
getMapPageData
()
{
const
self
=
this
;
this
.
$axios
({
method
:
"get"
,
url
:
"/api/queryCount/getPercentage"
,
loading
:
false
,
headers
:
{
QueryCount
:
"QueryCount"
,
},
}).
then
((
response
)
=>
{
if
(
response
.
data
.
code
===
0
)
{
console
.
log
(
response
.
data
.
detail
);
self
.
pointFeatures
.
forEach
((
fea
)
=>
{
const
code
=
fea
.
get
(
"CODE_LEV"
);
const
totalCount
=
response
.
data
.
detail
.
filter
((
item
)
=>
item
.
dwCode
===
code
)[
0
]
.
totalCount
||
0
;
fea
.
set
(
"totalCount"
,
totalCount
.
toString
());
});
// 更新feature 属性
self
.
regionFeatures
.
forEach
((
fea
)
=>
{
const
code
=
fea
.
get
(
"CODE_LEV"
);
const
percentage
=
response
.
data
.
detail
.
filter
((
item
)
=>
item
.
dwCode
===
code
)[
0
]
.
percentage
||
""
;
fea
.
set
(
"percentage"
,
percentage
);
});
}
else
{
self
.
$message
.
error
(
response
.
data
.
message
);
}
self
.
selectFeature
();
});
},
totalNumChanged
(
val
)
{
console
.
log
(
"限制输入数字外的其他类型"
);
if
(
val
&&
!
Number
(
val
))
{
this
.
numTotal
=
this
.
numTotal
.
replace
(
/
[^
0-9
]
/gi
,
""
);
}
},
// 一键分配按钮点击
autoDistribute
()
{
const
self
=
this
;
this
.
$axios
({
method
:
"post"
,
url
:
"/api/queryCount/autoAssignment"
,
params
:
{
totalCount
:
self
.
numTotal
,
areaCount
:
self
.
regionFeatures
.
length
+
1
,
},
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
self
.
$message
.
success
(
"一键分配成功"
);
}
else
if
(
res
.
data
.
code
===
201
)
{
self
.
$message
.
error
(
"一键分配失败,请核查输入总数"
);
}
else
{
self
.
$message
.
error
(
"一键分配失败,请重试"
);
}
// 更改页面数据(重新加载页面)
self
.
getMapPageData
();
self
.
loadShengtingData
();
self
.
loadDishiData
();
});
},
// 省厅用户修改
changeStPeo
(
a
,
b
,
c
)
{
console
.
log
(
a
,
b
,
c
);
},
// 修改省厅发查询总数
changeStTotalNum
(
val
)
{
this
.
changeTotalNumber
(
this
.
shengtingCode
,
0
,
val
,
function
(
res
)
{
console
.
log
(
"修改省厅总数成功"
);
});
},
// 修改省厅高优先级总数
changeStGaoNum
(
val
)
{
const
self
=
this
;
this
.
changeTotalNumber
(
this
.
shengtingCode
,
1
,
val
,
function
(
res
)
{
self
.
loadShengtingData
();
// 修改省/地市发查询总数后,分配后的总数平均分配给该地市下的用户20220118
self
.
loadDishiData
();
self
.
getMapPageData
();
});
},
// 修改地市发查询总数
changeDsTotalNum
(
val
)
{
const
self
=
this
;
this
.
changeTotalNumber
(
this
.
dishiCode
,
0
,
val
,
function
(
res
)
{
self
.
loadDishiData
();
self
.
getMapPageData
();
});
},
// 修改地市高优先级总数
changeDsGaoNum
(
val
)
{
this
.
changeTotalNumber
(
this
.
dishiCode
,
1
,
val
,
function
(
res
)
{
console
.
log
(
"修改省厅高优先级成功"
);
});
},
// 修改地区省/区厅发查询总数、高优先级数
// 0:修改总数 1:修改高优先级
changeTotalNumber
(
id
,
type
,
num
,
fn
)
{
const
self
=
this
;
this
.
$axios
({
method
:
"put"
,
headers
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
url
:
"/api/queryCount/updateAreaQueryCount"
,
data
:
qs
.
stringify
({
dwCode
:
id
,
flag
:
type
,
num
:
num
,
}),
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
if
(
fn
)
{
fn
(
res
.
data
);
}
self
.
$message
.
success
(
"修改成功"
);
}
else
{
self
.
$message
.
error
(
"分配失败,请核查输入数值"
);
}
});
},
// 修改用户发查询总数、高优先级数
// 0:修改总数 1:修改高优先级
changeYonghuTotalNumber
(
id
,
type
,
num
,
isSt
,
fn
)
{
const
self
=
this
;
this
.
$axios
({
method
:
"put"
,
headers
:
{
"Content-Type"
:
"application/x-www-form-urlencoded"
,
},
url
:
"/api/queryCount/updateUserQueryCount"
,
data
:
qs
.
stringify
({
userId
:
id
,
flag
:
type
,
num
:
num
,
}),
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
!==
0
)
{
self
.
$message
.
error
(
"分配失败,请核查输入数值"
);
}
else
{
self
.
$message
.
success
(
"修改成功"
);
}
if
(
fn
)
{
fn
(
res
.
data
.
code
===
0
);
}
if
(
isSt
)
{
self
.
loadShengtingData
();
}
else
{
self
.
loadDishiData
();
}
});
},
countTime
()
{
const
justnow
=
new
Date
();
// 3是循环时间
justnow
.
getHours
()
===
0
&&
justnow
.
getMinutes
()
-
3
<
0
&&
this
.
reloadUsedData
();
},
reloadUsedData
()
{
this
.
$axios
({
method
:
"get"
,
url
:
"/api/queryCount/flashUsedCount"
,
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
self
.
$message
.
info
(
"已为您刷新当日最新数据"
);
// 更改页面数据(重新加载页面)
self
.
getMapPageData
();
self
.
loadShengtingData
();
self
.
loadDishiData
();
}
});
},
},
mounted
()
{
this
.
initMap
();
this
.
loadShengtingData
();
// 添加定时任务,更新地图数据
const
intervalTime
=
3
*
60
*
1000
;
//3分钟
this
.
getMapPageData
();
const
self
=
this
;
setTimeout
(()
=>
{
//默认选中拉萨
self
.
selectFeature
();
},
1000
);
this
.
intervalNum
=
window
.
setInterval
(
function
()
{
// 掉接口更新地图,并添加参数(header),不干扰登陆状态
self
.
getMapPageData
();
// 判断当前时间跨天则重新请求数据
self
.
countTime
();
},
intervalTime
);
},
destroyed
()
{
window
.
clearInterval
(
this
.
intervalNum
);
},
};
name
:
'QueryPermission'
,
components
:
{
editableLable
,
numberInput
},
data
()
{
return
{
stDataObj
:
{},
dsDataObj
:
{},
dsdw
:
'拉萨市'
,
tableDateDs
:
[],
tableDateSt
:
[],
isAutoDistribute
:
true
,
id
:
'olGeojsonMap'
,
heightWindow
:
window
.
innerHeight
-
0
+
'px'
,
selectedFeature
:
null
,
colorArr
:
[
'rgba(154, 218, 252, 0.64)'
,
'rgba(130, 199, 253, 1)'
,
'rgba(10, 200, 153, 1)'
,
],
numTotal
:
0
,
numTotalSt
:
0
,
numTotalStUsed
:
0
,
numGaoSt
:
0
,
numGaoStUsed
:
0
,
numTotalDs
:
0
,
numTotalDsUsed
:
0
,
numGaoDs
:
0
,
numGaoDsUsed
:
0
,
intervalNum
:
0
,
regionFeatures
:
[],
pointFeatures
:
[],
shengtingCode
:
'540000000000'
,
dishiCode
:
'540100000000'
,
}
},
methods
:
{
tableRowClassName
({
row
,
column
,
rowIndex
,
columnIndex
})
{
logger
.
info
(
'row'
,
row
)
logger
.
info
(
'column'
,
column
)
logger
.
info
(
'rowIndex'
,
rowIndex
)
logger
.
info
(
'columnIndex'
,
columnIndex
)
console
.
log
(
columnIndex
)
if
(
columnIndex
===
2
)
{
return
'redTableHeader'
}
else
{
return
'commonTableHeader'
}
},
initMap
()
{
const
self
=
this
// 地图地址
const
features
=
new
GeoJSON
().
readFeatures
(
dataR
)
this
.
regionFeatures
=
features
const
featuresP
=
new
GeoJSON
().
readFeatures
(
dataP
)
this
.
pointFeatures
=
featuresP
const
vectorSource
=
new
VectorSource
({
features
:
features
,
})
const
pointLayer
=
new
VectorLayer
({
source
:
new
VectorSource
({
features
:
featuresP
,
}),
style
:
function
(
feature
)
{
const
style
=
[
new
Style
({
text
:
new
Text
({
font
:
'14px HarmonyOS_Sans_SC-Bold, HarmonyOS_Sans_SC'
,
fill
:
new
Fill
({
color
:
'rgba(255, 255, 255, 1)'
,
}),
offsetY
:
-
35
,
textAlign
:
'center'
,
text
:
feature
.
get
(
'totalCount'
)
||
''
,
}),
image
:
new
Icon
({
anchor
:
[
0.5
,
120
],
scale
:
0.5
,
anchorXUnits
:
'fraction'
,
anchorYUnits
:
'pixels'
,
src
:
marker
,
}),
}),
new
Style
({
text
:
new
Text
({
font
:
'14px HarmonyOS_Sans_SC'
,
fill
:
new
Fill
({
color
:
'rgba(255, 255, 255, 1)'
,
}),
backgroundFill
:
new
Fill
({
color
:
'rgba(0, 0, 0, 0.6) '
,
}),
backgroundStroke
:
new
Stroke
({
color
:
'rgba(255, 255, 255, 1)'
,
width
:
1
,
}),
textAlign
:
'center'
,
padding
:
[
3
,
1
,
0
,
3
],
text
:
feature
.
get
(
'MC'
),
}),
}),
]
return
style
},
})
const
layer
=
new
VectorLayer
({
source
:
vectorSource
,
style
:
function
(
feature
)
{
const
style
=
new
Style
({
fill
:
new
Fill
({
color
:
self
.
getFeatureColor
(
feature
.
get
(
'percentage'
)),
}),
stroke
:
new
Stroke
({
color
:
'#fff'
,
width
:
2
,
}),
})
return
style
},
})
selectedRegionLayer
=
new
VectorLayer
({
source
:
new
VectorSource
(),
style
:
function
(
feature
)
{
const
rstyle
=
new
Style
({
fill
:
new
Fill
({
color
:
'rgba(154, 218, 252, 0)'
,
}),
stroke
:
new
Stroke
({
color
:
'#055FE7'
,
width
:
3
,
}),
})
return
rstyle
},
})
selectedPointLayer
=
new
VectorLayer
({
source
:
new
VectorSource
(),
style
:
function
(
feature
)
{
const
pstyle
=
[
new
Style
({
text
:
new
Text
({
font
:
'14px HarmonyOS_Sans_SC-Bold, HarmonyOS_Sans_SC'
,
fill
:
new
Fill
({
color
:
'#333333'
,
}),
offsetY
:
-
35
,
textAlign
:
'center'
,
text
:
feature
.
get
(
'totalCount'
)
||
''
,
}),
image
:
new
Icon
({
scale
:
0.5
,
anchor
:
[
0.5
,
120
],
anchorXUnits
:
'fraction'
,
anchorYUnits
:
'pixels'
,
src
:
markers
,
}),
}),
new
Style
({
text
:
new
Text
({
font
:
'14px HarmonyOS_Sans_SC'
,
fill
:
new
Fill
({
color
:
'rgba(51, 51, 51, 1)'
,
}),
backgroundFill
:
new
Fill
({
color
:
'rgba(255, 255, 255, 1)'
,
}),
textAlign
:
'center'
,
padding
:
[
3
,
1
,
0
,
3
],
text
:
feature
.
get
(
'MC'
),
}),
}),
]
return
pstyle
},
})
const
map
=
new
Map
({
layers
:
[
layer
,
selectedRegionLayer
,
pointLayer
,
selectedPointLayer
],
controls
:
[],
target
:
this
.
id
,
view
:
new
View
({
projection
:
'EPSG:4326'
,
}),
})
const
ext
=
vectorSource
.
getExtent
()
map
.
getView
().
fit
(
ext
)
// 地图鼠标移动事件
map
.
on
(
'click'
,
function
(
evt
)
{
const
pixel
=
map
.
getEventPixel
(
evt
.
originalEvent
)
const
features
=
map
.
getFeaturesAtPixel
(
pixel
)
// 原更改样式选中
// 鼠标移出清空则打开
// if (features.length
<=
0
&&
self
.
selectedFeature
)
{
// selectedPointLayer.getSource().clear();
// self.selectedFeature = null;
// self.tableDateDs = [];
// }
for
(
let
i
=
0
;
i
<
features
.
length
;
i
++
)
{
const
fea
=
features
[
i
]
if
(
self
.
selectedFeature
&&
fea
.
get
(
'CODE_LEV'
)
===
self
.
selectedFeature
.
get
(
'CODE_LEV'
)
)
{
return
}
if
(
layer
.
getSource
().
hasFeature
(
fea
))
{
if
(
features
&&
features
.
length
>
0
)
{
self
.
selectedFeature
=
fea
.
clone
()
selectedRegionLayer
.
getSource
().
clear
()
selectedPointLayer
.
getSource
().
clear
()
selectedRegionLayer
.
getSource
().
addFeature
(
self
.
selectedFeature
)
// 找到对应的点
const
pFea
=
self
.
pointFeatures
.
filter
(
(
item
)
=>
item
.
get
(
'CODE_LEV'
)
===
fea
.
get
(
'CODE_LEV'
)
)[
0
]
if
(
pFea
)
{
selectedPointLayer
.
getSource
().
addFeature
(
pFea
)
console
.
log
(
'dian'
,
pFea
)
}
const
dsCode
=
fea
.
get
(
'CODE_LEV'
)
self
.
dsdw
=
fea
.
get
(
'MC'
)
self
.
dishiCode
=
fea
.
get
(
'CODE_LEV'
)
if
(
dsCode
)
{
self
.
loadDishiData
(
dsCode
)
}
}
}
}
})
},
// 手动选中某个区域
selectFeature
(
id
)
{
if
(
!
id
)
{
id
=
this
.
dishiCode
}
const
pFea
=
this
.
pointFeatures
.
filter
(
(
fea
)
=>
fea
.
get
(
'CODE_LEV'
)
===
id
)[
0
]
const
rFea
=
this
.
regionFeatures
.
filter
(
(
fea
)
=>
fea
.
get
(
'CODE_LEV'
)
===
id
)[
0
]
if
(
pFea
&&
rFea
)
{
this
.
selectedFeature
=
rFea
.
clone
()
selectedRegionLayer
.
getSource
().
clear
()
selectedPointLayer
.
getSource
().
clear
()
selectedRegionLayer
.
getSource
().
addFeature
(
this
.
selectedFeature
)
selectedPointLayer
.
getSource
().
addFeature
(
pFea
.
clone
())
this
.
loadDishiData
(
this
.
dishiCode
)
}
},
getFeatureColor
(
num
=
0
)
{
const
curnum
=
Number
(
num
)
if
(
curnum
>
0.7
)
{
return
this
.
colorArr
[
2
]
}
else
if
(
curnum
>
0.3
)
{
return
this
.
colorArr
[
1
]
}
else
{
return
this
.
colorArr
[
0
]
}
},
loadShengtingData
()
{
const
self
=
this
this
.
$axios
({
method
:
'get'
,
url
:
'api/queryCount/provinceMsg/'
+
self
.
shengtingCode
,
loading
:
false
,
}).
then
((
response
)
=>
{
if
(
response
.
data
.
code
===
0
)
{
console
.
log
(
response
.
data
.
detail
.
queryCounts
)
self
.
tableDateSt
=
response
.
data
.
detail
.
queryCounts
self
.
numTotal
=
response
.
data
.
detail
.
sysCountTotal
self
.
numTotalSt
=
response
.
data
.
detail
.
countTotal
self
.
numGaoSt
=
response
.
data
.
detail
.
highLevTotal
self
.
numTotalStUsed
=
response
.
data
.
detail
.
usedCount
self
.
numGaoStUsed
=
response
.
data
.
detail
.
highLevUsedCount
}
else
{
this
.
$message
.
error
(
response
.
data
.
message
)
}
})
},
loadDishiData
(
code
)
{
if
(
!
code
)
{
code
=
this
.
dishiCode
}
if
(
!
code
)
{
return
}
const
self
=
this
this
.
$axios
({
method
:
'get'
,
url
:
'api/queryCount/cityMsg/'
+
code
,
loading
:
false
,
}).
then
((
response
)
=>
{
if
(
response
.
data
.
code
===
0
)
{
self
.
tableDateDs
=
[]
self
.
tableDateDs
=
response
.
data
.
detail
.
queryCounts
self
.
numTotalDs
=
response
.
data
.
detail
.
countTotal
self
.
numGaoDs
=
response
.
data
.
detail
.
highLevTotal
self
.
numTotalDsUsed
=
response
.
data
.
detail
.
usedCount
self
.
numGaoDsUsed
=
response
.
data
.
detail
.
highLevUsedCount
}
else
{
this
.
$message
.
error
(
response
.
data
.
message
)
}
})
},
getMapPageData
()
{
const
self
=
this
this
.
$axios
({
method
:
'get'
,
url
:
'/api/queryCount/getPercentage'
,
loading
:
false
,
headers
:
{
QueryCount
:
'QueryCount'
,
},
}).
then
((
response
)
=>
{
if
(
response
.
data
.
code
===
0
)
{
console
.
log
(
response
.
data
.
detail
)
self
.
pointFeatures
.
forEach
((
fea
)
=>
{
const
code
=
fea
.
get
(
'CODE_LEV'
)
const
totalCount
=
response
.
data
.
detail
.
filter
((
item
)
=>
item
.
dwCode
===
code
)[
0
]
.
totalCount
||
0
fea
.
set
(
'totalCount'
,
totalCount
.
toString
())
})
// 更新feature 属性
self
.
regionFeatures
.
forEach
((
fea
)
=>
{
const
code
=
fea
.
get
(
'CODE_LEV'
)
const
percentage
=
response
.
data
.
detail
.
filter
((
item
)
=>
item
.
dwCode
===
code
)[
0
]
.
percentage
||
''
fea
.
set
(
'percentage'
,
percentage
)
})
}
else
{
self
.
$message
.
error
(
response
.
data
.
message
)
}
self
.
selectFeature
()
})
},
totalNumChanged
(
val
)
{
console
.
log
(
'限制输入数字外的其他类型'
)
if
(
val
&&
!
Number
(
val
))
{
this
.
numTotal
=
this
.
numTotal
.
replace
(
/
[^
0-9
]
/gi
,
''
)
}
},
// 一键分配按钮点击
autoDistribute
()
{
const
self
=
this
this
.
$axios
({
method
:
'post'
,
url
:
'/api/queryCount/autoAssignment'
,
params
:
{
totalCount
:
self
.
numTotal
,
areaCount
:
self
.
regionFeatures
.
length
+
1
,
},
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
self
.
$message
.
success
(
'一键分配成功'
)
}
else
if
(
res
.
data
.
code
===
201
)
{
self
.
$message
.
error
(
'一键分配失败,请核查输入总数'
)
}
else
{
self
.
$message
.
error
(
'一键分配失败,请重试'
)
}
// 更改页面数据(重新加载页面)
self
.
getMapPageData
()
self
.
loadShengtingData
()
self
.
loadDishiData
()
})
},
// 省厅用户修改
changeStPeo
(
a
,
b
,
c
)
{
console
.
log
(
a
,
b
,
c
)
},
// 修改省厅发查询总数
changeStTotalNum
(
val
)
{
this
.
changeTotalNumber
(
this
.
shengtingCode
,
0
,
val
,
function
(
res
)
{
console
.
log
(
'修改省厅总数成功'
)
})
},
// 修改省厅高优先级总数
changeStGaoNum
(
val
)
{
const
self
=
this
this
.
changeTotalNumber
(
this
.
shengtingCode
,
1
,
val
,
function
(
res
)
{
self
.
loadShengtingData
()
// 修改省/地市发查询总数后,分配后的总数平均分配给该地市下的用户20220118
self
.
loadDishiData
()
self
.
getMapPageData
()
})
},
// 修改地市发查询总数
changeDsTotalNum
(
val
)
{
const
self
=
this
this
.
changeTotalNumber
(
this
.
dishiCode
,
0
,
val
,
function
(
res
)
{
self
.
loadDishiData
()
self
.
getMapPageData
()
})
},
// 修改地市高优先级总数
changeDsGaoNum
(
val
)
{
this
.
changeTotalNumber
(
this
.
dishiCode
,
1
,
val
,
function
(
res
)
{
console
.
log
(
'修改省厅高优先级成功'
)
})
},
// 修改地区省/区厅发查询总数、高优先级数
// 0:修改总数 1:修改高优先级
changeTotalNumber
(
id
,
type
,
num
,
fn
)
{
const
self
=
this
this
.
$axios
({
method
:
'put'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
url
:
'/api/queryCount/updateAreaQueryCount'
,
data
:
qs
.
stringify
({
dwCode
:
id
,
flag
:
type
,
num
:
num
,
}),
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
if
(
fn
)
{
fn
(
res
.
data
)
}
self
.
$message
.
success
(
'修改成功'
)
}
else
{
self
.
$message
.
error
(
'分配失败,请核查输入数值'
)
}
})
},
// 修改用户发查询总数、高优先级数
// 0:修改总数 1:修改高优先级
changeYonghuTotalNumber
(
id
,
type
,
num
,
isSt
,
fn
)
{
const
self
=
this
this
.
$axios
({
method
:
'put'
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
},
url
:
'/api/queryCount/updateUserQueryCount'
,
data
:
qs
.
stringify
({
userId
:
id
,
flag
:
type
,
num
:
num
,
}),
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
!==
0
)
{
self
.
$message
.
error
(
'分配失败,请核查输入数值'
)
}
else
{
self
.
$message
.
success
(
'修改成功'
)
}
if
(
fn
)
{
fn
(
res
.
data
.
code
===
0
)
}
if
(
isSt
)
{
self
.
loadShengtingData
()
}
else
{
self
.
loadDishiData
()
}
})
},
countTime
()
{
const
justnow
=
new
Date
()
// 3是循环时间
justnow
.
getHours
()
===
0
&&
justnow
.
getMinutes
()
-
3
<
0
&&
this
.
reloadUsedData
()
},
reloadUsedData
()
{
this
.
$axios
({
method
:
'get'
,
url
:
'/api/queryCount/flashUsedCount'
,
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
===
0
)
{
self
.
$message
.
info
(
'已为您刷新当日最新数据'
)
// 更改页面数据(重新加载页面)
self
.
getMapPageData
()
self
.
loadShengtingData
()
self
.
loadDishiData
()
}
})
},
},
mounted
()
{
this
.
initMap
()
this
.
loadShengtingData
()
// 添加定时任务,更新地图数据
const
intervalTime
=
3
*
60
*
1000
//3分钟
this
.
getMapPageData
()
const
self
=
this
setTimeout
(()
=>
{
//默认选中拉萨
self
.
selectFeature
()
},
1000
)
this
.
intervalNum
=
window
.
setInterval
(
function
()
{
// 掉接口更新地图,并添加参数(header),不干扰登陆状态
self
.
getMapPageData
()
// 判断当前时间跨天则重新请求数据
self
.
countTime
()
},
intervalTime
)
},
destroyed
()
{
window
.
clearInterval
(
this
.
intervalNum
)
},
}
</
script
>
<
style
lang=
"scss"
>
.commonTableHeader
{
font-size
:
14px
!important
;
font-family
:
MicrosoftYaHei
!important
;
color
:
#333333
!important
;
}
.redTableHeader
{
font-size
:
14px
!important
;
font-family
:
MicrosoftYaHei
!important
;
color
:
#E60012
!important
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
/
deep
/
.el-checkbox__input.is-checked
+
.el-checkbox__label
{
color
:
#2e3846
;
}
/
deep
/
.el-checkbox__input.is-checked
.el-checkbox__inner
{
background-color
:
#005ef7
;
border-color
:
#005ef7
;
}
.maps
{
&
.map
{
width
:
55rem
;
height
:
50rem
;
background
:
#ffffff
;
border-radius
:
8px
;
border
:
1px
solid
#d1d1d1
;
margin
:
24px
;
display
:
inline-block
;
}
&
.mapTitle
{
position
:
absolute
;
width
:
143px
;
height
:
39px
;
left
:
calc
(
30%
-
4.46875rem
);
top
:
7.125rem
;
background
:
url("~@/assets/img/fcxqx/mapTitle.png")
100%
100%
/
cover
;
}
&
.mapLegend
{
position
:
absolute
;
left
:
65px
;
bottom
:
150px
;
&
>
div
{
display
:
flex
;
margin-bottom
:
2px
;
&
div
{
display
:
inline-block
;
font-size
:
14px
;
font-family
:
HarmonyOS_Sans_SC
;
color
:
#333333
;
height
:
24px
;
line-height
:
24px
;
&.persent
{
color
:
#d1d1d1
;
}
}
}
&
.legendBlk
{
width
:
14px
;
height
:
24px
;
display
:
inline-block
;
margin-right
:
16px
;
&.less
{
background
:
#bfe8fd
;
}
&
.middle
{
background
:
#82c7fd
;
}
&
.many
{
background
:
#0ac899
;
}
}
}
}
.querypermission
{
display
:
flex
;
}
.tables
{
flex
:
1
;
margin
:
24px
24px
0
0
;
&
.buleBlk
{
width
:
4px
;
height
:
16px
;
margin-top
:
0.2rem
;
margin-right
:
10px
;
}
}
.firstLine
.el-input
/
deep
/
{
.el-input__inner
{
width
:
4.5rem
;
padding
:
3px
;
height
:
32px
;
box-shadow
:
0px
1px
3px
0px
rgba
(
5
,
95
,
231
,
0.5
)
inset
;
border-radius
:
4px
;
border-color
:
#fff
;
font-size
:
20px
;
font-family
:
HarmonyOS_Sans_SC-Bold
,
HarmonyOS_Sans_SC
;
font-weight
:
bold
;
color
:
#055fe7
;
line-height
:
26px
;
}
}
.firstLine
{
display
:
flex
;
height
:
50px
;
align-items
:
center
;
padding-bottom
:
20px
;
&
.el-input
{
width
:
80px
;
}
&
.el-checkbox
{
margin-left
:
97px
;
}
&
.el-checkbox__label
/
deep
/
{
font-size
:
14px
;
font-family
:
HarmonyOS_Sans_SC
;
color
:
#2e3846
;
line-height
:
19px
;
}
&
.txt
{
font-size
:
16px
;
font-family
:
HarmonyOS_Sans_SC-Bold
,
HarmonyOS_Sans_SC
;
font-weight
:
bold
;
color
:
#2e3846
;
line-height
:
21px
;
}
&
button
{
width
:
96px
;
height
:
32px
;
background
:
#055fe7
;
border-radius
:
4px
;
outline
:
none
;
border
:
0px
;
font-size
:
14px
;
font-family
:
HarmonyOS_Sans_SC
;
color
:
#ffffff
;
line-height
:
22px
;
position
:
absolute
;
right
:
24px
;
}
}
.stTongji
{
background
:
linear-gradient
(
270deg
,
#f4f9ff
0%
,
#e5f0ff
100%
);
border-radius
:
4px
;
height
:
50px
;
display
:
flex
;
align-items
:
center
;
padding
:
13px
;
&
div
{
display
:
inline-block
;
}
}
.dsTongjiBlk
{
&
label
{
line-height
:
50px
;
}
&
.dsTongji
{
height
:
50px
;
display
:
flex
;
align-items
:
center
;
padding
:
13px
;
background
:
linear-gradient
(
270deg
,
#fff7f7
0%
,
#ffefee
100%
);
border-radius
:
4px
;
&
div
{
display
:
inline-block
;
}
}
}
.awayLeft
{
margin-left
:
39px
;
}
.labelBack
{
height
:
8px
;
opacity
:
0.25
;
position
:
absolute
;
margin-top
:
13px
;
&.blue
{
width
:
9rem
;
background
:
#006aff
;
}
&
.pink
{
width
:
7.5rem
;
background
:
#ff3400
;
}
}
.f-primary-button
{
cursor
:
pointer
;
background
:
#055fe7
!important
;
&:hover
{
background
:
#377fec
!important
;
}
&
:active
{
background
:
#044cb9
!important
;
}
}
/
deep
/
.el-input-number.is-controls-right
.el-input__inner
{
padding-left
:
30px
;
}
//
@import
"@/assets/css/globalBase.scss"
;
/
deep
/
.el-input-number.is-controls-right
.el-input-number__decrease
,
/
deep
/
.el-input-number.is-controls-right
.el-input-number__increase
{
background
:
transparent
;
}
/
deep
/
.el-table
th
{
background
:
linear-gradient
(
180deg
,
#FBFCFD
0%
,
#F6F8FA
100%
);
}
/
deep
/
.el-table
td
>
.cell
{
margin-left
:
20px
;
}
</
style
>
<
style
lang=
"scss"
scoped
>
/
deep
/
.el-checkbox__input.is-checked
+
.el-checkbox__label
{
color
:
#2e3846
;
}
/
deep
/
.el-checkbox__input.is-checked
.el-checkbox__inner
{
background-color
:
#005ef7
;
border-color
:
#005ef7
;
}
.maps
{
&
.map
{
width
:
55rem
;
height
:
50rem
;
background
:
#ffffff
;
border-radius
:
8px
;
border
:
1px
solid
#d1d1d1
;
margin
:
24px
;
display
:
inline-block
;
}
&
.mapTitle
{
position
:
absolute
;
width
:
143px
;
height
:
39px
;
left
:
calc
(
30%
-
4.46875rem
);
top
:
7.125rem
;
background
:
url("~@/assets/img/fcxqx/mapTitle.png")
100%
100%
/
cover
;
}
&
.mapLegend
{
position
:
absolute
;
left
:
65px
;
bottom
:
150px
;
&
>
div
{
display
:
flex
;
margin-bottom
:
2px
;
&
div
{
display
:
inline-block
;
font-size
:
14px
;
font-family
:
HarmonyOS_Sans_SC
;
color
:
#333333
;
height
:
24px
;
line-height
:
24px
;
&.persent
{
color
:
#d1d1d1
;
}
}
}
&
.legendBlk
{
width
:
14px
;
height
:
24px
;
display
:
inline-block
;
margin-right
:
16px
;
&.less
{
background
:
#bfe8fd
;
}
&
.middle
{
background
:
#82c7fd
;
}
&
.many
{
background
:
#0ac899
;
}
}
}
}
.querypermission
{
display
:
flex
;
}
.tables
{
flex
:
1
;
margin
:
24px
24px
0
0
;
&
.buleBlk
{
width
:
4px
;
height
:
16px
;
margin-top
:
0.2rem
;
margin-right
:
10px
;
}
}
.firstLine
.el-input
/
deep
/
{
.el-input__inner
{
width
:
4.5rem
;
padding
:
3px
;
height
:
32px
;
box-shadow
:
0px
1px
3px
0px
rgba
(
5
,
95
,
231
,
0.5
)
inset
;
border-radius
:
4px
;
border-color
:
#fff
;
font-size
:
20px
;
font-family
:
HarmonyOS_Sans_SC-Bold
,
HarmonyOS_Sans_SC
;
font-weight
:
bold
;
color
:
#055fe7
;
line-height
:
26px
;
}
}
.firstLine
{
display
:
flex
;
height
:
50px
;
align-items
:
center
;
padding-bottom
:
20px
;
&
.el-input
{
width
:
80px
;
}
&
.label
{
height
:
19px
;
font-size
:
14px
;
font-family
:
MicrosoftYaHei
;
color
:
#333333
;
line-height
:
19px
;
}
&
.el-checkbox
{
margin-left
:
148px
;
}
&
.el-checkbox__label
/
deep
/
{
font-size
:
14px
;
font-family
:
HarmonyOS_Sans_SC
;
color
:
#2e3846
;
line-height
:
19px
;
}
&
.txt
{
font-size
:
16px
;
font-family
:
HarmonyOS_Sans_SC-Bold
,
HarmonyOS_Sans_SC
;
font-weight
:
bold
;
color
:
#2e3846
;
line-height
:
21px
;
}
&
button
{
width
:
96px
;
height
:
32px
;
background
:
#055fe7
;
border-radius
:
4px
;
outline
:
none
;
border
:
0px
;
font-size
:
14px
;
font-family
:
HarmonyOS_Sans_SC
;
color
:
#ffffff
;
line-height
:
22px
;
position
:
absolute
;
right
:
24px
;
}
}
.stTongji
{
background
:
linear-gradient
(
270deg
,
#f4f9ff
0%
,
#e5f0ff
100%
);
border-radius
:
4px
;
height
:
50px
;
display
:
flex
;
align-items
:
center
;
padding
:
13px
;
&
div
{
display
:
inline-block
;
}
.numberInput
{
margin-top
:
2px
;
}
}
.dsTongjiBlk
{
&
label
{
line-height
:
50px
;
}
&
.dsTongji
{
height
:
50px
;
display
:
flex
;
align-items
:
center
;
padding
:
13px
;
background
:
linear-gradient
(
270deg
,
#fff7f7
0%
,
#ffefee
100%
);
border-radius
:
4px
;
&
div
{
display
:
inline-block
;
}
}
}
.awayLeft
{
margin-left
:
39px
;
}
.labelBack
{
height
:
8px
;
opacity
:
0.25
;
position
:
absolute
;
margin-top
:
13px
;
&.blue
{
width
:
9rem
;
background
:
#006aff
;
}
&
.pink
{
width
:
7.5rem
;
background
:
#ff3400
;
}
}
.f-primary-button
{
cursor
:
pointer
;
background
:
#055fe7
!important
;
&:hover
{
background
:
#377fec
!important
;
}
&
:active
{
background
:
#044cb9
!important
;
}
}
/
deep
/
.el-input-number.is-controls-right
.el-input__inner
{
padding-left
:
30px
;
}
//
@import
"@/assets/css/globalBase.scss"
;
</
style
>
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