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
dde19e69
Commit
dde19e69
authored
Mar 11, 2021
by
zhuxiaomei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
维护人员地点
parent
c55e1d4c
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
213 additions
and
235 deletions
+213
-235
package.json
package.json
+1
-0
sampling-plan.js
src/api/drs/sampling-plan.js
+3
-0
Home.vue
src/page/Home.vue
+2
-2
Maintain.vue
src/page/sampling-plan/Maintain.vue
+157
-0
SamplingPlan.vue
src/page/sampling-plan/SamplingPlan.vue
+27
-20
SamplingPlanAdd.vue
src/page/sampling-plan/SamplingPlanAdd.vue
+0
-202
SelectSampler.vue
src/page/sampling-plan/sampler/SelectSampler.vue
+3
-0
sampling-plan-routes.js
src/router/sampling-plan-routes.js
+15
-11
main.less
src/styles/main.less
+5
-0
No files found.
package.json
View file @
dde19e69
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
"private"
:
true
,
"private"
:
true
,
"scripts"
:
{
"scripts"
:
{
"serve"
:
"vue-cli-service serve --mode development"
,
"serve"
:
"vue-cli-service serve --mode development"
,
"devtest"
:
"vue-cli-service serve --mode devtest"
,
"build"
:
"vue-cli-service build --mode production"
,
"build"
:
"vue-cli-service build --mode production"
,
"pertest"
:
"vue-cli-service build --mode pertest"
,
"pertest"
:
"vue-cli-service build --mode pertest"
,
"lint"
:
"vue-cli-service lint"
"lint"
:
"vue-cli-service lint"
...
...
src/api/drs/sampling-plan.js
View file @
dde19e69
...
@@ -14,6 +14,7 @@ export default {
...
@@ -14,6 +14,7 @@ export default {
add
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/'
,
data
).
then
(
res
=>
res
),
add
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/'
,
data
).
then
(
res
=>
res
),
addPlan
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/add_plan'
,
data
).
then
(
res
=>
res
),
edit
:
data
=>
http
.
put
(
'/drs/v1/sampling_plan/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
edit
:
data
=>
http
.
put
(
'/drs/v1/sampling_plan/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
deleteByIds
:
ids
=>
http
.
delete
(
'/drs/v1/sampling_plan/?ids='
+
ids
).
then
(
res
=>
res
),
deleteByIds
:
ids
=>
http
.
delete
(
'/drs/v1/sampling_plan/?ids='
+
ids
).
then
(
res
=>
res
),
...
@@ -26,4 +27,6 @@ export default {
...
@@ -26,4 +27,6 @@ export default {
samplerPage
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/search_plan_sampler'
,
data
).
then
(
res
=>
res
),
samplerPage
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/search_plan_sampler'
,
data
).
then
(
res
=>
res
),
saveSampler
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/save_plan_sampler'
,
data
).
then
(
res
=>
res
),
saveSampler
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/save_plan_sampler'
,
data
).
then
(
res
=>
res
),
deletePlanSampler
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/delete_plan_sampler'
,
data
).
then
(
res
=>
res
),
deletePlanSampler
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/delete_plan_sampler'
,
data
).
then
(
res
=>
res
),
saveSubmitPlan
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/save_submit_plan'
,
data
).
then
(
res
=>
res
),
getSamplerPlace
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/search_selected_sampler_place'
,
data
).
then
(
res
=>
res
),
}
}
src/page/Home.vue
View file @
dde19e69
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<div>
<div>
<img
src=
"@/assets/home/plan.png"
></div>
<img
src=
"@/assets/home/plan.png"
></div>
<div>
<div>
<div
class=
"title"
>
抽样计划执行双随机
</div>
<div
class=
"title"
>
我创建的抽样计划
</div>
<!--todo 每个模块的数量-->
<!--todo 每个模块的数量-->
<div
class=
"num"
>
3
</div>
<div
class=
"num"
>
3
</div>
</div>
</div>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<div
class=
"box-img"
>
<div
class=
"box-img"
>
<img
src=
"@/assets/home/task.png"
></div>
<img
src=
"@/assets/home/task.png"
></div>
<div
class=
"cont"
>
<div
class=
"cont"
>
<div
class=
"title"
>
我的任务
</div>
<div
class=
"title"
>
我的
双随机
任务
</div>
<div
class=
"num"
>
4
</div>
<div
class=
"num"
>
4
</div>
</div>
</div>
</div>
</div>
...
...
src/page/sampling-plan/Maintain.vue
0 → 100644
View file @
dde19e69
<
template
>
<div>
<van-field
label=
"人员"
center
>
<template
#
input
>
<Tag
v-for=
"(item,index) in userList"
:key=
"item.id"
:name=
"index"
closable
@
on-close=
"_userHandleClose"
>
{{
item
.
name
}}
</Tag>
<van-button
size=
"small"
type=
"default"
@
click=
"_userAdd"
>
添加
</van-button>
</
template
>
</van-field>
<van-field
label=
"地点"
center
>
<
template
#
input
>
<Tag
v-for=
"(item,index) in locList"
:key=
"item.id"
:name=
"index"
closable
@
on-close=
"_locHandleClose"
>
{{
item
.
name
}}
</Tag>
<van-button
size=
"small"
type=
"default"
@
click=
"_locAdd"
>
手动添加
</van-button>
<van-button
size=
"small"
type=
"default"
@
click=
"_locSearch"
style=
"margin-left: 10px"
>
搜索选择
</van-button>
</
template
>
</van-field>
<van-popup
v-model=
"showUserSelect"
>
<SamplerLab
@
cancel=
"showUserSelect=false"
@
on-change=
"_selectUserChange"
ref=
"userSelect"
></SamplerLab>
</van-popup>
<van-popup
v-model=
"showLocAdd"
>
<customer-navBar-layout
style=
"width: 100vw;height:100vh"
>
<
template
#
navBar
>
<van-nav-bar
title=
"添加地点"
left-arrow
@
click-left=
"showLocAdd=false"
></van-nav-bar>
</
template
>
<
template
#
content
>
<div
class=
"layout-cont pop-page-cont"
>
<LocAdd
@
on-change=
"_addLocChange"
ref=
"locAdd"
></LocAdd>
</div>
</
template
>
</customer-navBar-layout>
</van-popup>
<van-popup
v-model=
"showLocSelect"
>
<customer-navBar-layout
style=
"width: 100vw;height:100vh"
>
<
template
#
navBar
>
<van-nav-bar
title=
"选择地点"
left-arrow
@
click-left=
"showLocSelect=false"
></van-nav-bar>
</
template
>
<
template
#
content
>
<div
class=
"layout-cont pop-page-cont"
>
<SelectLoc
@
on-change=
"_selectLocChange"
ref=
"locSelect"
></SelectLoc>
</div>
</
template
>
</customer-navBar-layout>
</van-popup>
<div
class=
"bottom-btn"
style=
"position: fixed;bottom: 0"
>
<van-button
type=
"info"
block
@
click=
"_create"
>
随机生成
</van-button>
</div>
</div>
</template>
<
script
>
import
{
samplingPlace
,
samplingPlan
}
from
"../../api"
;
import
SamplerLab
from
'./sampler/SamplerLab'
import
LocAdd
from
'./loc/LocAdd'
import
SelectLoc
from
'./loc/SelectLoc'
export
default
{
components
:
{
SamplerLab
,
LocAdd
,
SelectLoc
,
},
data
()
{
return
{
planId
:
''
,
userList
:
[],
locList
:
[],
showUserSelect
:
false
,
showLocAdd
:
false
,
showLocSelect
:
false
,
}
},
mounted
()
{
this
.
planId
=
this
.
$route
.
query
.
planId
this
.
_getUserList
()
this
.
_getLocList
()
},
methods
:
{
_getUserList
:
async
function
()
{
const
page
=
await
samplingPlan
.
samplerPage
({
page
:
1
,
rows
:
1000
,
planId
:
this
.
planId
})
this
.
userList
=
page
?
page
.
records
:
[]
},
_getLocList
:
async
function
()
{
const
page
=
await
samplingPlace
.
page
({
page
:
1
,
rows
:
1000
,
planId
:
this
.
planId
})
this
.
locList
=
page
?
page
.
records
:
[]
},
_userAdd
()
{
this
.
showUserSelect
=
true
this
.
$nextTick
(
function
()
{
this
.
$refs
.
userSelect
.
_open
(
this
.
planId
)
})
},
_locAdd
()
{
this
.
showLocAdd
=
true
this
.
$nextTick
(
function
()
{
this
.
$refs
.
locAdd
.
_open
(
this
.
planId
)
})
},
_locSearch
()
{
this
.
showLocSelect
=
true
this
.
$nextTick
(
function
()
{
this
.
$refs
.
locSelect
.
_open
(
this
.
planId
)
})
},
_selectUserChange
()
{
this
.
showUserSelect
=
false
this
.
_getUserList
()
},
_addLocChange
()
{
this
.
showLocAdd
=
false
this
.
_getLocList
()
},
_selectLocChange
()
{
this
.
showLocSelect
=
false
this
.
_getLocList
()
},
_userHandleClose
:
async
function
(
event
,
index
)
{
const
result
=
await
samplingPlan
.
deletePlanSampler
({
samplerId
:
this
.
userList
[
index
].
id
,
planId
:
this
.
planId
})
if
(
result
)
{
this
.
userList
.
splice
(
index
,
1
);
}
},
_locHandleClose
:
async
function
(
event
,
index
)
{
const
result
=
await
samplingPlace
.
deleteByIds
(
this
.
locList
[
index
].
id
)
if
(
result
)
{
this
.
locList
.
splice
(
index
,
1
);
}
},
_create
()
{
this
.
$router
.
push
({
path
:
'/sampling_plan/random_create'
,
query
:{
planId
:
this
.
planId
}})
},
}
}
</
script
>
<
style
scoped
>
.pop-page-cont
>
div
{
width
:
100%
;
height
:
100%
;
}
</
style
>
src/page/sampling-plan/SamplingPlan.vue
View file @
dde19e69
...
@@ -44,35 +44,38 @@
...
@@ -44,35 +44,38 @@
<van-checkbox-group
v-model=
"checkListValue"
ref=
"checkboxGroup"
>
<van-checkbox-group
v-model=
"checkListValue"
ref=
"checkboxGroup"
>
<van-swipe-cell
v-for=
"item in resultList"
:key=
"item.id"
>
<van-swipe-cell
v-for=
"item in resultList"
:key=
"item.id"
>
<div
class=
"result-item"
@
click=
"_tapItem(item)"
v-touch:longtap=
"_longtapHandler"
>
<div
class=
"result-item"
@
click=
"_tapItem(item)"
v-touch:longtap=
"_longtapHandler"
>
<div
style=
"width: 100%;display: flex;justify-content: space-between;border-bottom: 1px solid #eeeeee"
>
<div
style=
"width: 100%;display: flex;justify-content: space-between;border-bottom: 1px solid #eeeeee"
>
<div
style=
"display: flex"
>
<div
style=
"display: flex"
>
<div
style=
"margin-right: 20px"
v-if=
"showCheck"
>
<div
style=
"margin-right: 20px"
v-if=
"showCheck"
>
<van-checkbox
:name=
"item.id"
shape=
"square"
></van-checkbox>
<van-checkbox
:name=
"item.id"
shape=
"square"
></van-checkbox>
</div>
</div>
<div>
计划名称:{{item.name
}}
</div>
<div>
计划名称:{{ item.name
}}
</div>
</div>
</div>
<div
@
click
.
stop=
"_goFile(item.id)"
>
<div
@
click
.
stop=
"_goFile(item.id)"
>
<img
src=
"../../assets/file-nav.png"
style=
"width: 20px"
>
<img
src=
"../../assets/file-nav.png"
style=
"width: 20px"
>
</div>
</div>
</div>
</div>
<div>
状态:{{item.progress
}}
</div>
<div>
状态:{{ item.progress
}}
</div>
<div>
计划日期:{{$dateformat(item.planDate,'yyyy-mm-dd')
}}
</div>
<div>
计划日期:{{ $dateformat(item.planDate, 'yyyy-mm-dd')
}}
</div>
<div>
任务下达单位:{{item.issuingUnit
}}
</div>
<div>
任务下达单位:{{ item.issuingUnit
}}
</div>
<div>
任务来源:{{item.taskSource
}}
</div>
<div>
任务来源:{{ item.taskSource
}}
</div>
<div
style=
"width: 100%"
>
抽样人员:{{item.samplerNames
}}
</div>
<div
style=
"width: 100%"
>
抽样人员:{{ item.samplerNames
}}
</div>
<div
style=
"width: 100%"
>
抽样地点:{{item.placeNames
}}
</div>
<div
style=
"width: 100%"
>
抽样地点:{{ item.placeNames
}}
</div>
<div>
抽样进度:{{item.completionRatio
}}
</div>
<div>
抽样进度:{{ item.completionRatio
}}
</div>
<div>
产品:{{item.product
}}
</div>
<div>
产品:{{ item.product
}}
</div>
</div>
</div>
<
template
#
right
v-if=
"item.progress==='草稿'||item.progress==='审批驳回'"
>
<
template
#
right
v-if=
"item.progress==='草稿'||item.progress==='审批驳回'"
>
<van-button
square
color=
"#75b7bd"
text=
"提交 "
class=
"swipe-cell-btn"
<van-button
square
color=
"#75b7bd"
text=
"提交 "
class=
"swipe-cell-btn"
@
click=
"_submit([item.id])"
></van-button>
@
click=
"_submit([item.id])"
></van-button>
<van-button
square
type=
"info"
text=
"编辑"
class=
"swipe-cell-btn"
<!--
<van-button
square
type=
"info"
text=
"编辑"
class=
"swipe-cell-btn"
--
>
@
click=
"_edit(item)"
></van-button>
<!-- @click="_edit(item)">
</van-button>
-->
<van-button
square
type=
"primary"
text=
"管理人员"
class=
"swipe-cell-btn"
<!--
<van-button
square
type=
"primary"
text=
"管理人员"
class=
"swipe-cell-btn"
--
>
@
click=
"_peopleManage(item)"
></van-button>
<!-- @click="_peopleManage(item)">
</van-button>
-->
<van-button
square
type=
"warning"
text=
"管理地点"
class=
"swipe-cell-btn"
<!--
<van-button
square
type=
"warning"
text=
"管理地点"
class=
"swipe-cell-btn"
--
>
@
click=
"_locManage(item)"
></van-button>
<!-- @click="_locManage(item)">
</van-button>
-->
<van-button
square
type=
"warning"
text=
"维护人员地点"
class=
"swipe-cell-btn"
@
click=
"_maintain(item)"
></van-button>
<van-button
square
type=
"danger"
text=
"删除"
class=
"swipe-cell-btn"
<van-button
square
type=
"danger"
text=
"删除"
class=
"swipe-cell-btn"
@
click=
"_del([item.id])"
></van-button>
@
click=
"_del([item.id])"
></van-button>
</
template
>
</
template
>
...
@@ -82,7 +85,7 @@
...
@@ -82,7 +85,7 @@
</van-pull-refresh>
</van-pull-refresh>
</div>
</div>
<div
class=
"bottom-btn"
v-if=
"showCheck"
>
<div
class=
"bottom-btn"
v-if=
"showCheck"
>
<van-button
square
block
@
click=
"_checkAll"
>
{{checkAll?'取消全选':'全选'
}}
</van-button>
<van-button
square
block
@
click=
"_checkAll"
>
{{ checkAll ? '取消全选' : '全选'
}}
</van-button>
<van-button
square
block
type=
"danger"
@
click=
"_del(checkListValue)"
>
删除
</van-button>
<van-button
square
block
type=
"danger"
@
click=
"_del(checkListValue)"
>
删除
</van-button>
<van-button
square
block
type=
"info"
@
click=
"_submit(checkListValue)"
>
提交
</van-button>
<van-button
square
block
type=
"info"
@
click=
"_submit(checkListValue)"
>
提交
</van-button>
</div>
</div>
...
@@ -91,9 +94,9 @@
...
@@ -91,9 +94,9 @@
</template>
</template>
<
script
>
<
script
>
import
{
samplingPlan
}
from
'../../api'
import
{
samplingPlan
}
from
'../../api'
export
default
{
export
default
{
name
:
"SamplingPlan"
,
name
:
"SamplingPlan"
,
components
:
{},
components
:
{},
data
()
{
data
()
{
...
@@ -246,6 +249,7 @@
...
@@ -246,6 +249,7 @@
this
.
checkListValue
.
splice
(
this
.
checkListValue
.
indexOf
(
item
.
id
),
1
);
this
.
checkListValue
.
splice
(
this
.
checkListValue
.
indexOf
(
item
.
id
),
1
);
}
}
}
else
{
}
else
{
this
.
_edit
(
item
)
// if (item.testedType === 1) {
// if (item.testedType === 1) {
// this.$router.push({path: '/sampling_plan/sampling_plan_detail_net', query: {id: item.id}})
// this.$router.push({path: '/sampling_plan/sampling_plan_detail_net', query: {id: item.id}})
// } else if (item.testedType === 0) {
// } else if (item.testedType === 0) {
...
@@ -267,6 +271,9 @@
...
@@ -267,6 +271,9 @@
_locManage
(
item
)
{
_locManage
(
item
)
{
this
.
$router
.
push
({
path
:
'/sampling_plan/loc_checked'
,
query
:
{
planId
:
item
.
id
}})
this
.
$router
.
push
({
path
:
'/sampling_plan/loc_checked'
,
query
:
{
planId
:
item
.
id
}})
},
},
_maintain
(
item
)
{
this
.
$router
.
push
({
path
:
'/sampling_plan/maintain'
,
query
:
{
planId
:
item
.
id
}})
},
_del
(
ids
)
{
_del
(
ids
)
{
if
(
ids
.
length
===
0
)
{
if
(
ids
.
length
===
0
)
{
this
.
$toast
(
'请至少选择一条数据!'
)
this
.
$toast
(
'请至少选择一条数据!'
)
...
@@ -293,7 +300,7 @@
...
@@ -293,7 +300,7 @@
this
.
$router
.
push
({
path
:
'/sampling_plan/file'
,
query
:
{
planId
:
id
}})
this
.
$router
.
push
({
path
:
'/sampling_plan/file'
,
query
:
{
planId
:
id
}})
}
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/page/sampling-plan/SamplingPlanAdd.vue
deleted
100644 → 0
View file @
c55e1d4c
<
template
>
<div>
<van-form
@
submit=
"onSubmit"
>
<van-field
v-model=
"formObj.name"
name=
"name"
label=
"计划名称"
placeholder=
"计划名称"
:rules=
"[
{ required: true, message: '请填写计划名称'}]"
>
</van-field>
<van-field
v-model=
"formObj.planDate"
name=
"monitorDate"
label=
"计划日期"
placeholder=
"计划日期"
@
click=
"_selectDate('formObj.planDate')"
></van-field>
<van-field
v-model=
"formObj.issuingUnit"
name=
"issuingUnit"
label=
"任务下达单位"
placeholder=
"任务下达单位"
></van-field>
<van-field
v-model=
"formObj.taskSource"
name=
"taskSource"
label=
"任务来源"
placeholder=
"任务来源"
></van-field>
<van-field
type=
"textarea"
v-model=
"formObj.product"
name=
"product"
label=
"产品"
placeholder=
"产品"
></van-field>
<van-field
v-model=
"formObj.standard"
name=
"standard"
label=
"抽查依据标准"
placeholder=
"抽查依据标准"
></van-field>
<van-field
v-model=
"formObj.finishDate"
name=
"finishDate"
label=
"完成时间"
placeholder=
"完成时间"
@
click=
"_selectDate('formObj.finishDate')"
></van-field>
<van-field
type=
"number"
v-model=
"formObj.samplingQuantity"
name=
"samplingQuantity"
label=
"抽样数量"
placeholder=
"抽样数量"
></van-field>
<van-field
type=
"number"
v-model=
"formObj.testCost"
name=
"testCost"
label=
"检测费用"
placeholder=
"检测费用"
></van-field>
<van-field
v-model=
"formObj.announcementNo"
name=
"announcementNo"
label=
"公告号"
placeholder=
"公告号"
></van-field>
<van-field
v-model=
"formObj.announcementDate"
name=
"announcementDate"
label=
"公告日期"
placeholder=
"公告日期"
@
click=
"_selectDate('formObj.announcementDate')"
></van-field>
<van-field
type=
"textarea"
v-model=
"formObj.remark"
name=
"remark"
label=
"备注"
placeholder=
"备注"
></van-field>
<div
style=
"margin: 16px;"
>
<van-button
round
block
type=
"info"
native-type=
"submit"
>
保存
</van-button>
</div>
</van-form>
<van-popup
v-model=
"showDatePicker"
position=
"bottom"
:safe-area-inset-bottom=
"true"
:close-on-popstate=
"true"
>
<van-datetime-picker
type=
"date"
v-model=
"currentDate"
@
confirm=
"_dateConfirm"
@
cancel=
"showDatePicker = false"
></van-datetime-picker>
</van-popup>
</div>
</
template
>
<
script
>
import
{
samplingPlan
}
from
'../../api'
export
default
{
name
:
"SamplingPlanAdd"
,
data
()
{
return
{
showDatePicker
:
false
,
currentDate
:
new
Date
(),
selectDateType
:
''
,
id
:
''
,
formObj
:
{
name
:
''
,
planDate
:
''
,
issuingUnit
:
''
,
taskSource
:
''
,
product
:
''
,
standard
:
''
,
finishDate
:
''
,
samplingQuantity
:
''
,
testCost
:
0
,
announcementNo
:
''
,
announcementDate
:
''
,
remark
:
''
}
}
},
mounted
()
{
this
.
_open
()
},
methods
:
{
_open
()
{
if
(
this
.
$route
.
query
.
id
)
{
//编辑
this
.
id
=
this
.
$route
.
query
.
id
this
.
_getData
()
}
else
{
this
.
id
=
''
}
},
_getData
:
async
function
()
{
let
result
=
await
samplingPlan
.
getById
(
this
.
id
)
if
(
result
)
{
for
(
let
key
in
this
.
formObj
)
{
if
(
result
[
key
])
{
if
(
key
===
'planDate'
||
key
===
'finishDate'
||
key
===
'announcementDate'
)
{
this
.
formObj
[
key
]
=
this
.
$dateformat
(
result
[
key
],
'yyyy-mm-dd'
)
}
else
{
this
.
formObj
[
key
]
=
result
[
key
]
}
}
}
}
},
onSubmit
(
res
)
{
if
(
this
.
id
)
{
this
.
_editSave
(
this
.
$serializeForm
(
res
))
}
else
{
this
.
_addSave
(
this
.
$serializeForm
(
res
))
}
},
_editSave
:
async
function
(
res
)
{
let
result
=
await
samplingPlan
.
edit
({
id
:
this
.
id
,
obj
:
res
})
if
(
result
)
{
this
.
$toast
(
'编辑成功!'
)
this
.
$router
.
go
(
-
1
)
}
},
_addSave
:
async
function
(
res
)
{
let
result
=
await
samplingPlan
.
add
(
res
)
if
(
result
)
{
this
.
$toast
(
'添加成功!'
)
this
.
$router
.
go
(
-
1
)
}
},
_selectDate
(
type
)
{
this
.
selectDateType
=
type
this
.
showDatePicker
=
true
},
_dateConfirm
(
date
)
{
switch
(
this
.
selectDateType
)
{
case
'formObj.planDate'
:
this
.
formObj
.
planDate
=
this
.
$dateformat
(
date
,
'yyyy-mm-dd'
)
break
case
'formObj.finishDate'
:
this
.
formObj
.
finishDate
=
this
.
$dateformat
(
date
,
'yyyy-mm-dd'
)
break
case
'formObj.announcementDate'
:
this
.
formObj
.
announcementDate
=
this
.
$dateformat
(
date
,
'yyyy-mm-dd'
)
break
}
this
.
showDatePicker
=
false
},
}
}
</
script
>
<
style
scoped
>
</
style
>
src/page/sampling-plan/sampler/SelectSampler.vue
View file @
dde19e69
...
@@ -28,6 +28,9 @@
...
@@ -28,6 +28,9 @@
</
template
>
</
template
>
<
script
>
<
script
>
/**
* 抽样任务-人员双随机-手动添加
*/
import
{
sampler
,
samplingPlan
}
from
'../../../api'
import
{
sampler
,
samplingPlan
}
from
'../../../api'
export
default
{
export
default
{
...
...
src/router/sampling-plan-routes.js
View file @
dde19e69
import
SamplingPlan
from
'@/page/sampling-plan/SamplingPlan.vue'
import
SamplingPlan
from
'@/page/sampling-plan/SamplingPlan.vue'
import
SamplingPlanAdd
from
'@/page/sampling-plan/SamplingPlanAdd.vue'
import
Maintain
from
'@/page/sampling-plan/Maintain.vue'
import
RandomCreate
from
'@/page/sampling-plan/RandomCreate.vue'
import
SamplingPlanAdd
from
'@/page/sampling-plan/add/SamplingPlanAdd.vue'
import
SamplerChecked
from
'@/page/sampling-plan/sampler/SamplerChecked.vue'
//
import SamplerChecked from '@/page/sampling-plan/sampler/SamplerChecked.vue'
import
SelectSampler
from
'@/page/sampling-plan/sampler/SelectSampler.vue'
import
SelectSampler
from
'@/page/sampling-plan/sampler/SelectSampler.vue'
import
CreateSampler
from
'@/page/sampling-plan/sampler/CreateSampler.vue'
//
import CreateSampler from '@/page/sampling-plan/sampler/CreateSampler.vue'
import
LocChecked
from
'@/page/sampling-plan/loc/LocChecked.vue'
import
LocChecked
from
'@/page/sampling-plan/loc/LocChecked.vue'
import
SelectLoc
from
'@/page/sampling-plan/loc/SelectLoc.vue'
//
import SelectLoc from '@/page/sampling-plan/loc/SelectLoc.vue'
import
CreateLoc
from
'@/page/sampling-plan/loc/CreateLoc.vue'
//
import CreateLoc from '@/page/sampling-plan/loc/CreateLoc.vue'
import
LocAdd
from
'@/page/sampling-plan/loc/LocAdd.vue'
//
import LocAdd from '@/page/sampling-plan/loc/LocAdd.vue'
import
File
from
'@/page/sampling-plan/file/File.vue'
import
File
from
'@/page/sampling-plan/file/File.vue'
import
FileDownLoad
from
'@/page/sampling-plan/file/FileDownLoad.vue'
import
FileDownLoad
from
'@/page/sampling-plan/file/FileDownLoad.vue'
...
@@ -16,16 +18,18 @@ import FileUpload from '@/page/sampling-plan/file/FileUpload.vue'
...
@@ -16,16 +18,18 @@ import FileUpload from '@/page/sampling-plan/file/FileUpload.vue'
export
default
[
export
default
[
{
path
:
'sampling_plan'
,
component
:
SamplingPlan
,
meta
:
{
title
:
'抽样计划'
,
hideNavBar
:
true
}},
{
path
:
'sampling_plan'
,
component
:
SamplingPlan
,
meta
:
{
title
:
'抽样计划'
,
hideNavBar
:
true
}},
{
path
:
'maintain'
,
component
:
Maintain
,
meta
:
{
title
:
'维护人员、地点'
}},
{
path
:
'random_create'
,
component
:
RandomCreate
,
meta
:
{
title
:
'随机生成'
}},
{
path
:
'sampling_plan_add'
,
component
:
SamplingPlanAdd
,
meta
:
{
customerNavBarTitle
:
true
}},
{
path
:
'sampling_plan_add'
,
component
:
SamplingPlanAdd
,
meta
:
{
customerNavBarTitle
:
true
}},
{
path
:
'sampler_checked'
,
component
:
SamplerChecked
,
meta
:
{
title
:
'管理抽样人员'
}},
//
{path: 'sampler_checked', component: SamplerChecked, meta: {title: '管理抽样人员'}},
{
path
:
'select_sampler'
,
component
:
SelectSampler
,
meta
:
{
title
:
'选择抽样人员'
}},
{
path
:
'select_sampler'
,
component
:
SelectSampler
,
meta
:
{
title
:
'选择抽样人员'
}},
{
path
:
'create_sampler'
,
component
:
CreateSampler
,
meta
:
{
title
:
'生成抽样人员'
}},
//
{path: 'create_sampler', component: CreateSampler, meta: {title: '生成抽样人员'}},
{
path
:
'loc_checked'
,
component
:
LocChecked
,
meta
:
{
title
:
'管理抽样地点'
}},
{
path
:
'loc_checked'
,
component
:
LocChecked
,
meta
:
{
title
:
'管理抽样地点'
}},
{
path
:
'select_loc'
,
component
:
SelectLoc
,
meta
:
{
title
:
'选择抽样地点'
}},
//
{path: 'select_loc', component: SelectLoc, meta: {title: '选择抽样地点'}},
{
path
:
'create_loc'
,
component
:
CreateLoc
,
meta
:
{
title
:
'生成抽样地点'
}},
//
{path: 'create_loc', component: CreateLoc, meta: {title: '生成抽样地点'}},
{
path
:
'loc_add'
,
component
:
LocAdd
,
meta
:
{
title
:
'添加地点'
}},
//
{path: 'loc_add', component: LocAdd, meta: {title: '添加地点'}},
{
path
:
'file'
,
component
:
File
,
meta
:
{
title
:
'附件'
}},
{
path
:
'file'
,
component
:
File
,
meta
:
{
title
:
'附件'
}},
{
path
:
'file_upload'
,
component
:
FileUpload
,
meta
:
{
title
:
'添加附件'
}},
{
path
:
'file_upload'
,
component
:
FileUpload
,
meta
:
{
title
:
'添加附件'
}},
...
...
src/styles/main.less
View file @
dde19e69
...
@@ -287,3 +287,8 @@ html, body, #app, .main-content-con {
...
@@ -287,3 +287,8 @@ html, body, #app, .main-content-con {
color: @text-color-white;
color: @text-color-white;
}
}
}
}
.van-field__control--custom{
flex-wrap: wrap;
}
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