Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cxsfjx_project_echarts
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
邓文彬
cxsfjx_project_echarts
Commits
6c41885b
提交
6c41885b
authored
12月 08, 2022
作者:
Ma
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'ss' 到 'plus1.1.0'
跳转信用评价大屏 查看合并请求
!8
上级
16c255f5
c17c9d19
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
146 行增加
和
41 行删除
+146
-41
config.js
public/config.js
+7
-4
index.ts
src/axios/index.ts
+8
-7
head.vue
src/layout/head.vue
+8
-4
index.ts
src/views/dataCenter/map/index.ts
+9
-0
index.vue
src/views/dataCenter/map/index.vue
+92
-19
index.vue
src/views/login/index.vue
+18
-5
service.ts
src/views/login/service.ts
+4
-2
没有找到文件。
public/config.js
浏览文件 @
6c41885b
window
.
baseURL
=
{
window
.
baseURL
=
{
prodUrl
:
"/api"
,
prodUrl
:
"/api"
,
devUrl
:
"http://192.168.62.77:9095"
,
devUrl
:
"http://192.168.102.153:9095"
,
qyxypj
:
"http://192.168.102.153:9098"
,
//获取token接口
// devUrl: "http://192.168.102.183:9095",
// devUrl: "http://192.168.102.183:9095",
// devUrl: "http://192.168.102.220:9095",
// devUrl: "http://192.168.102.220:9095",
xypjUrl
:
"http://222.75.116.235:9020"
,
//信用评价线上地址
xypjUrl
:
"http://222.75.116.235:9020/#/"
,
//信用评价线上地址
// xypjUrl: "http://192.168.100.220:99/#/",
// xypjUrl: "http://192.168.101.243:81/#/",
api
:
''
api
:
''
}
}
\ No newline at end of file
\ No newline at end of file
src/axios/index.ts
浏览文件 @
6c41885b
...
@@ -2,27 +2,28 @@ import Axios from "axios"
...
@@ -2,27 +2,28 @@ import Axios from "axios"
import
responseMiddle
from
"./responseMiddle"
import
responseMiddle
from
"./responseMiddle"
const
ENV_PARAMS
=
import
.
meta
.
env
;
// 这是Vite官方指导获取环境变量的方式
const
ENV_PARAMS
=
import
.
meta
.
env
;
// 这是Vite官方指导获取环境变量的方式
/**
/**
* 判断是生产环境还是本地环境
* 判断是生产环境还是本地环境
* 生成环境使用 /api 前缀
* 生成环境使用 /api 前缀
* 本地环境使用 /mock 前缀
* 本地环境使用 /mock 前缀
*/
*/
export
const
getBaseUrl
=
():
string
=>
{
// export const getBaseUrl = (): string => {
const
{
DEV
,
VITE_DEV_API
,
VITE_PRD_API
}
=
ENV_PARAMS
;
// const { DEV, VITE_DEV_API, VITE_PRD_API } = ENV_PARAMS;
return
DEV
?
VITE_DEV_API
:
VITE_PRD_API
;
};
// return DEV ? VITE_DEV_API : VITE_PRD_API;
// };
// console.log(getBaseUrl(),'getBaseUrl()');
const
axios
=
Axios
.
create
({
const
axios
=
Axios
.
create
({
baseURL
:
getBaseUrl
(),
// baseURL: getBaseUrl(),
baseURL
:
window
.
baseURL
.
devUrl
,
timeout
:
1000
,
timeout
:
1000
,
});
});
// 添加请求拦截器
// 添加请求拦截器
axios
.
interceptors
.
request
.
use
(
function
(
config
)
{
axios
.
interceptors
.
request
.
use
(
function
(
config
)
{
config
.
headers
[
'Authorization'
]
=
'Bearer '
+
localStorage
.
getItem
(
"cxsf_echarts_token"
)
// 在发送请求之前做些什么
// 在发送请求之前做些什么
return
config
;
return
config
;
},
function
(
error
)
{
},
function
(
error
)
{
...
...
src/layout/head.vue
浏览文件 @
6c41885b
...
@@ -219,10 +219,14 @@ export default defineComponent({
...
@@ -219,10 +219,14 @@ export default defineComponent({
methods
:
{
methods
:
{
//跳转到信用评价
//跳转到信用评价
goxypj
()
{
goxypj
()
{
const
{
xypjUrl
=
""
}
=
window
.
baseURL
||
{};
// const { xypjUrl = "" } = window.baseURL || {};
if
(
xypjUrl
)
{
const
xypjUrl
=
window
.
baseURL
.
xypjUrl
//window.location.href = xypjUrl;
// const xypjUrl = "http://192.168.101.243:81/#/"
window
.
open
(
xypjUrl
,
"_blank"
);
const
token
=
localStorage
.
getItem
(
"xypjToken"
)
const
qyxypj
=
xypjUrl
+
'sso?token='
+
token
+
'&route=bigData'
if
(
qyxypj
)
{
// window.location.href = qyxypj;
window
.
open
(
qyxypj
,
"_blank"
);
}
}
},
},
// getCycleData() {
// getCycleData() {
...
...
src/views/dataCenter/map/index.ts
0 → 100644
浏览文件 @
6c41885b
import
request
from
"@/axios"
;
export
const
bigscreen
=
async
(
username
:
string
,
password
:
string
)
=>
{
return
request
({
url
:
"/fb/bigscreen"
,
method
:
"get"
,
})
}
\ No newline at end of file
src/views/dataCenter/map/index.vue
浏览文件 @
6c41885b
...
@@ -2,10 +2,37 @@
...
@@ -2,10 +2,37 @@
<el-row
class=
"map-warpper"
:gutter=
"16"
>
<el-row
class=
"map-warpper"
:gutter=
"16"
>
<el-col
class=
"map-left"
:span=
"8"
>
<el-col
class=
"map-left"
:span=
"8"
>
<div
class=
"performance-com card-item"
>
<div
class=
"performance-com card-item"
>
<Performance
/>
<div
v-for=
"item in tableData"
:key=
"item.id"
>
<div
v-if=
"(item.dictLabel == '全省军民融合创新示范绩效评价情况' && item.sort == 1 && item.isView == '1')"
>
<Performance
/>
</div>
<div
v-if=
"(item.dictLabel == '创新示范区县(市、区)排名' && item.sort == 1 && item.isView == '1')"
>
<RankList
/>
</div>
<div
v-if=
"(item.dictLabel == '红榜' && item.sort == 1 && item.isView == '1')"
>
<InvestmentProgress
/>
</div>
<div
v-if=
"(item.dictLabel == '指标预警' && item.sort == 1 && item.isView == '1')"
>
<IndicatorWarning
/>
</div>
</div>
</div>
</div>
<div
class=
"performance-com card-item"
>
<div
class=
"performance-com card-item"
>
<InvestmentProgress
/>
<div
v-for=
"item in tableData"
:key=
"item.id"
>
<div
v-if=
"(item.dictLabel == '全省军民融合创新示范绩效评价情况' && item.sort == 3 && item.isView == '1')"
>
<Performance
/>
</div>
<div
v-if=
"(item.dictLabel == '创新示范区县(市、区)排名' && item.sort == 3 && item.isView == '1')"
>
<RankList
/>
</div>
<div
v-if=
"(item.dictLabel == '红榜' && item.sort == 3 && item.isView == '1')"
>
<InvestmentProgress
/>
</div>
<div
v-if=
"(item.dictLabel == '指标预警' && item.sort == 3 && item.isView == '1')"
>
<IndicatorWarning
/>
</div>
</div>
<!--
<InvestmentProgress
/>
-->
</div>
</div>
</el-col>
</el-col>
<el-col
:span=
"9"
>
<el-col
:span=
"9"
>
...
@@ -26,10 +53,38 @@
...
@@ -26,10 +53,38 @@
<el-col
:span=
"7"
>
<el-col
:span=
"7"
>
<div
class=
"map-right"
>
<div
class=
"map-right"
>
<div
class=
"card-item rank-list"
>
<div
class=
"card-item rank-list"
>
<RankList
/>
<div
v-for=
"item in tableData"
:key=
"item.id"
>
<div
v-if=
"(item.dictLabel == '全省军民融合创新示范绩效评价情况' && item.sort == 2 && item.isView == '1')"
>
<Performance
/>
</div>
<div
v-if=
"(item.dictLabel == '创新示范区县(市、区)排名' && item.sort == 2 && item.isView == '1')"
>
<RankList
/>
</div>
<div
v-if=
"(item.dictLabel == '红榜' && item.sort == 2 && item.isView == '1')"
>
<InvestmentProgress
/>
</div>
<div
v-if=
"(item.dictLabel == '指标预警' && item.sort == 2 && item.isView == '1')"
>
<IndicatorWarning
/>
</div>
</div>
<!--
<RankList
/>
-->
</div>
</div>
<div
class=
"card-item incom-graphic"
>
<div
class=
"card-item incom-graphic"
>
<IndicatorWarning
/>
<div
v-for=
"item in tableData"
:key=
"item.id"
>
<div
v-if=
"(item.dictLabel == '全省军民融合创新示范绩效评价情况' && item.sort == 4 && item.isView == '1')"
>
<Performance
/>
</div>
<div
v-if=
"(item.dictLabel == '创新示范区县(市、区)排名' && item.sort == 4 && item.isView == '1')"
>
<RankList
/>
</div>
<div
v-if=
"(item.dictLabel == '红榜' && item.sort == 4 && item.isView == '1')"
>
<InvestmentProgress
/>
</div>
<div
v-if=
"(item.dictLabel == '指标预警' && item.sort == 4 && item.isView == '1')"
>
<IndicatorWarning
/>
</div>
</div>
<!--
<IndicatorWarning
/>
-->
</div>
</div>
<!--
<div
class=
"card-item incom-graphic"
>
<!--
<div
class=
"card-item incom-graphic"
>
<Income
/>
<Income
/>
...
@@ -44,21 +99,13 @@
...
@@ -44,21 +99,13 @@
<StrongArmyCard
/>
<StrongArmyCard
/>
</el-col>
</el-col>
<el-col
class=
"card-item"
>
<el-col
class=
"card-item"
>
<CardItem
<CardItem
title=
"军民协同创新"
:infoList=
"list"
:toPage=
"dataCenterRouter.INNOVATION"
/>
title=
"军民协同创新"
:infoList=
"list"
:toPage=
"dataCenterRouter.INNOVATION"
/>
</el-col>
</el-col>
<el-col
class=
"card-item"
>
<el-col
class=
"card-item"
>
<Industrial
/>
<Industrial
/>
</el-col>
</el-col>
<el-col
class=
"card-item"
>
<el-col
class=
"card-item"
>
<CardItem
<CardItem
:infoList=
"list2x"
title=
"资源开放共享"
:toPage=
"dataCenterRouter.RESORCE_SHARE"
/>
:infoList=
"list2x"
title=
"资源开放共享"
:toPage=
"dataCenterRouter.RESORCE_SHARE"
/>
</el-col>
</el-col>
<el-col
class=
"card-item"
>
<el-col
class=
"card-item"
>
<SystemConstruct
/>
<SystemConstruct
/>
...
@@ -82,7 +129,13 @@ import { DataCenterRouter } from "@/route/dataCenter";
...
@@ -82,7 +129,13 @@ import { DataCenterRouter } from "@/route/dataCenter";
import
Mock
from
"./cradMock"
;
import
Mock
from
"./cradMock"
;
import
{
mapState
}
from
"vuex"
;
import
{
mapState
}
from
"vuex"
;
import
{
bigscreen
}
from
'./index.ts'
const
BIGSCREEN
=
{
'全省军民融合创新示范绩效评价情况'
:
Performance
,
'创新示范区县(市、区)排名'
:
InvestmentProgress
,
'红榜'
:
RankList
,
'指标预警'
:
IndicatorWarning
}
export
default
defineComponent
({
export
default
defineComponent
({
components
:
{
components
:
{
Performance
,
Performance
,
...
@@ -96,7 +149,7 @@ export default defineComponent({
...
@@ -96,7 +149,7 @@ export default defineComponent({
Industrial
,
Industrial
,
SystemConstruct
,
SystemConstruct
,
},
},
setup
()
{},
setup
()
{
},
computed
:
{
computed
:
{
...
mapState
({
...
mapState
({
curDataType
:
(
state
)
=>
state
.
curDataType
,
curDataType
:
(
state
)
=>
state
.
curDataType
,
...
@@ -108,7 +161,9 @@ export default defineComponent({
...
@@ -108,7 +161,9 @@ export default defineComponent({
return
Mock
[
this
.
curDataType
].
list2x
;
return
Mock
[
this
.
curDataType
].
list2x
;
},
},
},
},
created
()
{
this
.
getBigScreen
()
},
data
()
{
data
()
{
return
{
return
{
dataCenterRouter
:
DataCenterRouter
,
dataCenterRouter
:
DataCenterRouter
,
...
@@ -121,8 +176,23 @@ export default defineComponent({
...
@@ -121,8 +176,23 @@ export default defineComponent({
"北仑区,海宁市,柯桥区"
,
"北仑区,海宁市,柯桥区"
,
"普陀区"
,
"普陀区"
,
],
],
tableData
:
[]
};
};
},
},
methods
:
{
getBigScreen
()
{
bigscreen
().
then
(
res
=>
{
this
.
tableData
=
res
.
data
})
},
// getModule(label){
// this.tableData.map(item => {
// for(let list in BIGSCREEN){
// console.log(list);
// }
// })
// }
}
});
});
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
@@ -203,7 +273,7 @@ export default defineComponent({
...
@@ -203,7 +273,7 @@ export default defineComponent({
.rank-list
{
.rank-list
{
margin-top
:
16px
;
margin-top
:
16px
;
height
:
312px
;
max-height
:
calc
(
640px
/
2
-
8px
)
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
}
}
...
@@ -228,9 +298,12 @@ export default defineComponent({
...
@@ -228,9 +298,12 @@ export default defineComponent({
.incom-graphic
{
.incom-graphic
{
margin-top
:
16px
;
margin-top
:
16px
;
height
:
312px
;
max-height
:
calc
(
640px
/
2
-
8px
)
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
.rank-list
{
max-height
:
calc
(
640px
/
2
-
8px
);
}
}
}
}
}
...
...
src/views/login/index.vue
浏览文件 @
6c41885b
...
@@ -74,7 +74,7 @@ import { TOKEN_KEY } from "@/utils/enum/token";
...
@@ -74,7 +74,7 @@ import { TOKEN_KEY } from "@/utils/enum/token";
import
{
defineComponent
}
from
"vue"
;
import
{
defineComponent
}
from
"vue"
;
import
{
getToken
,
login
}
from
"./service"
;
import
{
getToken
,
login
}
from
"./service"
;
import
{
DataCenterRouter
}
from
"@/route/dataCenter"
;
import
{
DataCenterRouter
}
from
"@/route/dataCenter"
;
import
axios
from
"axios"
export
default
defineComponent
({
export
default
defineComponent
({
name
:
"Login"
,
name
:
"Login"
,
data
()
{
data
()
{
...
@@ -107,6 +107,7 @@ export default defineComponent({
...
@@ -107,6 +107,7 @@ export default defineComponent({
watch
:
{},
watch
:
{},
created
()
{
created
()
{
localStorage
.
removeItem
(
TOKEN_KEY
);
localStorage
.
removeItem
(
TOKEN_KEY
);
localStorage
.
removeItem
(
'xypjToken'
);
},
},
methods
:
{
methods
:
{
wstLogin
()
{
wstLogin
()
{
...
@@ -128,17 +129,29 @@ export default defineComponent({
...
@@ -128,17 +129,29 @@ export default defineComponent({
},
},
handleLogin
()
{
handleLogin
()
{
const
loginForm
=
this
.
loginForm
;
const
loginForm
=
this
.
loginForm
;
login
(
loginForm
.
username
,
loginForm
.
password
)
login
(
loginForm
)
.
then
(
async
(
res
)
=>
{
.
then
(
async
(
res
)
=>
{
const
{
data
}
=
res
;
const
{
token
}
=
res
;
localStorage
.
setItem
(
TOKEN_KEY
,
data
);
localStorage
.
setItem
(
TOKEN_KEY
,
token
);
this
.
$router
.
push
(
DataCenterRouter
.
DATA_MAP
);
this
.
$router
.
push
(
DataCenterRouter
.
DATA_MAP
);
this
.
getXypjToken
()
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
$message
.
error
(
"用户名或密码错误!"
);
this
.
$message
.
error
(
"用户名或密码错误!"
);
});
});
},
},
getXypjToken
(){
const
loginForm
=
this
.
loginForm
;
axios
({
url
:
window
.
baseURL
.
qyxypj
+
"/login/external"
,
method
:
"POST"
,
data
:
loginForm
}).
then
(
res
=>
{
const
{
token
}
=
res
.
data
;
localStorage
.
setItem
(
"xypjToken"
,
token
)
})
}
},
},
});
});
</
script
>
</
script
>
...
...
src/views/login/service.ts
浏览文件 @
6c41885b
...
@@ -13,9 +13,10 @@ export const getToken = async () => {
...
@@ -13,9 +13,10 @@ export const getToken = async () => {
* @param username
* @param username
* @param password
* @param password
*/
*/
export
const
login
=
async
(
username
:
string
,
password
:
string
)
=>
{
export
const
login
=
async
(
data
:
Object
)
=>
{
return
request
({
return
request
({
url
:
"/
user/login?username="
+
username
+
'&password='
+
password
,
url
:
"/
login"
,
method
:
"POST"
,
method
:
"POST"
,
data
:
data
})
})
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论