Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng_code
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanxiao
mancheng_code
Commits
6b6e3953
Commit
6b6e3953
authored
Nov 02, 2023
by
heshihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 项目整体调整
parent
1edafe17
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
95 additions
and
89 deletions
+95
-89
src/utils/http.js
+62
-58
src/utils/industry.json
+0
-0
src/views/assess/pages/ass.vue
+0
-0
src/views/assess/pages/map.vue
+14
-16
src/views/atlas/pages/chain.vue
+3
-2
src/views/index/index_copy.vue
+3
-1
src/views/resources/page/overview.vue
+11
-10
src/views/resources/page/target.vue
+2
-2
No files found.
src/utils/http.js
View file @
6b6e3953
import
router
from
'../router'
import
axios
from
'axios'
import
{
Message
}
from
'element-ui'
;
import
router
from
"../router"
;
import
axios
from
"axios"
;
import
{
Message
}
from
"element-ui"
;
// console.log()
//1. 创建新的axios实例,
const
service
=
axios
.
create
({
// baseURL: '',
timeout
:
2000
*
1000
})
let
url
=
'https://jincheng.industrychain.online'
timeout
:
2000
*
1000
,
})
;
let
url
=
""
;
// url = 'http://192.168.31.154:5000'
let
baseURL
=
url
let
baseURL1
=
'http://touzi.cjwltzj.taiyuan.gov.cn'
let
baseURL2
=
'https://zysf-store.oss-cn-beijing.aliyuncs.com'
let
baseURL3
=
url
let
baseURL4
=
'http://39.100.39.50:8006'
url
=
"https://mancheng.industrychain.online"
;
let
baseURL
=
url
;
let
baseURL1
=
"http://touzi.cjwltzj.taiyuan.gov.cn"
;
let
baseURL2
=
"https://zysf-store.oss-cn-beijing.aliyuncs.com"
;
let
baseURL3
=
url
;
let
baseURL4
=
"http://39.100.39.50:8006"
;
// 2.请求拦截器
service
.
interceptors
.
request
.
use
(
config
=>
{
service
.
interceptors
.
request
.
use
(
(
config
)
=>
{
switch
(
config
.
urlType
)
{
case
'api1'
:
case
"api1"
:
config
.
url
=
baseURL1
+
config
.
url
;
break
;
case
'api2'
:
case
"api2"
:
config
.
url
=
baseURL2
+
config
.
url
;
break
;
case
'api3'
:
case
"api3"
:
config
.
url
=
baseURL3
+
config
.
url
;
break
;
case
'api4'
:
case
"api4"
:
config
.
url
=
baseURL4
+
config
.
url
;
break
;
default
:
...
...
@@ -41,45 +43,49 @@ service.interceptors.request.use(config => {
// 'Content-Type': 'application/x-www-form-urlencoded' //配置请求头
// }
//注意使用token的时候需要引入cookie方法或者用本地localStorage等方法,推荐js-cookie
const
token
=
localStorage
.
getItem
(
'token'
)
||
''
;
//这里取token之前,你肯定需要先拿到token,存一下
const
token
=
localStorage
.
getItem
(
"token"
)
||
""
;
//这里取token之前,你肯定需要先拿到token,存一下
if
(
token
)
{
// config.params = { 'token': token } //如果要求携带在参数中
config
.
headers
.
token
=
token
;
//如果要求携带在请求头中
}
return
config
},
error
=>
{
Promise
.
reject
(
error
)
})
return
config
;
},
(
error
)
=>
{
Promise
.
reject
(
error
);
}
);
// 3.响应拦截器
service
.
interceptors
.
response
.
use
(
response
=>
{
service
.
interceptors
.
response
.
use
(
(
response
)
=>
{
//接收到响应数据并成功后的一些共有的处理,关闭loading等
// console.log(response.data);
if
(
response
.
data
.
collect
)
{
return
response
.
data
return
response
.
data
;
}
if
(
response
.
data
.
code
==
0
)
{
return
response
.
data
.
data
||
{
success
:
1
,
data
:
response
.
data
}
return
response
.
data
.
data
||
{
success
:
1
,
data
:
response
.
data
};
}
if
(
response
.
data
.
code
==
4101
)
{
router
.
replace
({
path
:
'/login'
})
Message
.
error
(
'登录已过期,请重新登录'
)
return
''
router
.
replace
({
path
:
"/login"
});
Message
.
error
(
"登录已过期,请重新登录"
);
return
""
;
}
if
(
response
.
data
.
code
==
200
)
{
return
response
.
data
.
data
||
{
success
:
1
}
return
response
.
data
.
data
||
{
success
:
1
};
}
// if (response.data.code == 4002) {
// return response.data.data || { status: 2, msg: '请先登录' }
// }
if
(
response
.
data
.
code
==
4104
)
{
return
response
.
data
.
data
||
{
success
:
2
,
msg
:
'尚未绑定手机号'
,
userinfo
:
response
.
data
.
user_info
}
return
response
.
data
.
data
||
{
success
:
2
,
msg
:
"尚未绑定手机号"
,
userinfo
:
response
.
data
.
user_info
};
}
else
{
// Message.error(response.data.msg)
return
response
.
data
.
data
||
{
success
:
0
,
data
:
response
.
data
}
return
response
.
data
.
data
||
{
success
:
0
,
data
:
response
.
data
};
}
},
error
=>
{
},
(
error
)
=>
{
console
.
log
(
error
);
/***** 接收到异常响应的处理开始 *****/
if
(
error
&&
error
.
response
)
{
...
...
@@ -87,60 +93,60 @@ service.interceptors.response.use(response => {
// 2.根据响应码具体处理
switch
(
error
.
response
.
status
)
{
case
400
:
error
.
message
=
'错误请求'
error
.
message
=
"错误请求"
;
break
;
case
401
:
error
.
message
=
'未授权,请重新登录'
error
.
message
=
"未授权,请重新登录"
;
break
;
case
403
:
error
.
message
=
'拒绝访问'
error
.
message
=
"拒绝访问"
;
break
;
case
404
:
error
.
message
=
'请求错误,未找到该资源'
error
.
message
=
"请求错误,未找到该资源"
;
// window.location.href = "/NotFound"
break
;
case
405
:
error
.
message
=
'请求方法未允许'
error
.
message
=
"请求方法未允许"
;
break
;
case
408
:
error
.
message
=
'请求超时'
error
.
message
=
"请求超时"
;
break
;
case
500
:
error
.
message
=
'服务器端出错'
error
.
message
=
"服务器端出错"
;
break
;
case
501
:
error
.
message
=
'网络未实现'
error
.
message
=
"网络未实现"
;
break
;
case
502
:
error
.
message
=
'网络错误'
error
.
message
=
"网络错误"
;
break
;
case
503
:
error
.
message
=
'服务不可用'
error
.
message
=
"服务不可用"
;
break
;
case
504
:
error
.
message
=
'网络超时'
error
.
message
=
"网络超时"
;
break
;
case
505
:
error
.
message
=
'http版本不支持该请求'
error
.
message
=
"http版本不支持该请求"
;
break
;
default
:
error
.
message
=
`连接错误
${
error
.
response
.
status
}
`
error
.
message
=
`连接错误
${
error
.
response
.
status
}
`
;
}
}
else
{
error
.
message
=
'连接服务器失败'
error
.
message
=
"连接服务器失败"
;
// 超时处理
if
(
JSON
.
stringify
(
error
).
includes
(
'timeout'
))
{
error
.
message
=
'服务器响应超时,请刷新当前页'
if
(
JSON
.
stringify
(
error
).
includes
(
"timeout"
))
{
error
.
message
=
"服务器响应超时,请刷新当前页"
;
// Message.error('服务器响应超时,请刷新当前页')
}
}
Message
.
error
(
error
.
message
)
Message
.
error
(
error
.
message
);
/***** 处理结束 *****/
//如果不需要错误处理,以上的处理过程都可省略
return
Promise
.
resolve
(
error
.
response
)
})
return
Promise
.
resolve
(
error
.
response
);
}
);
//4.导入文件
// export default service
...
...
@@ -149,17 +155,16 @@ function get(url, params = {}, urlType) {
return
service
({
url
,
params
,
urlType
})
urlType
,
})
;
}
function
post
(
url
,
data
,
urlType
)
{
return
service
({
url
,
method
:
'post'
,
method
:
"post"
,
data
,
urlType
,
})
})
;
}
export
default
{
post
,
get
,
service
}
\ No newline at end of file
export
default
{
post
,
get
,
service
};
src/utils/industry.json
View file @
6b6e3953
This diff is collapsed.
Click to expand it.
src/views/assess/pages/ass.vue
View file @
6b6e3953
This diff is collapsed.
Click to expand it.
src/views/assess/pages/map.vue
View file @
6b6e3953
...
...
@@ -2,9 +2,9 @@
<div
class=
"flex-box"
>
<div
class=
"flex-left"
>
<div
class=
"map"
>
<div
:class=
"['whole', activeDistrict == '晋城市' ? 'active' : '']"
@
click=
"changeActive('晋城市')"
>
<
!--
<
div
:class=
"['whole', activeDistrict == '晋城市' ? 'active' : '']"
@
click=
"changeActive('晋城市')"
>
晋城市总览
</div>
</div>
-->
<div
class=
"chart-box"
>
<div
class=
"chart"
ref=
"chartMap"
></div>
</div>
...
...
@@ -210,7 +210,7 @@
<div
class=
"title"
>
<img
src=
"~@/assets/images/resources/icon-bar.png"
alt=
""
/>
<span
>
{{
activeDistrict
==
"
晋城市"
?
"各县(市、区)"
:
activeDistrict
}}
闲置载体统计图
>
{{
activeDistrict
==
"
满城区"
?
activeDistrict
:
activeDistrict
}}
闲置载体统计图
<!--
<em
v-if=
"activeDistrict == '晋城市'"
>
(截至
{{
new
Date
().
getFullYear
()
}}
年
{{
new
Date
().
getMonth
()
+
1
...
...
@@ -711,7 +711,7 @@
<
script
>
import
api
from
"@/api/assess"
;
import
jincheng
from
"@map/city/140500
.json"
;
import
mancheng
from
"@map/city/130607
.json"
;
import
dotActive
from
"@/assets/images/public/icon-dot-active.png"
;
import
dotNormal
from
"@/assets/images/public/icon-dot-normal.png"
;
export
default
{
...
...
@@ -728,7 +728,8 @@ export default {
chartBar
:
null
,
chartLine
:
null
,
disabled_district_name
:
""
,
activeDistrict
:
"晋城市"
,
activeDistrict
:
"满城区"
,
activeDistrict1
:
"满城区"
,
activeHigh
:
0
,
HighPopper
:
false
,
areaList
:
{},
...
...
@@ -751,8 +752,7 @@ export default {
},
mounted
()
{
this
.
disabled_district_name
=
localStorage
.
getItem
(
"jc_district_name"
)
||
""
;
console
.
log
(
this
.
disabled_district_name
);
this
.
activeDistrict
=
this
.
disabled_district_name
||
"晋城市"
;
this
.
activeDistrict
=
this
.
disabled_district_name
||
"满城区"
;
this
.
$bus
.
$emit
(
"setActive"
,
"assess"
);
this
.
initChartMap
();
...
...
@@ -765,9 +765,8 @@ export default {
methods
:
{
async
ShowArea
()
{
let
res
=
await
api
.
ShowArea
({
district_name
:
this
.
activeDistrict
==
"
晋城市
"
?
""
:
this
.
activeDistrict
,
district_name
:
this
.
activeDistrict
==
"
满城区
"
?
""
:
this
.
activeDistrict
,
});
console
.
log
(
res
);
let
obj
=
{};
res
.
map
((
item
)
=>
{
obj
=
{
...
obj
,
...
item
};
...
...
@@ -791,9 +790,8 @@ export default {
},
async
ShowCarrierRate
()
{
let
res
=
await
api
.
ShowCarrierRate
({
district_name
:
this
.
activeDistrict
==
"
晋城市"
?
"晋城市
"
:
this
.
activeDistrict
,
district_name
:
this
.
activeDistrict
==
"
满城区"
?
"满城区
"
:
this
.
activeDistrict
,
});
console
.
log
(
res
);
this
.
barData
.
land_month
=
[];
// 土地第一季度闲置面积
this
.
barData
.
factory_month
=
[];
// 土地第三季度闲置面积
this
.
barData
.
build_month
=
[];
// 土地第二季度闲置面积
...
...
@@ -803,7 +801,7 @@ export default {
this
.
barData
.
factory_year
=
[];
// 厂房全年闲置面积
this
.
barData
.
build_year
=
[];
//楼宇全年闲置面积
this
.
barData
.
land_year
=
[];
//土地全年闲置面积
if
(
this
.
activeDistrict
==
"
晋城市
"
)
{
if
(
this
.
activeDistrict
==
"
满城区
"
)
{
let
sortRes
=
[];
res
.
map
((
item
)
=>
{
if
(
item
.
district_name
==
"城区"
)
{
...
...
@@ -866,11 +864,11 @@ export default {
},
initChartMap
()
{
this
.
chartMap
=
this
.
$echarts
.
init
(
this
.
$refs
.
chartMap
);
this
.
$echarts
.
registerMap
(
"
jincheng"
,
ji
ncheng
);
this
.
$echarts
.
registerMap
(
"
mancheng"
,
ma
ncheng
);
const
initOption
=
{
geo
:
{
type
:
"map"
,
map
:
"
ji
ncheng"
,
map
:
"
ma
ncheng"
,
zoom
:
1.2
,
geoIndex
:
0
,
selectedMode
:
"single"
,
...
...
@@ -1197,7 +1195,7 @@ export default {
}
// 地图点击事件
this
.
chartMap
.
on
(
"click"
,
(
item
)
=>
{
console
.
log
(
1
)
;
return
;
console
.
log
(
this
.
disabled_district_name
);
if
(
this
.
disabled_district_name
!=
"晋城市"
&&
this
.
disabled_district_name
!=
""
)
{
console
.
log
(
1
);
...
...
@@ -1645,7 +1643,7 @@ export default {
this
.
chartBar
.
setOption
(
initOption
);
},
upDataChartBar
()
{
if
(
this
.
activeDistrict
==
"
晋城市
"
)
{
if
(
this
.
activeDistrict
==
"
满城区
"
)
{
let
upDataOption
=
{
xAxis
:
{
data
:
this
.
barData
.
xAxisData
,
...
...
src/views/atlas/pages/chain.vue
View file @
6b6e3953
...
...
@@ -7,11 +7,12 @@
<div
class=
"concent-box "
>
<div
class=
"text-box scroll-auto"
v-html=
"info.span"
ref=
"details"
></div>
<div
class=
"img"
>
<!-- !TODO这里需要真实的数据 两个img 暂时不显示 -->
<div>
<img
:src=
"require('@/assets/images/industry/' + info.img
1)"
alt=
""
v-if=
"info.img1
"
/>
<img
:src=
"require('@/assets/images/industry/' + info.img
3)"
alt=
""
v-if=
"info.img3
"
/>
</div>
<div>
<img
:src=
"require('@/assets/images/industry/' + info.img
2)"
alt=
""
v-if=
"info.img2
"
/>
<img
:src=
"require('@/assets/images/industry/' + info.img
3)"
alt=
""
v-if=
"info.img3
"
/>
</div>
</div>
</div>
...
...
src/views/index/index_copy.vue
View file @
6b6e3953
...
...
@@ -856,7 +856,7 @@ export default {
activeCard
:
1
,
activeCard1
:
1
,
activeCard2
:
2
,
district
:
"
晋城市
"
,
district
:
"
满城区
"
,
district1
:
"满城区"
,
nowTime
:
null
,
chart3DHuan
:
null
,
...
...
@@ -1195,6 +1195,7 @@ export default {
sortRes
[
7
]
=
item
;
}
});
sortRes
.
map
((
item
)
=>
{
data
.
push
([
item
.
name
==
"晋城经济技术开发区"
?
"晋城经济
\
n
\
r技术开发区"
:
item
.
name
,
...
...
@@ -1210,6 +1211,7 @@ export default {
"开工项目到位资金完成额: "
+
item
.
nums4
+
"亿元"
,
]);
});
this
.
numArr
=
numArr
;
this
.
barData
=
data
;
this
.
upDataBar
(
data
);
...
...
src/views/resources/page/overview.vue
View file @
6b6e3953
...
...
@@ -4,7 +4,7 @@
<div
class=
"shadow-box"
>
<div
class=
"img-title"
>
<img
src=
"~@/assets/images/project/icon-zonglan.png"
alt=
""
/>
<span>
晋城市
项目总览
</span>
<span>
满城区
项目总览
</span>
</div>
<ul
class=
"nav-card"
>
<li>
...
...
@@ -51,20 +51,21 @@
<div
class=
"shadow-box"
>
<div
class=
"img-title"
>
<img
src=
"~@/assets/images/project/icon-map.png"
alt=
""
/>
<span>
晋城市
项目地图
</span>
<span>
满城区
项目地图
</span>
</div>
<div
class=
"flex-map"
>
<div
class=
"chart-map"
>
<div
:class=
"['jin', district == '晋城市' ? 'active' : '']"
@
click=
"changeDistrict"
>
<
!--
<
div
:class=
"['jin', district == '晋城市' ? 'active' : '']"
@
click=
"changeDistrict"
>
晋城市
</div>
</div>
-->
<div
class=
"chart"
ref=
"chart_map"
></div>
</div>
<div
class=
"list"
>
<div
class=
"list-title"
>
<img
class=
"mr8"
src=
"~@/assets/images/project/icon-map-tj.png"
alt=
""
/>
<span>
{{
district
}}
项目阶段统计
</span>
<!--
<span>
{{
district
}}
项目阶段统计
</span>
-->
<span>
满城区项目阶段统计
</span>
</div>
<ul>
<li>
...
...
@@ -115,7 +116,7 @@
<div
class=
"shadow-box ranking"
>
<div
class=
"img-title "
>
<img
src=
"~@/assets/images/project/icon-phb.png"
alt=
""
/>
<span
class=
"title-16"
>
县(市、区)、开发
区招商引资指标完成情况 (
{{
data_time
}}
)
</span>
<span
class=
"title-16"
>
满城
区招商引资指标完成情况 (
{{
data_time
}}
)
</span>
</div>
<ul
class=
"flex-type"
>
<li
:class=
"['flex-48 ', activeType == 1 ? 'active' : '']"
@
click=
"changeActiveType(1)"
>
...
...
@@ -183,7 +184,7 @@
</div>
</template>
<
script
>
import
jincheng
from
"@map/city/140500
.json"
;
import
mancheng
from
"@map/city/130607
.json"
;
import
dotActive
from
"@/assets/images/public/icon-dot-active.png"
;
import
dotNormal
from
"@/assets/images/public/icon-dot-normal.png"
;
import
api
from
"@/api/resources/account"
;
...
...
@@ -277,7 +278,7 @@ export default {
},
initChartMap
()
{
this
.
chartMap
=
this
.
$echarts
.
init
(
this
.
$refs
.
chart_map
);
this
.
$echarts
.
registerMap
(
"
jincheng"
,
ji
ncheng
);
this
.
$echarts
.
registerMap
(
"
mancheng"
,
ma
ncheng
);
const
initOption
=
{
tooltip
:
{
trigger
:
"item"
,
...
...
@@ -287,13 +288,13 @@ export default {
},
geo
:
{
type
:
"map"
,
map
:
"
ji
ncheng"
,
map
:
"
ma
ncheng"
,
zoom
:
1.2
,
geoIndex
:
0
,
selectedMode
:
"single"
,
label
:
{
show
:
true
,
color
:
"
rgba(255,255,255,.6)
"
,
color
:
"
#599be8
"
,
formatter
:
function
(
params
)
{
return
"{normalIcon|}"
+
" "
+
params
.
name
;
},
...
...
src/views/resources/page/target.vue
View file @
6b6e3953
...
...
@@ -2,8 +2,8 @@
<div
class=
"portrait_body"
>
<div
class=
"portrait_main"
>
<el-tabs
v-model=
"activeName"
@
change=
"changeActiveName"
>
<el-tab-pane
label=
"
山西省地市
指标排名情况"
name=
"sheng"
>
</el-tab-pane>
<
el-tab-pane
label=
"晋城市县(市、区)、开发区指标排名情况"
name=
"shi"
>
</el-tab-pane
>
<el-tab-pane
label=
"
满城区
指标排名情况"
name=
"sheng"
>
</el-tab-pane>
<
!--
<el-tab-pane
label=
"晋城市县(市、区)、开发区指标排名情况"
name=
"shi"
>
</el-tab-pane>
--
>
<div
class=
"content"
v-if=
"activeName == 'sheng'"
>
<div
class=
"card"
>
<p
:class=
"[type == 0 ? 'active' : '']"
@
click=
"type = 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