Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AmosBankView
Project
Project
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
bank
AmosBankView
Commits
ae007036
Commit
ae007036
authored
May 14, 2020
by
zhengjiangtao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页告警轮播不出来bug
parent
34675421
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
163 deletions
+84
-163
indexMap.js
src/view/bank/3dview/indexMap.js
+82
-163
index.js
src/view/region/index.js
+2
-0
No files found.
src/view/bank/3dview/indexMap.js
View file @
ae007036
...
@@ -188,105 +188,21 @@ class IndexMap extends Component {
...
@@ -188,105 +188,21 @@ class IndexMap extends Component {
* 初始化登录用户权限
* 初始化登录用户权限
*/
*/
getPermissionsCompany
=
()
=>
{
getPermissionsCompany
=
()
=>
{
//let selectedCompany = lsTool.read('selectedCompany');
//公司orgCode selectedCompanyOrg
let
depName
=
null
;
let
orgCode
=
lsTool
.
read
(
'selectedCompanyOrg'
);
let
sequenceNbr
=
null
;
//公司uuid
let
city
=
null
;
let
sequenceNbr
=
lsTool
.
read
(
'companySequenceNbr'
);
let
userCity
=
null
;
let
department
=
lsTool
.
read
(
'department'
);
if
(
department
!==
"undefined"
&&
department
!==
null
)
{
let
jsonObjDep
=
JSON
.
parse
(
department
);
depName
=
jsonObjDep
.
departmentName
;
sequenceNbr
=
this
.
getCompanyId
(
jsonObjDep
);
}
if
(
depName
!==
null
)
{
city
=
depName
&&
depName
.
indexOf
(
'西安'
)
===
0
?
'xian'
:
'xianyang'
;
userCity
=
city
;
}
else
{
//如没有部门,则西安和咸阳查看的权限都有(带班领导、二线业务员、二线技术)
city
=
'xian-xianyang'
;
userCity
=
'xian-xianyang'
;
}
if
(
sequenceNbr
===
null
)
{
sequenceNbr
=
lsTool
.
read
(
'companySequenceNbr'
);
}
let
reginCompany
=
JSON
.
parse
(
lsTool
.
read
(
'company'
));
let
reginCompany
=
JSON
.
parse
(
lsTool
.
read
(
'company'
));
let
companys
=
this
.
initCompanysData
(
reginCompany
||
[]);
this
.
setState
({
orgCode
,
//let { orgCode, sequenceNbr } = this.getOrgCode(city, companys);
sequenceNbr
,
//let { orgCode, sequenceNbr } = this.getOrgCode(jsonObjDep);
//companys,
//let orgCode = this.getOrgCode(jsonObjDep);
reginCompany
,
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
currentCard
:
1
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
});
let
orgCode
=
this
.
getSelectOrgCode
(
city
,
dicCodeList
);
// if (depName.indexOf('西安') === 0){
// this.setState({
// city,
// orgCode,
// sequenceNbr,
// companys,
// currentCard: 1,
// depName,
// userCity,
// reginCompany
// });
// } else if (depName.indexOf('咸阳') === 0) {
// this.setState({
// city,
// orgCode,
// sequenceNbr,
// companys,
// depName,
// userCity,
// reginCompany,
// currentCard: 2
// });
// }
if
(
userCity
.
indexOf
(
'xian-xianyang'
)
!==
-
1
)
{
this
.
setState
({
city
,
orgCode
,
sequenceNbr
,
companys
,
currentCard
:
1
,
depName
,
userCity
,
reginCompany
});
}
else
if
(
userCity
.
indexOf
(
'xianyang'
)
!==
-
1
)
{
this
.
setState
({
city
,
orgCode
,
sequenceNbr
,
companys
,
currentCard
:
2
,
depName
,
userCity
,
reginCompany
});
}
else
{
this
.
setState
({
city
,
orgCode
,
sequenceNbr
,
companys
,
depName
,
userCity
,
reginCompany
,
currentCard
:
1
});
}
lsTool
.
write
(
'orgCode'
,
orgCode
);
lsTool
.
write
(
'orgCode'
,
orgCode
);
console
.
log
(
'选择的公司: '
+
department
);
}
}
/**
/**
...
@@ -313,18 +229,18 @@ class IndexMap extends Component {
...
@@ -313,18 +229,18 @@ class IndexMap extends Component {
/**
/**
* 初始化数据,判断权限
* 初始化数据,判断权限
*/
*/
initCompanysData
=
(
companys
)
=>
{
//
initCompanysData = (companys) => {
if
(
companys
.
length
===
2
&&
companys
[
0
].
companyName
.
indexOf
(
'咸阳'
)
===
0
)
{
//
if (companys.length === 2 && companys[0].companyName.indexOf('咸阳') === 0) {
companys
=
companys
.
reverse
();
//
companys = companys.reverse();
}
//
}
if
(
companys
.
length
===
1
)
{
//
if (companys.length === 1) {
if
(
companys
[
0
].
companyName
.
indexOf
(
'西安'
)
===
0
)
{
//
if (companys[0].companyName.indexOf('西安') === 0) {
let
xianyangCompany
=
{
"companyOrgCode"
:
"3"
,
"companyName"
:
"咸阳备份中心"
,
"level"
:
"subsidiary"
,
"orgCode"
:
"1*3"
,
"sequenceNbr"
:
"1251083542213996546"
}
//
let xianyangCompany = { "companyOrgCode": "3", "companyName": "咸阳备份中心", "level": "subsidiary", "orgCode": "1*3", "sequenceNbr": "1251083542213996546" }
companys
.
push
(
xianyangCompany
);
//
companys.push(xianyangCompany);
}
//
}
}
//
}
return
companys
;
//
return companys;
}
//
}
/**
/**
* 查询通道信息及状态
* 查询通道信息及状态
...
@@ -444,23 +360,23 @@ class IndexMap extends Component {
...
@@ -444,23 +360,23 @@ class IndexMap extends Component {
/**
/**
* 根据传入的名称查询匹配orgCode
* 根据传入的名称查询匹配orgCode
*/
*/
getOrgCode
=
(
city
,
companys
)
=>
{
//
getOrgCode = (city, companys) => {
let
company
;
//
let company;
if
(
city
===
'xian'
)
{
//
if (city === 'xian') {
companys
.
map
(
o
=>
{
//
companys.map(o => {
if
(
o
.
companyName
.
indexOf
(
'西安'
)
===
0
)
{
//
if (o.companyName.indexOf('西安') === 0) {
company
=
o
;
//
company = o;
}
//
}
});
//
});
}
else
{
//
} else {
companys
.
map
(
o
=>
{
//
companys.map(o => {
if
(
o
.
companyName
.
indexOf
(
'咸阳'
)
===
0
)
{
//
if (o.companyName.indexOf('咸阳') === 0) {
company
=
o
;
//
company = o;
}
//
}
});
//
});
}
//
}
return
company
;
//
return company;
}
//
}
// getOrgCode = (jsonObjDep) => {
// getOrgCode = (jsonObjDep) => {
// if(jsonObjDep && jsonObjDep !==null ){
// if(jsonObjDep && jsonObjDep !==null ){
...
@@ -539,41 +455,41 @@ class IndexMap extends Component {
...
@@ -539,41 +455,41 @@ class IndexMap extends Component {
/**
/**
* 切换城市
* 切换城市
*/
*/
showCityInfo
=
(
city
,
currentCard
)
=>
{
//
showCityInfo = (city, currentCard) => {
// let { companys } = this.state;
//
// let { companys } = this.state;
let
userCity
=
this
.
state
.
userCity
;
//
let userCity = this.state.userCity;
let
company
=
this
.
state
.
reginCompany
;
//
let company = this.state.reginCompany;
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
//
let dictionaryList = lsTool.read('dictionaryList');
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
//
let dicCodeList = JSON.parse(dictionaryList);
let
orgCode
=
this
.
getSelectOrgCode
(
city
,
dicCodeList
);
//
let orgCode = this.getSelectOrgCode(city, dicCodeList);
// if((userCity ==="xian" && city ==="xian") ||(userCity ==="xianyang" && city ==="xianyang") ){
//
// if((userCity ==="xian" && city ==="xian") ||(userCity ==="xianyang" && city ==="xianyang") ){
// this.setState({
//
// this.setState({
// city,
//
// city,
// orgCode: company.orgCode,
//
// orgCode: company.orgCode,
// sequenceNbr: company.sequenceNbr,
//
// sequenceNbr: company.sequenceNbr,
// currentCard
//
// currentCard
// });
//
// });
// }else if(userCity ==="xian-xianyang"){
//
// }else if(userCity ==="xian-xianyang"){
// this.setState({
//
// this.setState({
// city,
//
// city,
// orgCode: company.orgCode,
//
// orgCode: company.orgCode,
// sequenceNbr: company.sequenceNbr,
//
// sequenceNbr: company.sequenceNbr,
// currentCard
//
// currentCard
// });
//
// });
// console.log("您是所属西安CCPC,西安和咸阳数据都可以查看")
//
// console.log("您是所属西安CCPC,西安和咸阳数据都可以查看")
// }else if(userCity ==="xian" && city ==="xianyang"){
//
// }else if(userCity ==="xian" && city ==="xianyang"){
// message.danger('您没有咸阳的权限,请联系管理员');
//
// message.danger('您没有咸阳的权限,请联系管理员');
// }else if(userCity ==="xianyang" && city ==="xian"){
//
// }else if(userCity ==="xianyang" && city ==="xian"){
// message.danger('您没有西安的权限,请联系管理员');
//
// message.danger('您没有西安的权限,请联系管理员');
// }
//
// }
this
.
setState
({
//
this.setState({
city
,
//
city,
orgCode
:
orgCode
,
//
orgCode: orgCode,
sequenceNbr
:
company
.
sequenceNbr
,
//
sequenceNbr: company.sequenceNbr,
currentCard
//
currentCard
});
//
});
}
//
}
/**
/**
* 展示陕西省地图
* 展示陕西省地图
...
@@ -802,9 +718,10 @@ class IndexMap extends Component {
...
@@ -802,9 +718,10 @@ class IndexMap extends Component {
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
let
orgCode
=
this
.
getSelectOrgCode
(
city
,
dicCodeList
);
let
orgCode
=
this
.
getSelectOrgCode
(
city
,
dicCodeList
);
let
selectedCompany
=
lsTool
.
read
(
'selectedCompany'
);
let
selectedCompanyOrg
=
lsTool
.
read
(
'selectedCompanyOrg'
);
let
companyName
=
this
.
getSelectCityByOrgCode
(
selectedCompanyOrg
,
dicCodeList
);
let
map
=
null
;
let
map
=
null
;
if
(
selectedCompany
.
indexOf
(
"西安CCPC"
)
!==
-
1
||
selectedCompany
.
indexOf
(
"清算中心"
)
!==
-
1
)
{
if
(
companyName
.
indexOf
(
"清算中心"
)
!==
-
1
)
{
map
=
{
'is3DPage'
:
true
,
'city'
:
city
,
'orgCode'
:
orgCode
};
map
=
{
'is3DPage'
:
true
,
'city'
:
city
,
'orgCode'
:
orgCode
};
}
else
{
}
else
{
//如果不是西安CCPC,orgCode为空
//如果不是西安CCPC,orgCode为空
...
@@ -820,9 +737,11 @@ class IndexMap extends Component {
...
@@ -820,9 +737,11 @@ class IndexMap extends Component {
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
let
dictionaryList
=
lsTool
.
read
(
'dictionaryList'
);
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
let
dicCodeList
=
JSON
.
parse
(
dictionaryList
);
let
orgCode
=
this
.
getSelectOrgCode
(
city
,
dicCodeList
);
let
orgCode
=
this
.
getSelectOrgCode
(
city
,
dicCodeList
);
let
selectedCompany
=
lsTool
.
read
(
'selectedCompany'
);
// let selectedCompany = lsTool.read('selectedCompany');
let
selectedCompanyOrg
=
lsTool
.
read
(
'selectedCompanyOrg'
);
let
companyName
=
this
.
getSelectCityByOrgCode
(
selectedCompanyOrg
,
dicCodeList
);
let
map
=
null
;
let
map
=
null
;
if
(
selectedCompany
.
indexOf
(
"西安CCPC
"
)
!==-
1
){
if
(
companyName
.
indexOf
(
"清算中心
"
)
!==-
1
){
map
=
{
'is3DPage'
:
true
,
'city'
:
city
,
'orgCode'
:
orgCode
,
'flag'
:
flag
,
'pid'
:
id
,
'pointName'
:
pointName
,
'pointAttrs'
:
pointAttrs
};
map
=
{
'is3DPage'
:
true
,
'city'
:
city
,
'orgCode'
:
orgCode
,
'flag'
:
flag
,
'pid'
:
id
,
'pointName'
:
pointName
,
'pointAttrs'
:
pointAttrs
};
}
else
{
}
else
{
//如果不是西安CCPC,orgCode为空
//如果不是西安CCPC,orgCode为空
...
...
src/view/region/index.js
View file @
ae007036
...
@@ -65,9 +65,11 @@ class RegionSelect extends Component {
...
@@ -65,9 +65,11 @@ class RegionSelect extends Component {
const
{
state
}
=
this
.
props
.
location
;
const
{
state
}
=
this
.
props
.
location
;
const
{
sequenceNbr
}
=
reginParams
.
role
||
{};
const
{
sequenceNbr
}
=
reginParams
.
role
||
{};
const
{
companyName
}
=
reginParams
.
company
||
{};
const
{
companyName
}
=
reginParams
.
company
||
{};
const
companyOrgCode
=
reginParams
.
company
.
orgCode
||
{};
const
companySequenceNbr
=
reginParams
.
sequenceNbr
||
{};
const
companySequenceNbr
=
reginParams
.
sequenceNbr
||
{};
lsTool
.
write
(
'selectedRole'
,
sequenceNbr
);
lsTool
.
write
(
'selectedRole'
,
sequenceNbr
);
lsTool
.
write
(
'selectedCompany'
,
companyName
);
lsTool
.
write
(
'selectedCompany'
,
companyName
);
lsTool
.
write
(
'selectedCompanyOrg'
,
companyOrgCode
);
lsTool
.
write
(
'companySequenceNbr'
,
companySequenceNbr
);
lsTool
.
write
(
'companySequenceNbr'
,
companySequenceNbr
);
if
(
state
)
{
if
(
state
)
{
browserHistory
.
push
(
'/main/3dview'
);
browserHistory
.
push
(
'/main/3dview'
);
...
...
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