Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qsh-wc
Project
Project
Details
Activity
Releases
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
honghuiliu
qsh-wc
Commits
f6cf64b0
Commit
f6cf64b0
authored
Sep 07, 2022
by
sven
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
9904bbeb
d86393b3
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
182 additions
and
171 deletions
+182
-171
site-detail.vue
pc/src/views/site-detail.vue
+101
-97
login.go
server/api/v1/web/login.go
+2
-1
toilet.go
server/api/v1/web/toilet.go
+2
-1
config-prod.yaml
server/config-prod.yaml
+1
-0
config-test.yaml
server/config-test.yaml
+1
-0
config.yaml
server/config.yaml
+1
-0
mobile_check.go
server/middleware/mobile_check.go
+2
-1
patrol.go
server/request/patrol.go
+1
-0
toilet.go
server/request/toilet.go
+1
-1
qsh_partol.go
server/service/admin/qsh_partol.go
+3
-0
patrolService.go
server/service/web/patrolService.go
+4
-1
toiletService.go
server/service/web/toiletService.go
+2
-1
index.vue
web/src/view/error/index.vue
+0
-2
person.vue
web/src/view/person/person.vue
+42
-63
qshPartol.vue
web/src/view/qshPartol/qshPartol.vue
+19
-3
No files found.
pc/src/views/site-detail.vue
View file @
f6cf64b0
...
...
@@ -325,7 +325,7 @@
{
name
:
'液位'
,
prop
:
'a1'
,
value
:
0
,
value
:
0
.7
,
unit
:
'm'
,
color
:
'#09a8ae'
,
create_time
:
'2022-09-01 10:00'
...
...
@@ -333,7 +333,7 @@
{
name
:
'调解池流量'
,
prop
:
'a2'
,
value
:
0
,
value
:
1
,
unit
:
'm^3/h'
,
color
:
'#ff6b6b'
,
create_time
:
'2022-09-01 10:00'
...
...
@@ -341,7 +341,7 @@
{
name
:
'出水池流量'
,
prop
:
'a3'
,
value
:
0
,
value
:
1
,
unit
:
'm^3/h'
,
color
:
'#946fd0'
,
create_time
:
'2022-09-01 10:00'
...
...
@@ -349,7 +349,7 @@
{
name
:
'厌氧池PH值'
,
prop
:
'a4'
,
value
:
0
,
value
:
8
,
unit
:
''
,
color
:
'#3396fb'
,
create_time
:
'2022-09-01 10:00'
...
...
@@ -357,7 +357,7 @@
{
name
:
'好氧池PH值'
,
prop
:
'a5'
,
value
:
0
,
value
:
8
,
unit
:
''
,
color
:
'#28ae09'
,
create_time
:
'2022-09-01 10:00'
...
...
@@ -365,7 +365,7 @@
{
name
:
'出水池PH值'
,
prop
:
'a6'
,
value
:
0
,
value
:
8
,
unit
:
''
,
color
:
'#ffc019'
,
create_time
:
'2022-09-01 10:00'
...
...
@@ -373,7 +373,7 @@
{
name
:
'好氧池DO值'
,
prop
:
'a7'
,
value
:
0
,
value
:
1
,
unit
:
'mg/l'
,
color
:
'#f8893f'
,
create_time
:
'2022-09-01 10:00'
...
...
@@ -381,7 +381,7 @@
{
name
:
'MBR池DO值'
,
prop
:
'a8'
,
value
:
0
,
value
:
1
,
unit
:
'mg/l'
,
color
:
'#eb509d'
,
create_time
:
'2022-09-01 10:00'
...
...
@@ -457,98 +457,100 @@
}
function
initGauge
(){
nextTick
(()
=>
{
state
.
myChart
=
echarts
.
init
(
chart
.
value
);
let
option
=
{
series
:
[
{
type
:
'gauge'
,
progress
:
{
show
:
true
,
width
:
18
,
setTimeout
(()
=>
{
state
.
myChart
=
echarts
.
init
(
chart
.
value
);
let
option
=
{
series
:
[
{
type
:
'gauge'
,
progress
:
{
show
:
true
,
width
:
18
,
itemStyle
:{
color
:
'#3396fb'
,
}
},
pointer
:
{
icon
:
'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z'
,
width
:
4
,
length
:
'60%'
,
offsetCenter
:
[
0
,
'8%'
]
},
itemStyle
:{
color
:
'#3396fb'
,
}
},
pointer
:
{
icon
:
'path://M2.9,0.7L2.9,0.7c1.4,0,2.6,1.2,2.6,2.6v115c0,1.4-1.2,2.6-2.6,2.6l0,0c-1.4,0-2.6-1.2-2.6-2.6V3.3C0.3,1.9,1.4,0.7,2.9,0.7z'
,
width
:
4
,
length
:
'60%'
,
offsetCenter
:
[
0
,
'8%'
]
},
itemStyle
:{
color
:
'#3396fb'
},
axisLine
:
{
lineStyle
:
{
width
:
18
}
},
axisTick
:
{
show
:
true
,
distance
:
0
,
},
splitLine
:
{
distance
:
5
,
length
:
8
,
lineStyle
:
{
width
:
1
,
color
:
'#999'
}
},
axisLabel
:
{
distance
:
22
,
color
:
'#999'
,
fontSize
:
12
},
anchor
:
{
show
:
true
,
showAbove
:
true
,
size
:
20
,
itemStyle
:
{
borderWidth
:
4
,
borderColor
:
'#3396fb'
,
color
:
'#fff'
,
}
},
title
:
{
show
:
false
},
detail
:
{
valueAnimation
:
true
,
fontSize
:
24
,
offsetCenter
:
[
0
,
'70%'
],
formatter
(
p
){
return
`{a|
${
p
}
m}\n{b|液位}`
color
:
'#3396fb'
},
rich
:
{
a
:
{
color
:
'#333'
,
lineHeight
:
20
,
fontSize
:
18
axisLine
:
{
lineStyle
:
{
width
:
18
}
},
axisTick
:
{
show
:
true
,
distance
:
0
,
},
splitLine
:
{
distance
:
5
,
length
:
8
,
lineStyle
:
{
width
:
1
,
color
:
'#999'
}
},
axisLabel
:
{
distance
:
22
,
color
:
'#999'
,
fontSize
:
12
},
anchor
:
{
show
:
true
,
showAbove
:
true
,
size
:
20
,
itemStyle
:
{
borderWidth
:
4
,
borderColor
:
'#3396fb'
,
color
:
'#fff'
,
}
},
title
:
{
show
:
false
},
detail
:
{
valueAnimation
:
true
,
fontSize
:
24
,
offsetCenter
:
[
0
,
'70%'
],
formatter
(
p
){
return
`{a|
${
p
}
m}\n{b|液位}`
},
b
:
{
color
:
'#666'
,
lineHeight
:
20
,
fontSize
:
14
rich
:
{
a
:
{
color
:
'#333'
,
lineHeight
:
20
,
fontSize
:
18
},
b
:
{
color
:
'#666'
,
lineHeight
:
20
,
fontSize
:
14
}
}
}
},
data
:
[
{
value
:
state
.
detail
.
yewei
}
]
,
radius
:
"95%"
,
startAngle
:
21
0
,
endAngle
:
-
30
,
max
:
1
}
]
}
;
state
.
myChart
.
clear
(
);
state
.
myChart
.
setOption
(
option
);
state
.
myChart
.
resize
();
}
,
data
:
[
{
value
:
state
.
detail
.
yewei
}
],
radius
:
"95%"
,
startAngle
:
210
,
endAngle
:
-
3
0
,
max
:
1
}
]
};
state
.
myChart
.
clear
()
;
state
.
myChart
.
setOption
(
option
);
state
.
myChart
.
resize
(
);
},
500
)
})
}
function
getList
(){
...
...
@@ -558,8 +560,9 @@
let
p
=
{
page
:
page
,
page_size
:
state
.
list
.
pageSize
,
toilet_id
:
props
.
site_id
};
if
(
state
.
filter
.
time_order
[
0
]
&&
state
.
filter
.
time_order
[
1
]){
if
(
state
.
filter
.
time_order
&&
state
.
filter
.
time_order
[
0
]
&&
state
.
filter
.
time_order
[
1
]){
p
.
start_time
=
state
.
filter
.
time_order
[
0
];
p
.
end_time
=
state
.
filter
.
time_order
[
1
];
}
...
...
@@ -834,6 +837,7 @@
align-items: center;
margin-right: 55px;
.filter-name{
flex-shrink: 0;
color: #666;
margin-right: 20px;
}
...
...
server/api/v1/web/login.go
View file @
f6cf64b0
...
...
@@ -29,7 +29,8 @@ func Login(c *gin.Context) {
u
:=
&
system
.
SysUser
{
Username
:
l
.
Username
,
Password
:
l
.
Password
}
key
:=
ghelp
.
Md5
(
ghelp
.
CreateUnique
())
prefixKey
:=
"qsh_wc:"
+
key
prefix
:=
global
.
GVA_VP
.
GetString
(
"redis.prefix"
)
prefixKey
:=
prefix
+
key
if
user
,
err
:=
userService
.
Login
(
u
);
err
!=
nil
{
global
.
GVA_LOG
.
Error
(
"登陆失败! 用户名不存在或者密码错误!"
,
zap
.
Error
(
err
))
response
.
FailWithMessage
(
"用户名不存在或者密码错误"
,
c
)
...
...
server/api/v1/web/toilet.go
View file @
f6cf64b0
package
web
import
(
"fmt"
"gitee.com/zjlsliupei/ghelp"
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
"github.com/flipped-aurora/gin-vue-admin/server/request"
...
...
@@ -29,7 +30,7 @@ func GetToiletList(c *gin.Context) {
func
GetToiletDetail
(
c
*
gin
.
Context
)
{
var
arg
request
.
GetId
_
=
c
.
ShouldBindJSON
(
&
arg
)
fmt
.
Println
(
c
.
ShouldBindJSON
(
&
arg
))
if
data
,
err
:=
toiletService
.
GetToiletDetail
(
arg
);
err
!=
nil
{
response
.
FailWithMessage
(
err
.
Error
(),
c
)
}
else
{
...
...
server/config-prod.yaml
View file @
f6cf64b0
...
...
@@ -118,6 +118,7 @@ qiniu:
secret-key
:
"
"
use-cdn-domains
:
false
redis
:
prefix
:
"
qsh_wc_prod:"
db
:
0
addr
:
"
r-bp1cm5ncyvq2hnul81.redis.rds.aliyuncs.com:6379"
password
:
"
rRk2k3nf9JJi283lk119Jvwz"
...
...
server/config-test.yaml
View file @
f6cf64b0
...
...
@@ -118,6 +118,7 @@ qiniu:
secret-key
:
"
"
use-cdn-domains
:
false
redis
:
prefix
:
"
qsh_wc:"
db
:
0
addr
:
"
r-bp1cm5ncyvq2hnul81.redis.rds.aliyuncs.com:6379"
password
:
"
rRk2k3nf9JJi283lk119Jvwz"
...
...
server/config.yaml
View file @
f6cf64b0
...
...
@@ -118,6 +118,7 @@ qiniu:
secret-key
:
"
"
use-cdn-domains
:
false
redis
:
prefix
:
"
qsh_wc:"
db
:
0
addr
:
"
r-bp1cm5ncyvq2hnul81pd.redis.rds.aliyuncs.com:16379"
password
:
"
rRk2k3nf9JJi283lk119Jvwz"
...
...
server/middleware/mobile_check.go
View file @
f6cf64b0
...
...
@@ -23,7 +23,8 @@ func Token() gin.HandlerFunc {
c
.
Abort
()
return
}
res
:=
global
.
GVA_REDIS
.
Get
(
c
,
"qsh_wc:"
+
token
)
prefix
:=
global
.
GVA_VP
.
GetString
(
"redis.prefix"
)
res
:=
global
.
GVA_REDIS
.
Get
(
c
,
prefix
+
token
)
if
res
.
Err
()
!=
nil
{
response
.
Result
(
1000
,
""
,
"token不存在"
,
c
)
...
...
server/request/patrol.go
View file @
f6cf64b0
...
...
@@ -7,6 +7,7 @@ type PatrolList struct {
StartTime
string
`json:"start_time"`
EndTime
string
`json:"end_time"`
Type
int
`json:"type"`
ToiletId
int
`json:"toilet_id"`
}
type
GetPatrolId
struct
{
...
...
server/request/toilet.go
View file @
f6cf64b0
...
...
@@ -7,5 +7,5 @@ type Toilet struct {
}
type
GetId
struct
{
ID
string
`json:"id"`
ID
int
`json:"id"`
}
server/service/admin/qsh_partol.go
View file @
f6cf64b0
...
...
@@ -60,6 +60,9 @@ func (qshPartolService *QshPartolService) GetQshPartolInfoList(info adminReq.Qsh
if
info
.
Type
!=
0
{
db
=
db
.
Where
(
"type = ?"
,
info
.
Type
)
}
if
info
.
ToiletId
!=
0
{
db
=
db
.
Where
(
"toilet_id = ?"
,
info
.
ToiletId
)
}
err
=
db
.
Count
(
&
total
)
.
Error
if
err
!=
nil
{
return
...
...
server/service/web/patrolService.go
View file @
f6cf64b0
...
...
@@ -28,11 +28,14 @@ func (l *PatrolService) GetPatrolList(arg request.PatrolList) ([]admin.QshPatrol
if
arg
.
Type
!=
0
{
db
.
Where
(
"type = ?"
,
arg
.
Type
)
}
if
arg
.
ToiletId
!=
0
{
db
.
Where
(
"toilet_id = ?"
,
arg
.
ToiletId
)
}
err
:=
db
.
Count
(
&
total
)
.
Error
if
err
!=
nil
{
return
patrolList
,
total
,
err
}
err
=
db
.
Limit
(
limit
)
.
Offset
(
offset
)
.
Preload
(
"Toilet"
)
.
Find
(
&
patrolList
)
.
Error
err
=
db
.
Debug
()
.
Limit
(
limit
)
.
Offset
(
offset
)
.
Preload
(
"Toilet"
)
.
Find
(
&
patrolList
)
.
Error
if
err
!=
nil
{
return
patrolList
,
total
,
err
}
...
...
server/service/web/toiletService.go
View file @
f6cf64b0
...
...
@@ -26,7 +26,8 @@ func (l *ToiletService) GetToiletList(toilet request.Toilet) ([]admin.QshToilet,
func
(
l
*
ToiletService
)
GetToiletDetail
(
toilet
request
.
GetId
)
(
admin
.
QshToilet
,
error
)
{
var
toiletInfo
admin
.
QshToilet
err
:=
global
.
GVA_DB
.
Model
(
toiletInfo
)
.
First
(
&
toiletInfo
)
.
Error
err
:=
global
.
GVA_DB
.
Model
(
toiletInfo
)
.
Where
(
"id = ?"
,
toilet
.
ID
)
.
First
(
&
toiletInfo
)
.
Error
if
err
!=
nil
{
return
toiletInfo
,
err
}
...
...
web/src/view/error/index.vue
View file @
f6cf64b0
...
...
@@ -5,8 +5,6 @@
<img
src=
"../../assets/notFound.png"
>
<p>
页面被神秘力量吸走了(如果您是开源版请联系我们修复)
</p>
<p
style=
"font-size:18px;line-height:40px;"
>
常见问题为当前此角色无当前路由,如果确定要使用本路由,请到角色管理进行分配
</p>
<p>
↓
</p>
<img
src=
"../../assets/qm.png"
class=
"leftPic"
>
</div>
</div>
</div>
...
...
web/src/view/person/person.vue
View file @
f6cf64b0
...
...
@@ -41,48 +41,48 @@
</p>
<p
class=
"person-info"
>
这个家伙很懒,什么都没有留下
</p>
</div>
<
div
class=
"user-information"
>
<
ul
>
<
li
>
<
el-icon
>
<
user
/
>
<
/el-icon
>
{{
userStore
.
userInfo
.
nickName
}}
<
/li
>
<
el-tooltip
class=
"item"
effect=
"light"
content=
"北京反转极光科技有限公司-技术部-前端事业群"
placement=
"top"
>
<
li
>
<
el-icon
>
<
data-analysis
/
>
<
/el-icon
>
北京反转极光科技有限公司-技术部-前端事业群
<
/li
>
<
/el-tooltip
>
<
li
>
<
el-icon
>
<
video-camera
/
>
<
/el-icon
>
中国·北京市·朝阳区
<
/li
>
<
el-tooltip
class=
"item"
effect=
"light"
content=
"GoLang/JavaScript/Vue/Gorm"
placement=
"top"
>
<
li
>
<
el-icon
>
<
medal
/
>
<
/el-icon
>
GoLang/JavaScript/Vue/Gorm
<
/li
>
<
/el-tooltip
>
<
/ul
>
<
/div
>
<
!--
<div
class=
"user-information"
>
--
>
<
!--
<ul>
--
>
<
!--
<li>
--
>
<
!--
<el-icon>
--
>
<
!--
<user
/>
--
>
<
!--
</el-icon>
--
>
<!--
{{
userStore
.
userInfo
.
nickName
}}
-->
<
!--
</li>
--
>
<
!--
<el-tooltip-->
<!--class="item"-->
<!--effect="light"-->
<!--content="北京反转极光科技有限公司-技术部-前端事业群"-->
<!--placement="top"-->
<!-->--
>
<
!--
<li>
--
>
<
!--
<el-icon>
--
>
<
!--
<data-analysis
/>
--
>
<
!--
</el-icon>
--
>
<!--北京反转极光科技有限公司-技术部-前端事业群-->
<
!--
</li>
--
>
<
!--
</el-tooltip>
--
>
<
!--
<li>
--
>
<
!--
<el-icon>
--
>
<
!--
<video-camera
/>
--
>
<
!--
</el-icon>
--
>
<!--中国·北京市·朝阳区-->
<
!--
</li>
--
>
<
!--
<el-tooltip-->
<!--class="item"-->
<!--effect="light"-->
<!--content="GoLang/JavaScript/Vue/Gorm"-->
<!--placement="top"-->
<!-->--
>
<
!--
<li>
--
>
<
!--
<el-icon>
--
>
<
!--
<medal
/>
--
>
<
!--
</el-icon>
--
>
<!--GoLang/JavaScript/Vue/Gorm-->
<
!--
</li>
--
>
<
!--
</el-tooltip>
--
>
<
!--
</ul>
--
>
<
!--
</div>
--
>
</div>
</div>
</el-col>
...
...
@@ -91,27 +91,6 @@
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"账号绑定"
name=
"second"
>
<ul>
<li>
<p
class=
"title"
>
密保手机
</p>
<p
class=
"desc"
>
已绑定手机:
{{
userStore
.
userInfo
.
phone
}}
<a
href=
"javascript:void(0)"
@
click=
"changePhoneFlag = true"
>
立即修改
</a>
</p>
</li>
<li>
<p
class=
"title"
>
密保邮箱
</p>
<p
class=
"desc"
>
已绑定邮箱:
{{
userStore
.
userInfo
.
email
}}
<a
href=
"javascript:void(0)"
@
click=
"changeEmailFlag = true"
>
立即修改
</a>
</p>
</li>
<li>
<p
class=
"title"
>
密保问题
</p>
<p
class=
"desc"
>
未设置密保问题
<a
href=
"javascript:void(0)"
>
去设置
</a>
</p>
</li>
<li>
<p
class=
"title"
>
修改密码
</p>
<p
class=
"desc"
>
...
...
web/src/view/qshPartol/qshPartol.vue
View file @
f6cf64b0
...
...
@@ -5,6 +5,12 @@
<el-form-item
label=
"工单标题"
>
<el-input
v-model=
"searchInfo.title"
placeholder=
"搜索条件"
/>
</el-form-item>
<el-form-item
label=
"公厕名称"
>
<el-select
v-model=
"searchInfo.toiletId"
placeholder=
"请选择"
style=
"width:100%"
clearable
>
<el-option
v-for=
"(item,key) in toiletList"
:key=
"key"
:label=
"item.name"
:value=
"item.ID"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"巡检类型"
prop=
"type"
>
<el-select
v-model=
"searchInfo.type"
clearable
placeholder=
"请选择"
@
clear=
"()=>
{searchInfo.type=undefined}">
...
...
@@ -52,7 +58,9 @@
</el-table-column>
<el-table-column
align=
"left"
label=
"异常描述"
prop=
"description"
min-width=
"180"
/>
<el-table-column
align=
"left"
label=
"巡视人"
prop=
"partolName"
min-width=
"120"
/>
<el-table-column
align=
"left"
label=
"巡检公厕"
prop=
"toiletId"
min-width=
"120"
/>
<el-table-column
align=
"left"
label=
"巡检公厕"
prop=
"toiletId"
min-width=
"180"
>
<
template
#
default=
"scope"
>
{{
toiletList
.
find
(
one
=>
one
.
ID
==
scope
.
row
.
toiletId
)?.
name
||
'--'
}}
</
template
>
</el-table-column>
<el-table-column
align=
"left"
label=
"创建时间"
min-width=
"180"
>
<
template
#
default=
"scope"
>
{{
formatDate
(
scope
.
row
.
CreatedAt
)
}}
</
template
>
</el-table-column>
...
...
@@ -228,11 +236,19 @@
const
pageSize
=
ref
(
10
)
const
tableData
=
ref
([])
const
toiletList
=
ref
([])
const
searchInfo
=
ref
({})
const
searchInfo
=
ref
({
title
:
''
,
toiletId
:
''
,
type
:
''
,
})
// 重置
const
onReset
=
()
=>
{
searchInfo
.
value
=
{}
searchInfo
.
value
=
{
title
:
''
,
toiletId
:
''
,
type
:
''
,
}
}
// 搜索
...
...
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