Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mobi
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
wbx-PCAndMobi
mobi
Commits
8fdb1ab9
Commit
8fdb1ab9
authored
May 25, 2021
by
levante
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial commit
parent
36740f55
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
131 additions
and
44 deletions
+131
-44
main.js
src/main.js
+14
-2
index.js
src/router/index.js
+11
-11
api.js
src/server/api.js
+4
-2
mobi.vue
src/views/mobi.vue
+102
-29
No files found.
src/main.js
View file @
8fdb1ab9
...
...
@@ -140,15 +140,27 @@ Vue.use(Calendar)
Vue
.
use
(
Tooltip
)
import
{
NavBar
}
from
'vant'
;
Vue
.
use
(
NavBar
);
import
{
Form
as
vantForm
}
from
'vant'
;
import
{
Field
}
from
'vant'
;
import
{
Button
as
vantButton
}
from
'vant'
;
import
{
Calendar
as
vanCalendar
}
from
'vant'
;
import
{
Picker
as
vanPicker
}
from
'vant'
;
import
{
DatetimePicker
as
vanDatetimePicker
}
from
'vant'
;
import
{
Popup
}
from
'vant'
;
import
{
Notify
}
from
'vant'
;
import
{
Dialog
}
from
'vant'
;
Vue
.
use
(
vantForm
);
Vue
.
use
(
NavBar
);
Vue
.
use
(
Field
);
Vue
.
use
(
vantButton
);
Vue
.
use
(
vanCalendar
)
Vue
.
use
(
vanPicker
)
Vue
.
use
(
vanDatetimePicker
)
Vue
.
use
(
Popup
)
Vue
.
use
(
Notify
)
Vue
.
use
(
Dialog
)
import
'vant/lib/index.css'
;
...
...
src/router/index.js
View file @
8fdb1ab9
...
...
@@ -12,17 +12,17 @@ const router = new Router({
routes
,
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
// TODO
store
.
commit
(
'setWebviewSrc'
,
to
.
meta
&&
to
.
meta
.
src
)
// 判断有src的话为需要嵌入iframe的子项目
//
router.beforeEach((to, from, next) => {
//
// TODO
//
store.commit('setWebviewSrc', to.meta && to.meta.src) // 判断有src的话为需要嵌入iframe的子项目
const
token
=
Cookie
.
get
(
'token'
)
// 当前无token且不在login页面则推到登录页面
if
(
to
.
path
!=
'/login'
&&
!
token
)
{
next
(
'/login'
)
}
else
{
next
()
}
})
//
const token = Cookie.get('token')
//
// 当前无token且不在login页面则推到登录页面
//
if (to.path != '/login' && !token) {
//
next('/login')
//
} else {
//
next()
//
}
//
})
export
default
router
src/server/api.js
View file @
8fdb1ab9
let
BASE_URL
=
''
,
MOCK_URL
=
''
,
let
BASE_URL
=
''
,
MOCK_URL
=
''
,
WBX_URL
=
''
,
FANGDI_URL
=
'http://962121.fgj.sh.gov.cn/wyweb/shanghaiwuye'
switch
(
process
.
env
.
NODE_ENV
)
{
...
...
@@ -39,6 +39,7 @@ default: // 默认环境下(开发环境)
// BASE_URL = 'http://211.136.105.193/apiv2'
// BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
BASE_URL
=
'http://yangpu-hm.omniview.pro/api/v2'
WBX_URL
=
'http://wbx.omniview.pro'
// BASE_URL = 'http://pudong.hm.omniview.pro/api/v2'
// BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2'
BASE_URL
=
'http://yangpu-hm.omniview.pro/api/v2'
...
...
@@ -228,5 +229,6 @@ export default {
POST_LABEL_RESULT_PREVIEW
:
'/service-customkey-ddd/findLabelObject'
,
// 标签预览
POST_LABEL_CREATE_CONFIRM
:
'/service-customkey-ddd/label/confirm'
,
GET_ID_INFO_BY_LABEL
:
'/service-customkey-ddd/label/resource/datas'
,
GET_WY_AND_YWH_LIST
:
'/service-customkey-ddd/datas'
GET_WY_AND_YWH_LIST
:
'/service-customkey-ddd/datas'
,
POST_RESERVATION_FORM
:
WBX_URL
+
'/api/service-documents/repair/reservation'
}
src/views/mobi.vue
View file @
8fdb1ab9
<
template
>
<div
style=
"height: 100%; background-color: #F5F5F5"
>
<van-dialog
v-model=
"showDialog"
title=
"是否再填写一份?"
showConfirmButton
show-cancel-button
@
confirm=
'clearAllFormFields'
></van-dialog>
<van-nav-bar
title=
"首页"
left-arrow
/>
<van-form
@
submit=
"onSubmit"
style=
"border-radius: 10px; margin: 10px"
>
...
...
@@ -10,61 +10,81 @@
v-model=
"sectName"
label=
"小区名称"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '请填写小区名称!' }]"
:rules=
"[
{ required: true, message: '此项为必填项!' }]"
required
clearable
label-width='8em'
/>
<van-field
v-model=
"sectAddr"
label=
"小区地址"
v-model=
"sectAddr
Road
"
label=
"小区地址
(路名)
"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '请填写小区地址!' }]"
:rules=
"[
{ required: true, message: '此项为必填项!' }]"
required
clearable
label-width='8em'
/>
<van-field
v-model=
"sectAddrLong"
label=
"小区地址(弄/号)"
placeholder=
"请输入"
:rules=
"[
{ required: true, message: '此项为必填项!' }]"
required
clearable
label-width='8em'
/>
<van-field
v-model=
"mpzAddr"
label=
"门牌幢地址"
placeholder=
"例:19号101室"
:rules=
"[
{ required: true, message: '请填写门牌幢地址!' }]"
:rules=
"[
{ required: true, message: '此项为必填项!' }]"
required
clearable
label-width='8em'
/>
<!-- 报修部位 -->
<van-field
<
!--
<
van-field
readonly
clickable
name=
"picker"
:value=
"repairArea"
label=
"报修部位"
placeholder=
"请选择"
@
click=
"showPicker = true"
@
click=
"show
repairArea
Picker = true"
:rules=
"[
{ required: true, message: '请至少选择一项!' }]"
/>
<van-popup
v-model=
"repairAreaPicker"
position=
"bottom"
>
<van-popup
v-model=
"
show
repairAreaPicker"
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"
c
olumns"
:columns=
"
areaC
olumns"
@
confirm=
"repairAreaConfirm"
@
cancel=
"showrepairAreaPicker = false"
/>
</van-popup>
</van-popup>
-->
<!-- 报修类型 -->
<van-field
<
!--
<
van-field
readonly
clickable
name=
"picker"
:value=
"repairType"
label=
"报修类型"
placeholder=
"请选择"
@
click=
"showPicker = true"
@
click=
"show
repairType
Picker = true"
:rules=
"[
{ required: true, message: '请至少选择一项!' }]"
/>
<van-popup
v-model=
"repairTypePicker"
position=
"bottom"
>
<van-popup
v-model=
"
show
repairTypePicker"
position=
"bottom"
>
<van-picker
show-toolbar
:columns=
"
c
olumns"
:columns=
"
typeC
olumns"
@
confirm=
"repairTypeConfirm"
@
cancel=
"showrepairTypePicker = false"
/>
</van-popup>
-->
<van-field
v-model=
"description"
...
...
@@ -75,7 +95,10 @@
maxlength=
"150"
placeholder=
"请输入详细信息"
show-word-limit
:rules=
"[
{ required: true, message: '请填写详细信息!' }]"
:rules=
"[
{ required: true, message: '此项为必填项!' }]"
required
clearable
label-width='8em'
/>
<van-field
...
...
@@ -86,9 +109,12 @@
label=
"上门日期"
placeholder=
"请选择"
@
click=
"showCalendar = true"
:rules=
"[
{ required: true, message: '请选择上门日期!' }]"
:rules=
"[
{ required: true, message: '此项为必填项!' }]"
required
clearable
label-width='8em'
/>
<van-calendar
v-model=
"showCalendar"
@
confirm=
"
o
nConfirm"
/>
<van-calendar
v-model=
"showCalendar"
@
confirm=
"
calendarO
nConfirm"
/>
<van-field
readonly
...
...
@@ -97,14 +123,17 @@
:value=
"dueTime"
label=
"上门时间"
placeholder=
"请选择"
@
click=
"showPicker = true"
:rules=
"[
{ required: true, message: '请选择上门时间!' }]"
@
click=
"showTime = true"
:rules=
"[
{ required: true, message: '此项为必填项!' }]"
required
clearable
label-width='8em'
/>
<van-popup
v-model=
"show
Picker
"
position=
"bottom"
>
<van-popup
v-model=
"show
Time
"
position=
"bottom"
>
<van-datetime-picker
type=
"time"
@
confirm=
"
o
nConfirm"
@
cancel=
"show
Picker
= false"
@
confirm=
"
timeO
nConfirm"
@
cancel=
"show
Time
= false"
/>
</van-popup>
<div
style=
"margin: 16px;"
>
...
...
@@ -118,8 +147,12 @@
export
default
{
data
()
{
return
{
areaColumns
:
[],
typeColumns
:
[],
sectName
:
''
,
sectAddr
:
''
,
sectAddrRoad
:
''
,
sectAddrLong
:
''
,
mpzAddr
:
''
,
repairArea
:
''
,
repairType
:
''
,
...
...
@@ -132,18 +165,58 @@ export default {
showrepairAreaPicker
:
false
,
showrepairTypePicker
:
false
,
showCalendar
:
false
,
showTime
:
false
,
showDialog
:
false
}
},
mounted
()
{},
mounted
()
{
},
methods
:{
onConfirm
()
{},
onSubmit
()
{
const
parseForm
=
{
stNameFrst
:
sectName
,
this
.
$ajax
.
post
({
url
:
this
.
$api
.
POST_RESERVATION_FORM
,
params
:
{
"stNameFrst"
:
this
.
sectName
,
"unitLoad"
:
this
.
sectAddrRoad
,
"unitLong"
:
this
.
sectAddrLong
,
"addrFrst"
:
this
.
mpzAddr
,
"place"
:
this
.
repairArea
,
"type"
:
this
.
repairType
,
"dscr"
:
this
.
description
,
"homeDate"
:
this
.
dueDate
,
"homeTime"
:
this
.
dueTime
}
}).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
$notify
({
type
:
'primary'
,
message
:
'提交成功!'
});
this
.
showDialog
=
!
this
.
showDialog
}
})
},
repairAreaConfirm
()
{},
repairTypeConfirm
()
{}
repairTypeConfirm
()
{},
calendarOnConfirm
(
val
)
{
this
.
dueDate
=
this
.
$moment
(
val
).
format
(
'YYYY-MM-DD'
)
this
.
showCalendar
=
!
this
.
showCalendar
},
timeOnConfirm
(
val
)
{
this
.
dueTime
=
val
this
.
showTime
=
!
this
.
showTime
},
clearAllFormFields
()
{
this
.
sectName
=
''
this
.
sectAddrRoad
=
''
this
.
sectAddrLong
=
''
this
.
mpzAddr
=
''
this
.
repairArea
=
''
this
.
repairType
=
''
this
.
description
=
''
this
.
dueDate
=
''
this
.
dueTime
=
''
}
}
}
</
script
>
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