Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SmartAgricWeb
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
zhanglw
SmartAgricWeb
Commits
886781b9
Commit
886781b9
authored
Oct 19, 2023
by
zhanglw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
超链接管理、项目信息管理、大屏人员折线改柱状图
parent
7afc8f84
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
177 additions
and
29 deletions
+177
-29
dev.env.js
config/dev.env.js
+2
-2
common.js
src/api/common.js
+13
-5
daping.vue
src/views/daping.vue
+110
-0
linkset.vue
src/views/linkset.vue
+37
-22
form.vue
src/views/smart/project/form.vue
+15
-0
No files found.
config/dev.env.js
View file @
886781b9
...
...
@@ -4,8 +4,8 @@ const prodEnv = require('./prod.env')
module
.
exports
=
merge
(
prodEnv
,
{
NODE_ENV
:
'
"development"
'
,
// BASE_API: '"http://192.168.3.188
:8086"'
BASE_API
:
'
"http://jingkongyun.com:8000"
'
BASE_API
:
'
"http://192.168.3.23
:8086"
'
//
BASE_API: '"http://jingkongyun.com:8000"'
// BASE_API: '"https://api.auauz.net"'
})
src/api/common.js
View file @
886781b9
...
...
@@ -6,29 +6,37 @@ export const HttpReq = {
backstageApi
:
{
getLinkSrcList
:
function
(
params
)
{
return
request
({
url
:
'
word/getAll
?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
url
:
'
api/hyperLink
?
'
+
qs
.
stringify
(
params
,
{
indices
:
false
}),
method
:
'
get
'
})
},
updateLinkSrc
:
function
(
data
)
{
return
request
({
url
:
'
word/updateIfUp
'
,
method
:
'
p
os
t
'
,
url
:
'
api/hyperLink
'
,
method
:
'
p
u
t
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
// 获取所有软件工具
addLinkSrc
:
function
(
data
)
{
return
request
({
url
:
'
word/add
'
,
url
:
'
api/hyperLink
'
,
method
:
'
post
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
deleteLinkSrc
:
function
(
data
)
{
return
request
({
url
:
'
api/hyperLink
'
,
method
:
'
delete
'
,
data
:
data
}).
then
((
res
)
=>
{
return
res
})
},
api
:
null
},
// web端接口列表
...
...
src/views/daping.vue
View file @
886781b9
...
...
@@ -387,6 +387,116 @@ export default {
/* eslint-enable */
},
initChart1
()
{
this
.
chart1
=
echarts
.
init
(
this
.
$refs
.
chart1
,
'
macarons
'
)
const
dataX
=
[
'
1号基地
'
,
'
2号基地
'
,
'
3号基地
'
,
'
4号基地
'
,
'
5号基地
'
]
const
option
=
{
tooltip
:
{
trigger
:
'
item
'
,
formatter
:
(
params
,
ticket
,
callback
)
=>
{
return
params
.
value
+
'
人
'
}
},
grid
:
{
left
:
'
0
'
,
right
:
'
0
'
,
top
:
'
8px
'
,
bottom
:
'
0
'
,
containLabel
:
true
},
xAxis
:
[
{
type
:
'
category
'
,
axisLine
:
{
show
:
false
,
lineStyle
:
{
color
:
'
#666
'
}
},
axisTick
:
{
show
:
false
},
axisLabel
:
{
color
:
'
#BFF7FF
'
},
data
:
dataX
}
],
yAxis
:
[
{
type
:
'
value
'
,
axisLine
:
{
show
:
false
,
lineStyle
:
{
color
:
'
#666
'
}
},
axisTick
:
{
show
:
false
},
axisLabel
:
{
color
:
'
#BFF7FF
'
},
splitLine
:
{
show
:
true
,
lineStyle
:
{
color
:
'
#ffffff33
'
}
}
}
],
dataZoom
:
[
{
type
:
'
inside
'
}
],
series
:
[
{
name
:
'
男
'
,
type
:
'
bar
'
,
barWidth
:
15
,
itemStyle
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
offset
:
0
,
color
:
'
#ffffff
'
},
{
offset
:
1
,
color
:
'
#00ffff
'
}
])
},
emphasis
:
{
itemStyle
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
offset
:
0
,
color
:
'
#ffffff
'
},
{
offset
:
0.35
,
color
:
'
#ffffff
'
},
{
offset
:
1
,
color
:
'
#00ffff
'
}
])
}
},
data
:
utils
.
randNum
(
25
,
40
,
dataX
.
length
,
true
)
},
{
name
:
'
女
'
,
type
:
'
bar
'
,
barWidth
:
15
,
itemStyle
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
offset
:
0
,
color
:
'
#ffffff
'
},
{
offset
:
1
,
color
:
'
#f1f155
'
}
])
},
emphasis
:
{
itemStyle
:
{
color
:
new
echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
offset
:
0
,
color
:
'
#ffffff
'
},
{
offset
:
0.35
,
color
:
'
#ffffff
'
},
{
offset
:
1
,
color
:
'
#f1f155
'
}
])
}
},
data
:
utils
.
randNum
(
10
,
30
,
dataX
.
length
,
true
)
}
]
}
this
.
chart1
.
setOption
(
option
)
},
_initChart1
()
{
this
.
chart1
=
echarts
.
init
(
this
.
$refs
.
chart1
,
'
macarons
'
)
const
count
=
24
const
dataX
=
[]
...
...
src/views/linkset.vue
View file @
886781b9
...
...
@@ -16,8 +16,12 @@
<!--表格渲染-->
<el-table
v-loading=
"loading"
:data=
"tableData"
size=
"small"
style=
"width: 100%;"
>
<el-table-column
:index=
"indexMethod"
type=
"index"
width=
"55"
label=
"序号"
align=
"center"
/>
<el-table-column
prop=
"linkName"
label=
"超链接名称"
min-width=
"130%"
/>
<el-table-column
prop=
"linkUrl"
label=
"超链接地址"
min-width=
"130%"
/>
<el-table-column
prop=
"hyperlinkName"
label=
"超链接名称"
min-width=
"130%"
/>
<el-table-column
prop=
"hyperlinkUrl"
label=
"超链接地址"
min-width=
"130%"
>
<template
slot-scope=
"scope"
>
<a
:href=
"scope.row.hyperlinkUrl"
:title=
"'点击跳转到'+scope.row.hyperlinkUrl"
class=
"touch link-text"
target=
"_blank"
>
{{
scope
.
row
.
hyperlinkUrl
}}
</a>
</
template
>
</el-table-column>
<el-table-column
v-if=
"checkPermission(['ADMIN','SDEVICE_ALL','SDEVICE_EDIT','SDEVICE_DELETE'])"
label=
"操作"
width=
"150px"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-button
v-permission=
"['ADMIN','SDEVICE_ALL','SDEVICE_EDIT']"
size=
"mini"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"edit(scope.row)"
/>
...
...
@@ -41,12 +45,12 @@
<!-- 表单渲染 -->
<el-dialog
:close-on-click-modal=
"false"
:before-close=
"cancelForm"
:visible.sync=
"visible"
append-to-body
title=
"超链接设置"
width=
"600px"
>
<el-form
ref=
"formViewRef"
:model=
"formData"
label-width=
"110px"
>
<el-form-item
label=
"超链接名称:"
prop=
"linkName"
>
<el-input
v-model=
"formData.linkName"
class=
"cell-input"
/>
<el-form-item
label=
"超链接名称:"
prop=
"
hyper
linkName"
>
<el-input
v-model=
"formData.
hyper
linkName"
class=
"cell-input"
/>
</el-form-item>
<br>
<el-form-item
label=
"超链接地址:"
prop=
"linkUrl"
>
<el-input
v-model=
"formData.linkUrl"
class=
"cell-input"
/>
<el-form-item
label=
"超链接地址:"
prop=
"
hyper
linkUrl"
>
<el-input
v-model=
"formData.
hyper
linkUrl"
class=
"cell-input"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
...
...
@@ -68,37 +72,43 @@ export default {
delLoading
:
false
,
visible
:
false
,
page
:
1
,
pageSize
:
10
,
pageSize
:
999
,
total
:
0
,
tableData
:
[],
formData
:
{
linkName
:
''
,
linkUrl
:
''
hyper
linkName
:
''
,
hyper
linkUrl
:
''
}
}
},
created
()
{
this
.
$nextTick
(()
=>
{
this
.
loadData
()
})
},
methods
:
{
checkPermission
,
indexMethod
(
index
)
{
return
1
+
index
+
this
.
page
*
this
.
pageSize
return
1
+
index
+
this
.
page
*
this
.
pageSize
-
this
.
pageSize
},
loadData
()
{
// 清除参数无值的情况
HttpReq
.
backstageApi
.
getLinkSrcList
({
pageNum
:
this
.
page
,
pageSize
:
this
.
pageSize
}).
then
((
res
)
=>
{
this
.
tableData
=
res
.
list
this
.
total
=
res
.
totalCount
HttpReq
.
backstageApi
.
getLinkSrcList
({}).
then
((
res
)
=>
{
this
.
tableData
=
res
.
data
.
records
this
.
total
=
res
.
data
.
total
})
},
subDelete
(
item
)
{
this
.
delLoading
=
true
HttpReq
.
backstageApi
.
deleteLinkSrc
({
id
:
item
.
id
}).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
message
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
})
if
(
res
.
code
===
200
)
{
this
.
loadData
()
}
})
},
pageChange
(
e
)
{
this
.
page
=
e
...
...
@@ -112,14 +122,14 @@ export default {
cancelForm
()
{
this
.
visible
=
false
this
.
formData
=
{
linkName
:
''
,
linkUrl
:
''
hyper
linkName
:
''
,
hyper
linkUrl
:
''
}
this
.
loadData
()
},
submitForm
()
{
if
(
this
.
formData
.
id
)
{
HttpReq
.
backstageApi
.
update
Weixinlink
(
this
.
formData
).
then
((
res
)
=>
{
HttpReq
.
backstageApi
.
update
LinkSrc
(
this
.
formData
).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
message
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
...
...
@@ -130,7 +140,7 @@ export default {
}
})
}
else
{
HttpReq
.
backstageApi
.
add
Weixinlink
(
this
.
formData
).
then
((
res
)
=>
{
HttpReq
.
backstageApi
.
add
LinkSrc
(
this
.
formData
).
then
((
res
)
=>
{
this
.
$notify
({
title
:
res
.
message
,
type
:
res
.
code
===
200
?
'
success
'
:
'
error
'
...
...
@@ -154,5 +164,10 @@ export default {
</
script
>
<
style
scoped
>
.touch
{
cursor
:
pointer
;
}
.link-text
{
color
:
#1482f0
;
}
</
style
>
src/views/smart/project/form.vue
View file @
886781b9
...
...
@@ -46,6 +46,15 @@
<el-form-item
label=
"地址"
>
<el-input
v-model=
"form.msg9"
style=
"width: 470px;"
/>
</el-form-item>
<el-form-item
label=
"男职工数"
>
<el-input
v-model=
"form.manNum"
style=
"width: 470px;"
/>
</el-form-item>
<el-form-item
label=
"女职工数"
>
<el-input
v-model=
"form.womanNum"
style=
"width: 470px;"
/>
</el-form-item>
<el-form-item
label=
"项目描述"
>
<el-input
v-model=
"form.projectIntroduction"
:rows=
"4"
type=
"textarea"
style=
"width: 470px;"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"text"
@
click=
"cancel"
>
取消
</el-button>
...
...
@@ -81,6 +90,9 @@ export default {
videoadr
:
''
,
createTime
:
''
,
updateTime
:
''
,
manNum
:
''
,
womanNum
:
''
,
projectIntroduction
:
''
,
nt
:
''
},
rules
:
{
...
...
@@ -152,6 +164,9 @@ export default {
videoadr
:
''
,
createTime
:
''
,
updateTime
:
''
,
manNum
:
''
,
womanNum
:
''
,
projectIntroduction
:
''
,
nt
:
''
}
}
...
...
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