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
18620858
Commit
18620858
authored
Sep 26, 2022
by
mahui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
c4240747
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
101 additions
and
16 deletions
+101
-16
site-detail.vue
pc/src/views/site-detail.vue
+25
-2
page.js
web/src/utils/page.js
+1
-1
qshToilet.vue
web/src/view/qshToilet/qshToilet.vue
+75
-13
No files found.
pc/src/views/site-detail.vue
View file @
18620858
...
@@ -132,6 +132,18 @@
...
@@ -132,6 +132,18 @@
<div
class=
"cell"
>
{{
item
.
CreatedAt
}}
</div>
<div
class=
"cell"
>
{{
item
.
CreatedAt
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"page"
style=
"flex-shrink: 0;display: flex;justify-content: center"
>
<el-pagination
v-model:currentPage=
"list.page"
v-model:page-size=
"list.pageSize"
:page-sizes=
"[5, 10, 15, 20]"
:small=
"small"
layout=
"sizes, prev, pager, next"
:total=
"list.total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
/>
</div>
</div>
</div>
</div>
</div>
<div
class=
"body-one monitor"
v-else-if=
"tab=='monitor'"
>
<div
class=
"body-one monitor"
v-else-if=
"tab=='monitor'"
>
...
@@ -414,7 +426,7 @@
...
@@ -414,7 +426,7 @@
list
:{
list
:{
page
:
1
,
page
:
1
,
pageSize
:
15
,
pageSize
:
15
,
total
:
2
0
,
total
:
0
,
data
:[
data
:[
]
]
...
@@ -469,6 +481,8 @@
...
@@ -469,6 +481,8 @@
state
.
tab
=
item
.
value
;
state
.
tab
=
item
.
value
;
state
.
list
.
data
=
[];
state
.
list
.
data
=
[];
state
.
list
.
page
=
1
;
state
.
list
.
page
=
1
;
state
.
list
.
pageSize
=
15
;
state
.
list
.
total
=
0
;
if
(
item
.
value
==
'base'
){
if
(
item
.
value
==
'base'
){
initGauge
();
initGauge
();
getYewei
();
getYewei
();
...
@@ -670,6 +684,13 @@
...
@@ -670,6 +684,13 @@
return
{
text
:
'...'
,
color
:
'#f78131'
};
return
{
text
:
'...'
,
color
:
'#f78131'
};
}
}
}
}
const
handleSizeChange
=
(
val
)
=>
{
state
.
list
.
pageSize
=
val
;
getHistoryDataList
();
};
const
handleCurrentChange
=
(
val
)
=>
{
getHistoryDataList
(
val
);
};
onMounted
(()
=>
{
onMounted
(()
=>
{
getDetail
();
getDetail
();
initGauge
();
initGauge
();
...
@@ -683,7 +704,9 @@
...
@@ -683,7 +704,9 @@
getOrderList
,
getOrderList
,
getHistoryDataList
,
getHistoryDataList
,
seeDetail
,
seeDetail
,
wcTypeChange
wcTypeChange
,
handleSizeChange
,
handleCurrentChange
}
}
},
},
components
:
{
components
:
{
...
...
web/src/utils/page.js
View file @
18620858
...
@@ -3,7 +3,7 @@ import config from '@/core/config'
...
@@ -3,7 +3,7 @@ import config from '@/core/config'
export
default
function
getPageTitle
(
pageTitle
,
route
)
{
export
default
function
getPageTitle
(
pageTitle
,
route
)
{
if
(
pageTitle
)
{
if
(
pageTitle
)
{
const
title
=
fmtTitle
(
pageTitle
,
route
)
const
title
=
fmtTitle
(
pageTitle
,
route
)
return
`
${
title
}
-
${
config
.
appName
}
`
return
`
${
title
}
-
公厕监控后台
`
}
}
return
`
${
config
.
appName
}
`
return
`
${
config
.
appName
}
`
}
}
web/src/view/qshToilet/qshToilet.vue
View file @
18620858
...
@@ -81,29 +81,30 @@
...
@@ -81,29 +81,30 @@
</div>
</div>
</div>
</div>
<el-dialog
v-model=
"dialogFormVisible"
:before-close=
"closeDialog"
title=
"公厕详情"
>
<el-dialog
v-model=
"dialogFormVisible"
:before-close=
"closeDialog"
title=
"公厕详情"
>
<el-form
:model=
"formData"
label-position=
"right"
label-width=
"120px"
>
<el-form
:model=
"formData"
label-position=
"right"
label-width=
"120px"
<el-form-item
label=
"点位名称:"
>
:rules=
"rules"
>
<el-form-item
label=
"点位名称:"
prop=
"name"
>
<el-input
v-model=
"formData.name"
clearable
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.name"
clearable
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"公厕类型:"
>
<el-form-item
label=
"公厕类型:"
prop=
"type"
>
<el-select
v-model=
"formData.type"
placeholder=
"请选择"
style=
"width:100%"
clearable
>
<el-select
v-model=
"formData.type"
placeholder=
"请选择"
style=
"width:100%"
clearable
>
<el-option
v-for=
"(item,key) in typeOptions"
:key=
"key"
:label=
"item.label"
<el-option
v-for=
"(item,key) in typeOptions"
:key=
"key"
:label=
"item.label"
:value=
"item.value"
/>
:value=
"item.value"
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"公厕地址:"
>
<el-form-item
label=
"公厕地址:"
prop=
"address"
>
<el-input
v-model=
"formData.address"
type=
"textarea"
resize=
"none"
clearable
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.address"
type=
"textarea"
resize=
"none"
clearable
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"展示图片:"
>
<el-form-item
label=
"展示图片:"
prop=
"showImage"
>
<new-upload
v-if=
"dialogFormVisible"
:list=
"[formData.showImage]"
@
upload=
"(file)=>formData.showImage = file[0]"
></new-upload>
<new-upload
v-if=
"dialogFormVisible"
:list=
"[formData.showImage]"
@
upload=
"(file)=>formData.showImage = file[0]"
></new-upload>
</el-form-item>
</el-form-item>
<el-form-item
label=
"轮播图片:"
>
<el-form-item
label=
"轮播图片:"
prop=
"image"
>
<new-upload
v-if=
"dialogFormVisible"
:limit=
"9"
:list=
"formData.image?formData.image.split(','):[]"
@
upload=
"(file)=>formData.image = file.join(',')"
:multiply=
"true"
></new-upload>
<new-upload
v-if=
"dialogFormVisible"
:limit=
"9"
:list=
"formData.image?formData.image.split(','):[]"
@
upload=
"(file)=>formData.image = file.join(',')"
:multiply=
"true"
></new-upload>
</el-form-item>
</el-form-item>
<el-form-item
label=
"纬度:"
>
<el-form-item
label=
"纬度:"
prop=
"lat"
>
<el-input
v-model=
"formData.lat"
clearable
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.lat"
clearable
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"经度:"
>
<el-form-item
label=
"经度:"
prop=
"lng"
>
<el-input
v-model=
"formData.lng"
clearable
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.lng"
clearable
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"管理人员:"
>
<el-form-item
label=
"管理人员:"
>
...
@@ -115,10 +116,10 @@
...
@@ -115,10 +116,10 @@
<el-form-item
label=
"监控账号:"
>
<el-form-item
label=
"监控账号:"
>
<el-input
v-model=
"formData.monitor_ac"
clearable
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.monitor_ac"
clearable
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"监控
ID
:"
>
<el-form-item
label=
"监控
设备编号
:"
>
<el-input
v-model=
"formData.monitor_id"
clearable
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.monitor_id"
clearable
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"
设备ID
:"
>
<el-form-item
label=
"
液位设备编号
:"
>
<el-input
v-model=
"formData.yewei_device"
clearable
placeholder=
"请输入"
/>
<el-input
v-model=
"formData.yewei_device"
clearable
placeholder=
"请输入"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -167,9 +168,49 @@
...
@@ -167,9 +168,49 @@
yewei_device
:
''
,
//设备ID
yewei_device
:
''
,
//设备ID
name
:
''
,
name
:
''
,
showImage
:
''
,
showImage
:
''
,
type
:
undefined
,
type
:
''
,
})
const
rules
=
ref
({
name
:
[
{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}
],
type
:
[
{
required
:
true
,
message
:
''
,
trigger
:
'change'
,
},
],
address
:
[
{
required
:
true
,
message
:
''
,
trigger
:
'blur'
,
},
],
showImage
:
[
{
type
:
'date'
,
required
:
true
,
message
:
''
,
trigger
:
'change'
,
},
],
image
:
[
{
type
:
'date'
,
required
:
true
,
message
:
''
,
trigger
:
'change'
,
},
],
lat
:
[
{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}
],
lng
:
[
{
required
:
true
,
message
:
''
,
trigger
:
'blur'
}
],
})
})
// =========== 表格控制部分 ===========
// =========== 表格控制部分 ===========
const
page
=
ref
(
1
)
const
page
=
ref
(
1
)
const
total
=
ref
(
0
)
const
total
=
ref
(
0
)
...
@@ -328,12 +369,33 @@
...
@@ -328,12 +369,33 @@
yewei_device
:
''
,
//设备ID
yewei_device
:
''
,
//设备ID
name
:
''
,
name
:
''
,
showImage
:
''
,
showImage
:
''
,
type
:
undefined
,
type
:
''
,
}
}
}
}
// 弹窗确定
// 弹窗确定
const
enterDialog
=
async
()
=>
{
const
enterDialog
=
async
()
=>
{
let
res
let
res
if
(
!
formData
.
value
.
name
){
return
ElMessage
({
message
:
'请填写公厕名称'
,
type
:
'warning'
})
}
if
(
!
formData
.
value
.
type
){
return
ElMessage
({
message
:
'请选择公厕类型'
,
type
:
'warning'
})
}
if
(
!
formData
.
value
.
address
){
return
ElMessage
({
message
:
'请填写公厕地址'
,
type
:
'warning'
})
}
if
(
!
formData
.
value
.
showImage
){
return
ElMessage
({
message
:
'请上传展示图片'
,
type
:
'warning'
})
}
if
(
!
formData
.
value
.
image
){
return
ElMessage
({
message
:
'请上传轮播图片'
,
type
:
'warning'
})
}
if
(
!
formData
.
value
.
lat
){
return
ElMessage
({
message
:
'请填写经度'
,
type
:
'warning'
})
}
if
(
!
formData
.
value
.
lng
){
return
ElMessage
({
message
:
'请填写纬度'
,
type
:
'warning'
})
}
switch
(
type
.
value
)
{
switch
(
type
.
value
)
{
case
'create'
:
case
'create'
:
res
=
await
createQshToilet
(
formData
.
value
)
res
=
await
createQshToilet
(
formData
.
value
)
...
...
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