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
768dc41f
Commit
768dc41f
authored
Sep 02, 2022
by
mahui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
b335d09e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
128 additions
and
136 deletions
+128
-136
getData.js
pc/src/api/getData.js
+4
-4
index.js
pc/src/api/methods/index.js
+5
-1
home.vue
pc/src/views/home.vue
+52
-41
login.vue
pc/src/views/login.vue
+1
-2
order-detail.vue
pc/src/views/order-detail.vue
+15
-9
site-detail.vue
pc/src/views/site-detail.vue
+50
-78
vue.config.js
pc/vue.config.js
+1
-1
No files found.
pc/src/api/getData.js
View file @
768dc41f
...
...
@@ -69,11 +69,11 @@ function checkCode(res,url) {
}
export
default
{
post
(
url
,
data
,
config
=
{
'Content-Type'
:
'application/
x-www-form-urlencoded
; charset=UTF-8'
}){
post
(
url
,
data
,
config
=
{
'Content-Type'
:
'application/
json
; charset=UTF-8'
}){
let
record
=
id
;
if
(
list
.
indexOf
(
url
)
==-
1
){
let
token
=
myPublic
.
getStorage
(
'token'
);
config
[
'token'
]
=
token
;
let
token
=
myPublic
.
getStorage
(
'
qsh-wc-
token'
);
url
=
url
+
'?access_token='
+
token
;
}
console
.
log
(
`request`
,
record
,
url
+
' '
,
data
);
console
.
time
(
`request
${
record
}
`
);
...
...
@@ -82,7 +82,7 @@ export default {
method
:
'post'
,
baseURL
:
API_HOST
,
url
,
data
:
qs
.
stringify
(
data
),
data
:
JSON
.
stringify
(
data
),
headers
:
config
}).
then
(
response
=>
{
return
checkStatus
(
response
,
url
,
record
);
...
...
pc/src/api/methods/index.js
View file @
768dc41f
...
...
@@ -14,6 +14,10 @@ export default {
},
//工单列表
getPatrolList
(
params
)
{
return
http
.
post
(
'web/toilet/getPatrolList'
,
params
)
return
http
.
post
(
'web/patrol/getPatrolList'
,
params
)
},
//工单详情
getPatrolDetail
(
params
)
{
return
http
.
post
(
'web/patrol/getPatrolDetail'
,
params
)
}
}
pc/src/views/home.vue
View file @
768dc41f
...
...
@@ -47,41 +47,41 @@
site_id
:
''
,
time
:
myPublic
.
dateFormat
.
format
(
Date
.
now
(),
'HH:mm:ss YYYY年MM月DD日'
),
list
:[
{
longitude
:
119.779647
,
latitude
:
30.24369
,
name
:
'青山湖国家森林公园'
,
address
:
'浙江省杭州市临安区老圣园路北'
,
type
:
1
},
{
longitude
:
119.821796
,
latitude
:
30.254114
,
name
:
'青山湖街道'
,
address
:
'浙江省杭州市临安区'
,
type
:
1
},
{
longitude
:
119.790127
,
latitude
:
30.255317
,
name
:
'灵山'
,
address
:
'浙江省杭州市临安区'
,
type
:
2
},
{
longitude
:
119.852565
,
latitude
:
30.2528
,
name
:
'青山湖互通'
,
address
:
'浙江省杭州市临安区'
,
type
:
1
},
{
longitude
:
119.823904
,
latitude
:
30.24808
,
name
:
'青山中学'
,
address
:
'浙江省杭州市临安区'
,
type
:
1
},
//
{
//
longitude:119.779647,
//
latitude:30.24369,
//
name:'青山湖国家森林公园',
//
address:'浙江省杭州市临安区老圣园路北',
//
type:1
//
},
//
{
//
longitude:119.821796,
//
latitude:30.254114,
//
name:'青山湖街道',
//
address:'浙江省杭州市临安区',
//
type:1
//
},
//
{
//
longitude:119.790127,
//
latitude:30.255317,
//
name:'灵山',
//
address:'浙江省杭州市临安区',
//
type:2
//
},
//
{
//
longitude:119.852565,
//
latitude:30.2528,
//
name:'青山湖互通',
//
address:'浙江省杭州市临安区',
//
type:1
//
},
//
{
//
longitude:119.823904,
//
latitude:30.24808,
//
name:'青山中学',
//
address:'浙江省杭州市临安区',
//
type:1
//
},
]
});
const
user
=
computed
(()
=>
{
...
...
@@ -98,12 +98,23 @@
getList
();
}
function
getList
()
{
for
(
let
item
of
state
.
list
)
{
const
marker
=
new
BMapGL
.
Point
(
item
.
longitude
,
item
.
latitude
);
mapShow
(
marker
,
item
,
function
(
i
)
{
let
p
=
{
page
:
1
,
page_size
:
99
};
api
.
toiletList
(
p
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
if
(
Array
.
isArray
(
res
.
data
.
list
)){
state
.
list
=
[...
res
.
data
.
list
];
for
(
let
item
of
state
.
list
)
{
const
marker
=
new
BMapGL
.
Point
(
item
.
lng
,
item
.
lat
);
mapShow
(
marker
,
item
,
function
(
i
)
{
});
}
});
}
}
}
});
}
function
mapShow
(
coordinate
,
item
,
callBack
)
{
const
now
=
Date
.
now
();
...
...
@@ -172,8 +183,8 @@
}
}
function
seeDetail
(
item
){
state
.
site_id
=
item
.
ID
;
state
.
show
=
true
;
state
.
site_id
=
item
.
site_id
||
'12'
;
}
onMounted
(()
=>
{
nextTick
(()
=>
{
...
...
pc/src/views/login.vue
View file @
768dc41f
...
...
@@ -11,7 +11,7 @@
</div>
<div
class=
"row"
>
<span
class=
"icon icon-17"
></span>
<input
class=
"input"
type=
"password"
v-model=
"password"
placeholder=
"请输入密码"
/>
<input
class=
"input"
type=
"password"
v-model=
"password"
placeholder=
"请输入密码"
@
keyup
.
enter=
"submit"
/>
</div>
<div
class=
"opt"
>
<span
class=
"btn"
@
click=
"submit"
>
登录
</span>
...
...
@@ -57,7 +57,6 @@
if
(
res
.
data
){
myPublic
.
setStorage
(
"qsh-wc-token"
,
res
.
data
);
await
router
.
replace
({
path
:
"/home"
});
window
.
reload
();
}
}
})
...
...
pc/src/views/order-detail.vue
View file @
768dc41f
...
...
@@ -11,7 +11,7 @@
</div>
<div
class=
"row-one"
>
<span
class=
"row-name"
>
巡检公厕单位
</span>
<span
class=
"row-content"
>
{{
detail
.
name
}}
</span>
<span
class=
"row-content"
>
{{
detail
.
toiletId
}}
</span>
</div>
<div
class=
"row-one"
>
<span
class=
"row-name"
>
巡检类型
</span>
...
...
@@ -19,7 +19,7 @@
</div>
<div
class=
"row-one baseline"
>
<span
class=
"row-name"
>
巡检内容
</span>
<div
class=
"row-content"
>
<div
class=
"row-content"
v-if=
"detail.content"
>
<template
v-for=
"item in detail.content"
>
<div
class=
"check-one"
>
<el-checkbox
v-model=
"item.check"
:label=
"item.title"
size=
"large"
:disabled=
"true"
/>
...
...
@@ -44,11 +44,11 @@
</div>
<div
class=
"row-one"
>
<span
class=
"row-name"
>
站点巡检人
</span>
<span
class=
"row-content"
>
{{detail.
staff
}}
</span>
<span
class=
"row-content"
>
{{detail.
partolName
}}
</span>
</div>
<div
class=
"row-one"
>
<span
class=
"row-name"
>
提交时间
</span>
<span
class=
"row-content"
>
{{detail.
create_time
}}
</span>
<span
class=
"row-content"
>
{{detail.
CreatedAt
}}
</span>
</div>
</div>
</div>
...
...
@@ -60,6 +60,7 @@
import
{
ElMessage
}
from
"element-plus"
import
{
Close
}
from
"@element-plus/icons-vue"
import
api
from
"@/api/methods/index"
import
myPublic
from
"@/utils/public"
export
default
{
name
:
'order-detail'
,
emits
:
[
'update:modelValue'
],
...
...
@@ -76,10 +77,10 @@
setup
(
props
,
{
emit
})
{
const
state
=
reactive
({
detail
:
{
title
:
'
2022年6月22日公厕巡检工作
'
,
title
:
''
,
type
:
1
,
name
:
'
三号路公共厕所【GC-004】
'
,
staff
:
'罗小飞
'
,
name
:
''
,
partolName
:
'
'
,
content
:[
{
title
:
'检查格栅井'
,
...
...
@@ -148,7 +149,7 @@
],
description
:
'泵站清淤很多、泵站清淤很多、泵站清淤很多、泵站清淤很多、泵站清淤很多、泵站清淤很多、
\
n'
+
'泵站清淤很多。'
,
create_time
:
'2022-06-22 10:00'
CreatedAt
:
'2022-06-22 10:00'
},
typeList
:[
{
...
...
@@ -233,7 +234,12 @@
}
}
function
getDetail
(){
api
.
getPatrolDetail
({
id
:
props
.
order_id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
res
.
data
.
CreatedAt
=
myPublic
.
dateFormat
.
format
(
res
.
data
.
CreatedAt
)
Object
.
assign
(
state
.
detail
,{...
res
.
data
});
}
});
}
function
closeBox
(){
emit
(
'update:modelValue'
,
false
)
...
...
pc/src/views/site-detail.vue
View file @
768dc41f
...
...
@@ -31,7 +31,7 @@
点位名称
</div>
<div
class=
"table-content-cell cell"
>
{{
detail
.
name
}}
</div>
</div>
<div
class=
"table-row"
>
...
...
@@ -39,7 +39,7 @@
公厕类型
</div>
<div
class=
"table-content-cell cell"
>
{{
wcTypeChange
(
detail
.
type
).
text
}}
</div>
</div>
<div
class=
"table-row"
>
...
...
@@ -47,7 +47,7 @@
管理人员
</div>
<div
class=
"table-content-cell cell"
>
{{
detail
.
manager
}}
</div>
</div>
<div
class=
"table-row"
>
...
...
@@ -55,7 +55,7 @@
联系电话
</div>
<div
class=
"table-content-cell cell"
>
{{
detail
.
managerPhone
}}
</div>
</div>
<div
class=
"table-row"
>
...
...
@@ -63,7 +63,7 @@
地址
</div>
<div
class=
"table-content-cell cell"
>
{{
detail
.
address
}}
</div>
</div>
</div>
...
...
@@ -225,8 +225,8 @@
<div
class=
"cell flex_2"
>
<span
class=
"type"
:style=
"
{backgroundColor:typeChange(item.type).color}">
{{
typeChange
(
item
.
type
).
text
}}
</span>
</div>
<div
class=
"cell flex_2"
>
{{
item
.
staff
}}
</div>
<div
class=
"cell flex_2"
>
{{
item
.
create_time
}}
</div>
<div
class=
"cell flex_2"
>
{{
item
.
partolName
}}
</div>
<div
class=
"cell flex_2"
>
{{
item
.
CreatedAt
}}
</div>
<div
class=
"cell"
>
<span
class=
"opt"
@
click=
"seeDetail(item)"
>
查看
</span>
</div>
...
...
@@ -260,6 +260,7 @@
import
{
ref
,
reactive
,
toRefs
,
onMounted
,
nextTick
,
defineAsyncComponent
}
from
"vue"
import
{
ElMessage
}
from
"element-plus"
import
api
from
"@/api/methods/index"
import
myPublic
from
"@/utils/public"
export
default
{
name
:
'site-detail'
,
emits
:
[
'update:modelValue'
],
...
...
@@ -269,7 +270,7 @@
default
:
false
},
site_id
:
{
type
:
String
,
type
:
Number
,
default
:
''
},
},
...
...
@@ -278,7 +279,6 @@
show
:
false
,
order_id
:
''
,
detail
:
{
name
:
'三号路公共厕所GC-004'
,
poster
:
[
require
(
"@/assets/img/banner-1.png"
),
require
(
"@/assets/img/banner-1.png"
),
...
...
@@ -395,77 +395,20 @@
pageSize
:
15
,
total
:
20
,
data
:[
{
title
:
'2022年6月22日公厕巡检工作'
,
type
:
1
,
name
:
'三号路公共厕所【GC-004】'
,
staff
:
'罗小飞'
,
create_time
:
'2022-06-22 10:00'
},
{
title
:
'2022年6月21日公厕巡检工作'
,
type
:
1
,
name
:
'三号路公共厕所【GC-004】'
,
staff
:
'罗小飞'
,
create_time
:
'2022-06-21 10:00'
},
{
title
:
'2022年6月20日公厕巡检工作'
,
type
:
1
,
name
:
'三号路公共厕所【GC-004】'
,
staff
:
'罗小飞'
,
create_time
:
'2022-06-20 10:00'
},
{
title
:
'2022年6月19日公厕巡检工作'
,
type
:
2
,
name
:
'三号路公共厕所【GC-004】'
,
staff
:
'罗小飞'
,
create_time
:
'2022-06-19 10:00'
},
{
title
:
'2022年6月18日公厕巡检工作'
,
type
:
1
,
name
:
'三号路公共厕所【GC-004】'
,
staff
:
'罗小飞'
,
create_time
:
'2022-06-18 10:00'
},
{
title
:
'2022年6月17日公厕巡检工作'
,
type
:
1
,
name
:
'三号路公共厕所【GC-004】'
,
staff
:
'罗小飞'
,
create_time
:
'2022-06-17 10:00'
},
{
title
:
'2022年6月16日公厕巡检工作'
,
type
:
2
,
name
:
'三号路公共厕所【GC-004】'
,
staff
:
'罗小飞'
,
create_time
:
'2022-06-16 10:00'
},
{
title
:
'2022年6月14日公厕巡检工作'
,
type
:
1
,
name
:
'三号路公共厕所【GC-004】'
,
staff
:
'罗小飞'
,
create_time
:
'2022-06-14 10:00'
},
{
title
:
'2022年6月13日公厕巡检工作'
,
type
:
1
,
name
:
'三号路公共厕所【GC-004】'
,
staff
:
'罗小飞'
,
create_time
:
'2022-06-13 10:00'
},
]
}
});
const
chart
=
ref
(
null
);
function
getDetail
()
{
if
(
state
.
detail
.
type
==
1
){
state
.
tabs
.
find
(
one
=>
one
.
value
==
'process'
).
show
=
true
;
}
api
.
getToiletDetail
({
id
:
props
.
site_id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
Object
.
assign
(
state
.
detail
,{...
res
.
data
});
if
(
state
.
detail
.
type
==
1
){
state
.
tabs
.
find
(
one
=>
one
.
value
==
'process'
).
show
=
true
;
}
}
});
}
function
typeChange
(
type
=
1
)
{
switch
(
type
)
{
...
...
@@ -590,14 +533,42 @@
function
getOrderList
(
page
=
1
){
let
p
=
{
page
:
page
,
page
Size
:
state
.
list
.
pageSize
page
_size
:
state
.
list
.
pageSize
,
};
if
(
state
.
filter
.
time
[
0
]
&&
state
.
filter
.
time
[
1
]){
p
.
start_time
=
state
.
filter
.
time
[
0
];
p
.
end_time
=
state
.
filter
.
time
[
1
];
}
if
(
state
.
filter
.
type
){
p
.
type
=
state
.
filter
.
type
;
}
state
.
list
.
page
=
page
;
api
.
getPatrolList
(
p
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
if
(
Array
.
isArray
(
res
.
data
.
list
)){
res
.
data
.
list
.
forEach
((
item
)
=>
{
item
.
CreatedAt
=
myPublic
.
dateFormat
.
format
(
item
.
CreatedAt
);
})
state
.
list
.
data
=
res
.
data
.
list
;
state
.
list
.
total
=
res
.
data
.
total
;
}
}
})
}
function
seeDetail
(
item
){
state
.
order_id
=
item
.
order_id
;
state
.
order_id
=
item
.
ID
;
state
.
show
=
true
;
}
function
wcTypeChange
(
type
=
1
)
{
switch
(
type
)
{
case
1
:
return
{
text
:
'有动力'
,
color
:
'#3396fb'
};
case
2
:
return
{
text
:
'无动力'
,
color
:
'#f78131'
};
default
:
return
{
text
:
'...'
,
color
:
'#f78131'
};
}
}
onMounted
(
async
()
=>
{
getDetail
();
await
nextTick
(()
=>
{
...
...
@@ -612,7 +583,8 @@
typeChange
,
getList
,
getOrderList
,
seeDetail
seeDetail
,
wcTypeChange
}
},
components
:
{
...
...
pc/vue.config.js
View file @
768dc41f
...
...
@@ -62,7 +62,7 @@ module.exports = {
port
:
80
,
proxy
:
{
'/api'
:
{
target
:
'http://
qsh-wc-test.linanquan.com/api
'
,
target
:
'http://
127.0.0.1:9801
'
,
changeOrigin
:
true
,
pathRewrite
:
{
// '^/apis': ''表示把/apis替换为‘’(空字符串),这样既能使用代理,
...
...
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