Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-h5app-drs
Overview
Overview
Details
Activity
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
zhuxiaomei
patzn-cloud-web-h5app-drs
Commits
b336bb64
Commit
b336bb64
authored
Dec 09, 2020
by
zhuxiaomei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
地点的添加
parent
c83ebf77
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
3 deletions
+89
-3
sampling-place.js
src/api/drs/sampling-place.js
+1
-0
Home.vue
src/page/Home.vue
+0
-2
SamplingPlan.vue
src/page/sampling-plan/SamplingPlan.vue
+2
-0
LocAdd.vue
src/page/sampling-plan/loc/LocAdd.vue
+79
-0
LocChecked.vue
src/page/sampling-plan/loc/LocChecked.vue
+5
-1
sampling-plan-routes.js
src/router/sampling-plan-routes.js
+2
-0
No files found.
src/api/drs/sampling-place.js
View file @
b336bb64
...
...
@@ -8,6 +8,7 @@ export default {
page
:
data
=>
http
.
post
(
'/drs/v1/sampling_place/page'
,
data
).
then
(
res
=>
res
),
pageApp
:
data
=>
http
.
post
(
'/drs/v1/sampling_place/page_app'
,
data
).
then
(
res
=>
res
),
edit
:
data
=>
http
.
put
(
'/drs/v1/sampling_place/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
add
:
data
=>
http
.
post
(
'/drs/v1/sampling_place/'
,
data
).
then
(
res
=>
res
),
deleteByIds
:
ids
=>
http
.
delete
(
'/drs/v1/sampling_place/?ids='
+
ids
).
then
(
res
=>
res
),
listPlaces
:
data
=>
http
.
post
(
'/drs/v1/sampling_place/list_places'
,
data
).
then
(
res
=>
res
),
addMulti
:
data
=>
http
.
put
(
'/drs/v1/sampling_place/update_multi_selected'
,
data
).
then
(
res
=>
res
),
...
...
src/page/Home.vue
View file @
b336bb64
...
...
@@ -188,8 +188,6 @@
.box-c-2
{
>
div
:
nth-child
(
1
)
{
background-image
:
linear-gradient
(
45deg
,
#536DFE
,
#00B0Ff
)
/*background-image: linear-gradient(45deg, #10239e,#87e8de)*/
}
>
div
:nth-child
(
2
)
{
...
...
src/page/sampling-plan/SamplingPlan.vue
View file @
b336bb64
...
...
@@ -65,6 +65,8 @@
<div>
产品:{{item.product}}
</div>
</div>
<
template
#
right
v-if=
"item.progress==='草稿'||item.progress==='审批驳回'"
>
<van-button
square
color=
"#75b7bd"
text=
"提交 "
class=
"swipe-cell-btn"
@
click=
"_submit([item.id])"
></van-button>
<van-button
square
type=
"info"
text=
"编辑"
class=
"swipe-cell-btn"
@
click=
"_edit(item)"
></van-button>
<van-button
square
type=
"primary"
text=
"管理人员"
class=
"swipe-cell-btn"
...
...
src/page/sampling-plan/loc/LocAdd.vue
0 → 100644
View file @
b336bb64
<
template
>
<div>
<div
class=
"layout-cont-btn"
>
<van-form
ref=
"form"
@
submit=
"onSubmit"
>
<van-field
v-model=
"formObj.name"
name=
"name"
required
label=
"地点"
placeholder=
"请输入地点"
:rules=
"[
{ required: true, message: '' }]">
</van-field>
<van-field
v-model=
"formObj.address"
name=
"address"
label=
"地址"
placeholder=
"请输入地址"
>
</van-field>
<van-field
v-model=
"formObj.longitude"
name=
"longitude"
label=
"经度"
placeholder=
"请输入经度"
>
</van-field>
<van-field
v-model=
"formObj.latitude"
name=
"latitude"
label=
"纬度"
placeholder=
"请输入纬度"
>
</van-field>
</van-form>
</div>
<div
class=
"bottom-btn"
>
<van-button
type=
"info"
block
@
click=
"_save"
>
保存
</van-button>
</div>
</div>
</
template
>
<
script
>
import
{
samplingPlace
}
from
'../../../api'
export
default
{
name
:
"LocAdd"
,
data
()
{
return
{
formObj
:
{
name
:
''
,
address
:
''
,
longitude
:
''
,
latitude
:
''
,
},
planId
:
''
}
},
mounted
()
{
this
.
planId
=
this
.
$route
.
query
.
planId
},
methods
:
{
_save
(){
this
.
$refs
.
form
.
submit
()
},
onSubmit
(){
this
.
_saveOk
()
},
_saveOk
:
async
function
()
{
let
obj
=
{...
this
.
formObj
,
...{
planId
:
this
.
planId
}}
let
result
=
await
samplingPlace
.
add
(
this
.
$serializeForm
(
obj
))
if
(
result
)
{
this
.
$toast
(
'操作成功!'
)
this
.
$router
.
go
(
-
1
)
}
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/page/sampling-plan/loc/LocChecked.vue
View file @
b336bb64
...
...
@@ -25,6 +25,7 @@
</div>
<div
class=
"bottom-btn"
>
<van-button
type=
"info"
square
block
@
click=
"_add"
>
添加
</van-button>
<van-button
type=
"warning"
square
block
@
click=
"_mapAdd"
>
地图选取
</van-button>
<van-button
type=
"primary"
square
block
@
click=
"_create"
>
随机生成抽样地点
</van-button>
</div>
</div>
...
...
@@ -80,9 +81,12 @@
this
.
page
=
this
.
page
+
1
;
this
.
_getData
()
},
_
a
dd
()
{
_
mapA
dd
()
{
this
.
$router
.
push
({
path
:
'/sampling_plan/select_loc'
,
query
:
{
planId
:
this
.
planId
}})
},
_add
()
{
this
.
$router
.
push
({
path
:
'/sampling_plan/loc_add'
,
query
:
{
planId
:
this
.
planId
}})
},
_del
:
async
function
(
id
)
{
let
result
=
await
samplingPlace
.
deleteByIds
([
id
])
if
(
result
)
{
...
...
src/router/sampling-plan-routes.js
View file @
b336bb64
...
...
@@ -8,6 +8,7 @@ import CreateSampler from '@/page/sampling-plan/sampler/CreateSampler.vue'
import
LocChecked
from
'@/page/sampling-plan/loc/LocChecked.vue'
import
SelectLoc
from
'@/page/sampling-plan/loc/SelectLoc.vue'
import
CreateLoc
from
'@/page/sampling-plan/loc/CreateLoc.vue'
import
LocAdd
from
'@/page/sampling-plan/loc/LocAdd.vue'
import
File
from
'@/page/sampling-plan/file/File.vue'
import
FileDownLoad
from
'@/page/sampling-plan/file/FileDownLoad.vue'
...
...
@@ -24,6 +25,7 @@ export default [
{
path
:
'loc_checked'
,
component
:
LocChecked
,
meta
:
{
title
:
'管理抽样地点'
}},
{
path
:
'select_loc'
,
component
:
SelectLoc
,
meta
:
{
title
:
'选择抽样地点'
}},
{
path
:
'create_loc'
,
component
:
CreateLoc
,
meta
:
{
title
:
'生成抽样地点'
}},
{
path
:
'loc_add'
,
component
:
LocAdd
,
meta
:
{
title
:
'添加地点'
}},
{
path
:
'file'
,
component
:
File
,
meta
:
{
title
:
'附件'
}},
{
path
:
'file_upload'
,
component
:
FileUpload
,
meta
:
{
title
:
'添加附件'
}},
...
...
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