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
b2ebe949
Commit
b2ebe949
authored
Oct 29, 2020
by
zhuxiaomei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加数值绑定
parent
5977ce38
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
86 additions
and
33 deletions
+86
-33
index.html
public/index.html
+5
-5
sampling-plan.js
src/api/drs/sampling-plan.js
+1
-0
DatetimeField.vue
src/components/DatetimeField.vue
+5
-5
SearchBar.vue
src/components/SearchBar.vue
+3
-1
SamplingListAdd.vue
src/page/sampling-list/SamplingListAdd.vue
+0
-0
SamplingListAddNet.vue
src/page/sampling-list/SamplingListAddNet.vue
+0
-0
SamplingTask.vue
src/page/sampling-list/SamplingTask.vue
+41
-17
SamplingTask.vue
src/page/sampling-task/SamplingTask.vue
+30
-4
sampling-list-add.less
src/styles/sampling-list-add.less
+1
-1
No files found.
public/index.html
View file @
b2ebe949
...
...
@@ -8,13 +8,13 @@
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>favicon.ico"
>
<title>
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
</title>
<title>
双随机抽样
</title>
</head>
<body>
<
noscript
>
<
strong>
We're sorry but
<
%=
htmlWebpackPlugin
.
options
.
title
%
>
doesn't work properly without JavaScript enabled.
Please enable it to continue.
</strong
>
<
/noscript
>
<
!--<noscript>--
>
<
!--<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.-->
<!--Please enable it to continue.</strong>--
>
<
!--</noscript>--
>
<div
id=
"app"
></div>
<!-- built files will be auto injected -->
</body>
...
...
src/api/drs/sampling-plan.js
View file @
b2ebe949
...
...
@@ -5,6 +5,7 @@ import http from '../http'
export
default
{
page
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/page'
,
data
).
then
(
res
=>
res
),
pageApp
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan/page_app'
,
data
).
then
(
res
=>
res
),
getById
:
id
=>
http
.
get
(
'/drs/v1/sampling_plan/'
+
id
).
then
(
res
=>
res
),
}
src/components/DatetimeField.vue
View file @
b2ebe949
...
...
@@ -3,7 +3,6 @@
<!--https://youzan.github.io/vant/#/zh-CN/form#biao-dan-xiang-lei-xing---shi-jian-xuan-ze-qi-->
<van-field
readonly
clickable
v-model=
"dateValue"
:label=
"label"
:placeholder=
"'点击选择'+label"
...
...
@@ -29,12 +28,14 @@
label
:
String
,
value
:
{
type
:
String
,
default
:
''
},
//默认值
type
:
{
type
:
String
,
default
:
'date'
},
format
:
{
type
:
String
,
default
:
'yyyy-mm-dd'
}
format
:
{
type
:
String
,
default
:
'yyyy-mm-dd'
},
// startDate: String
},
data
()
{
return
{
showPicker
:
false
,
currentDate
:
new
Date
()
currentDate
:
new
Date
(),
// minDate:this.startDate?new Date(this.startDate):new Date()
}
},
computed
:
{
...
...
@@ -45,8 +46,7 @@
set
(
val
)
{
this
.
$emit
(
'input'
,
val
)
}
}
},
},
watch
:
{
showPicker
:
function
(
newVal
)
{
...
...
src/components/SearchBar.vue
View file @
b2ebe949
...
...
@@ -45,10 +45,12 @@
this
.
$emit
(
'search'
,
this
.
searchValue
)
},
onHighSearch
()
{
this
.
showHighSearch
=
false
this
.
searchValue
=
''
this
.
$emit
(
'high-search'
)
},
_hideHighSearch
(){
this
.
showHighSearch
=
false
},
onReset
()
{
this
.
$emit
(
'clear-high'
)
}
...
...
src/page/sampling-list/SamplingListAdd.vue
View file @
b2ebe949
This diff is collapsed.
Click to expand it.
src/page/sampling-list/SamplingListAddNet.vue
View file @
b2ebe949
This diff is collapsed.
Click to expand it.
src/page/sampling-list/SamplingTask.vue
View file @
b2ebe949
<
template
>
<div>
<search-bar
label=
"计划名称"
ref=
"searchBar"
highSearch
@
search=
"_search"
@
high-search=
"_highSearch"
@
clear-high=
"_clearHigh"
>
<template
#
highSearch
>
<van-field
v-model=
"formObj.name"
label=
"计划名称"
placeholder=
"请输入计划名称"
></van-field>
<datetime-field
label=
"计划开始日期"
v-model=
"formObj.planDateBegin"
></datetime-field>
<van-field
v-model=
"formObj.name"
label=
"计划名称"
placeholder=
"请输入计划名称"
clearable
></van-field>
<datetime-field
label=
"计划开始日期"
v-model=
"formObj.planDateBegin"
></datetime-field>
<datetime-field
label=
"计划结束日期"
v-model=
"formObj.planDateEnd"
></datetime-field>
<van-field
v-model=
"formObj.uname"
label=
"登记人"
placeholder=
"请输入登记人"
></van-field>
<van-field
v-model=
"formObj.uname"
label=
"登记人"
placeholder=
"请输入登记人"
clearable
></van-field>
<datetime-field
label=
"登记开始日期"
v-model=
"formObj.ctimeBegin"
></datetime-field>
<datetime-field
label=
"登记结束日期"
v-model=
"formObj.ctimeEnd"
></datetime-field>
</
template
>
...
...
@@ -23,11 +24,11 @@
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"_load"
>
<div
class=
"result-item"
v-for=
"item in resultList"
:key=
"item.name"
@
click=
"_goto(item)"
>
<div>
计划名称:{{item.name}}
</div>
<div>
抽样进度:{{item.completionRatio}}
</div>
<div>
状态:{{item.progress}}
</div>
</div>
<div
class=
"result-item"
v-for=
"item in resultList"
:key=
"item.name"
@
click=
"_goto(item)"
>
<div>
计划名称:{{item.name}}
</div>
<div>
抽样进度:{{item.completionRatio}}
</div>
<div>
状态:{{item.progress}}
</div>
</div>
</van-list>
</van-pull-refresh>
</div>
...
...
@@ -48,7 +49,7 @@
uname
:
''
,
ctimeBegin
:
''
,
ctimeEnd
:
''
,
flag
:
0
flag
:
1
},
key
:
''
,
resultList
:
[],
...
...
@@ -59,25 +60,48 @@
finished
:
false
,
//没有更多数据
}
},
mounted
()
{
this
.
_getData
()
},
methods
:
{
//简单查询 清空高级查询条件 赋值简单查询数据
_search
(
value
)
{
this
.
key
=
value
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
flag
=
0
this
.
formObj
.
flag
=
1
this
.
_refresh
()
},
//高级搜索 清空key 查询
_highSearch
()
{
this
.
key
=
''
this
.
_refresh
()
if
(
this
.
_valParams
())
{
this
.
$refs
.
searchBar
.
_hideHighSearch
()
this
.
_refresh
()
}
},
_valParams
()
{
if
(
this
.
formObj
.
planDateBegin
===
''
&&
this
.
formObj
.
planDateEnd
!==
''
)
{
this
.
$toast
(
'请选择计划开始日期!'
)
return
false
}
else
if
(
this
.
formObj
.
planDateBegin
!==
''
&&
this
.
formObj
.
planDateEnd
===
''
)
{
this
.
$toast
(
'请选择计划结束日期!'
)
return
false
}
else
if
(
this
.
formObj
.
planDateBegin
!==
''
&&
this
.
formObj
.
planDateEnd
!==
''
&&
(
new
Date
(
this
.
formObj
.
planDateBegin
)
>
new
Date
(
this
.
formObj
.
planDateEnd
))){
this
.
$toast
(
'计划开始日期不能大于计划结束日期!'
)
return
false
}
if
(
this
.
formObj
.
ctimeBegin
===
''
&&
this
.
formObj
.
ctimeEnd
!==
''
)
{
this
.
$toast
(
'请选择登记开始日期!'
)
return
false
}
else
if
(
this
.
formObj
.
ctimeBegin
!==
''
&&
this
.
formObj
.
ctimeEnd
===
''
)
{
this
.
$toast
(
'请选择登记结束日期!'
)
return
false
}
else
if
(
this
.
formObj
.
ctimeBegin
!==
''
&&
this
.
formObj
.
ctimeEnd
!==
''
&&
(
new
Date
(
this
.
formObj
.
ctimeBegin
)
>
new
Date
(
this
.
formObj
.
ctimeEnd
))){
this
.
$toast
(
'登记开始日期不能大于登记结束日期!'
)
return
false
}
return
true
},
_clearHigh
()
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
flag
=
0
this
.
formObj
.
flag
=
1
},
_searchParams
()
{
let
data
=
{
...
...
@@ -91,7 +115,7 @@
return
this
.
$serializeForm
(
data
)
},
_getData
:
async
function
()
{
let
result
=
await
samplingPlan
.
page
(
this
.
_searchParams
())
let
result
=
await
samplingPlan
.
page
App
(
this
.
_searchParams
())
this
.
resultList
=
[...(
this
.
page
===
1
?
[]
:
this
.
resultList
),
...
result
.
records
]
this
.
refreshing
=
false
this
.
loading
=
false
...
...
@@ -101,7 +125,7 @@
},
_refresh
()
{
this
.
page
=
1
;
this
.
_getData
()
//
this._getData()
},
_load
()
{
this
.
page
=
this
.
page
+
1
;
...
...
src/page/sampling-task/SamplingTask.vue
View file @
b2ebe949
...
...
@@ -6,10 +6,10 @@
@
high-search=
"_highSearch"
@
clear-high=
"_clearHigh"
>
<template
#
highSearch
>
<van-field
v-model=
"formObj.name"
label=
"计划名称"
placeholder=
"请输入计划名称"
></van-field>
<van-field
v-model=
"formObj.name"
label=
"计划名称"
placeholder=
"请输入计划名称"
clearable
></van-field>
<datetime-field
label=
"计划开始日期"
v-model=
"formObj.planDateBegin"
></datetime-field>
<datetime-field
label=
"计划结束日期"
v-model=
"formObj.planDateEnd"
></datetime-field>
<van-field
v-model=
"formObj.uname"
label=
"登记人"
placeholder=
"请输入登记人"
></van-field>
<van-field
v-model=
"formObj.uname"
label=
"登记人"
placeholder=
"请输入登记人"
clearable
></van-field>
<datetime-field
label=
"登记开始日期"
v-model=
"formObj.ctimeBegin"
></datetime-field>
<datetime-field
label=
"登记结束日期"
v-model=
"formObj.ctimeEnd"
></datetime-field>
</
template
>
...
...
@@ -81,7 +81,33 @@
//高级搜索 清空key 查询
_highSearch
()
{
this
.
key
=
''
this
.
_refresh
()
if
(
this
.
_valParams
())
{
this
.
$refs
.
searchBar
.
_hideHighSearch
()
this
.
_refresh
()
}
},
_valParams
()
{
if
(
this
.
formObj
.
planDateBegin
===
''
&&
this
.
formObj
.
planDateEnd
!==
''
)
{
this
.
$toast
(
'请选择计划开始日期!'
)
return
false
}
else
if
(
this
.
formObj
.
planDateBegin
!==
''
&&
this
.
formObj
.
planDateEnd
===
''
)
{
this
.
$toast
(
'请选择计划结束日期!'
)
return
false
}
else
if
(
this
.
formObj
.
planDateBegin
!==
''
&&
this
.
formObj
.
planDateEnd
!==
''
&&
(
new
Date
(
this
.
formObj
.
planDateBegin
)
>
new
Date
(
this
.
formObj
.
planDateEnd
)))
{
this
.
$toast
(
'计划开始日期不能大于计划结束日期!'
)
return
false
}
if
(
this
.
formObj
.
ctimeBegin
===
''
&&
this
.
formObj
.
ctimeEnd
!==
''
)
{
this
.
$toast
(
'请选择登记开始日期!'
)
return
false
}
else
if
(
this
.
formObj
.
ctimeBegin
!==
''
&&
this
.
formObj
.
ctimeEnd
===
''
)
{
this
.
$toast
(
'请选择登记结束日期!'
)
return
false
}
else
if
(
this
.
formObj
.
ctimeBegin
!==
''
&&
this
.
formObj
.
ctimeEnd
!==
''
&&
(
new
Date
(
this
.
formObj
.
ctimeBegin
)
>
new
Date
(
this
.
formObj
.
ctimeEnd
)))
{
this
.
$toast
(
'登记开始日期不能大于登记结束日期!'
)
return
false
}
return
true
},
_clearHigh
()
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
...
...
@@ -99,7 +125,7 @@
return
this
.
$serializeForm
(
data
)
},
_getData
:
async
function
()
{
let
result
=
await
samplingPlan
.
page
(
this
.
_searchParams
())
let
result
=
await
samplingPlan
.
page
App
(
this
.
_searchParams
())
this
.
resultList
=
[...(
this
.
page
===
1
?
[]
:
this
.
resultList
),
...
result
.
records
]
this
.
refreshing
=
false
this
.
loading
=
false
...
...
src/styles/sampling-list-add.less
View file @
b2ebe949
...
...
@@ -66,7 +66,7 @@
}
.list-table-box {
.van-checkbox {
.van-checkbox
,.van-radio
{
padding: 5px;
}
}
...
...
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