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
f6aca89b
Commit
f6aca89b
authored
Oct 31, 2020
by
zhuxiaomei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
附件
parent
81cd7761
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
52 additions
and
41 deletions
+52
-41
sampling-plan-attachment.js
src/api/drs/sampling-plan-attachment.js
+0
-15
sampling-summary-attachment.js
src/api/drs/sampling-summary-attachment.js
+15
-0
index.js
src/api/index.js
+1
-1
file-nav.png
src/assets/file-nav.png
+0
-0
Index.vue
src/page/Index.vue
+3
-1
SamplingList.vue
src/page/history-sampling/SamplingList.vue
+4
-1
SamplingList.vue
src/page/sampling-list/SamplingList.vue
+12
-6
File.vue
src/page/sampling-list/file/File.vue
+12
-12
FileDownLoad.vue
src/page/sampling-list/file/FileDownLoad.vue
+2
-2
FileUpload.vue
src/page/sampling-list/file/FileUpload.vue
+3
-3
No files found.
src/api/drs/sampling-plan-attachment.js
deleted
100644 → 0
View file @
81cd7761
/**
* 双随机抽样计划附件表相关
*/
import
http
from
'../../api/http'
export
default
{
page
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan_attachment/page'
,
data
).
then
(
res
=>
res
),
list
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan_attachment/list'
,
data
).
then
(
res
=>
res
),
add
:
data
=>
http
.
post
(
'/drs/v1/sampling_plan_attachment/'
,
data
).
then
(
res
=>
res
),
edit
:
data
=>
http
.
put
(
'/drs/v1/sampling_plan_attachment/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
deleteByIds
:
data
=>
http
.
delete
(
'/drs/v1/sampling_plan_attachment/?ids='
+
data
.
id
).
then
(
res
=>
res
),
getById
:
id
=>
http
.
get
(
'/drs/v1/sampling_plan_attachment/'
+
id
).
then
(
res
=>
res
),
//计划下的附件是图片的附件id集合
getImgById
:
id
=>
http
.
post
(
'/drs/v1/sampling_plan_attachment/list_picture_by_plan_id?planId='
+
id
).
then
(
res
=>
res
),
}
src/api/drs/sampling-summary-attachment.js
0 → 100644
View file @
f6aca89b
/**
* 双随机抽样计划附件表相关
*/
import
http
from
'../../api/http'
export
default
{
page
:
data
=>
http
.
post
(
'/drs/v1/sampling_summary_attachment/page'
,
data
).
then
(
res
=>
res
),
list
:
data
=>
http
.
post
(
'/drs/v1/sampling_summary_attachment/list'
,
data
).
then
(
res
=>
res
),
add
:
data
=>
http
.
post
(
'/drs/v1/sampling_summary_attachment/'
,
data
).
then
(
res
=>
res
),
edit
:
data
=>
http
.
put
(
'/drs/v1/sampling_summary_attachment/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
deleteByIds
:
data
=>
http
.
delete
(
'/drs/v1/sampling_summary_attachment/?ids='
+
data
.
id
).
then
(
res
=>
res
),
getById
:
id
=>
http
.
get
(
'/drs/v1/sampling_summary_attachment/'
+
id
).
then
(
res
=>
res
),
//计划下的附件是图片的附件id集合
getImgById
:
id
=>
http
.
post
(
'/drs/v1/sampling_summary_attachment/list_picture_by_plan_id?planId='
+
id
).
then
(
res
=>
res
),
}
src/api/index.js
View file @
f6aca89b
...
...
@@ -30,5 +30,5 @@ export {default as samplingPlan} from './drs/sampling-plan'
export
{
default
as
samplingPlace
}
from
'./drs/sampling-place'
export
{
default
as
samplingShelf
}
from
'./drs/sampling-shelf'
export
{
default
as
samplingSummary
}
from
'./drs/sampling-summary'
export
{
default
as
sampling
PlanAttachment
}
from
'./drs/sampling-plan
-attachment'
export
{
default
as
sampling
SummaryAttachment
}
from
'./drs/sampling-summary
-attachment'
export
{
default
as
attendanceRecord
}
from
'./drs/attendance_record'
src/assets/file-nav.png
0 → 100644
View file @
f6aca89b
1.6 KB
src/page/Index.vue
View file @
f6aca89b
...
...
@@ -18,7 +18,9 @@
components
:
{},
methods
:
{
_back
()
{
this
.
$router
.
go
(
-
1
)
if
(
this
.
$route
.
meta
.
leftArrow
!==
false
)
{
this
.
$router
.
go
(
-
1
)
}
}
}
}
...
...
src/page/history-sampling/SamplingList.vue
View file @
f6aca89b
...
...
@@ -48,7 +48,8 @@
samplingDateEnd
:
''
,
taskName
:
''
,
testedName
:
''
,
isHistory
:
1
isHistory
:
1
,
isSelf
:
1
},
key
:
''
,
resultList
:
[],
...
...
@@ -68,6 +69,7 @@
this
.
key
=
value
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
isHistory
=
1
this
.
formObj
.
isSelf
=
1
this
.
_refresh
()
},
//高级搜索 清空key 查询
...
...
@@ -94,6 +96,7 @@
_clearHigh
()
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
isHistory
=
1
this
.
formObj
.
isSelf
=
1
},
_searchParams
()
{
let
data
=
{
...
...
src/page/sampling-list/SamplingList.vue
View file @
f6aca89b
...
...
@@ -40,11 +40,17 @@
<van-checkbox-group
v-model=
"checkListValue"
ref=
"checkboxGroup"
>
<van-swipe-cell
v-for=
"item in resultList"
:key=
"item.id"
>
<div
class=
"result-item"
@
click=
"_tapItem(item)"
v-touch:longtap=
"_longtapHandler"
>
<van-checkbox
:name=
"item.id"
shape=
"square"
v-if=
"showCheck"
></van-checkbox>
<div
@
click
.
stop=
"_goFile(item.id)"
style=
"margin:20px auto;color:#00a0e9"
>
查看附件
<div
style=
"width: 100%;display: flex;justify-content: space-between;border-bottom: 1px solid #eeeeee"
>
<div
style=
"display: flex"
>
<div
style=
"margin-right: 20px"
v-if=
"showCheck"
>
<van-checkbox
:name=
"item.id"
shape=
"square"
></van-checkbox>
</div>
<div>
抽样单编号:{{item.samplingNum}}
</div>
</div>
<div
@
click
.
stop=
"_goFile(item.id)"
>
<img
src=
"../../assets/file-nav.png"
style=
"width: 20px"
>
</div>
</div>
<div>
抽样单编号:{{item.samplingNum}}
</div>
<div>
抽样日期:{{item.samplingDate?$dateformat(item.samplingDate,'yyyy-mm-dd'):''}}
</div>
<div>
生产者名称:{{item.proName}}
</div>
<div>
样品名称:{{item.sampleName}}
</div>
...
...
@@ -65,7 +71,7 @@
</van-list>
</van-pull-refresh>
</div>
<div
class=
"bottom-btn bottom-btn-two"
v-if=
"showCheck"
>
<div
class=
"bottom-btn bottom-btn-two"
v-if=
"showCheck"
>
<van-button
square
@
click=
"_checkAll"
>
{{checkAll?'取消全选':'全选'}}
</van-button>
<van-button
square
type=
"danger"
@
click=
"_del(checkListValue)"
>
删除
</van-button>
</div>
...
...
@@ -233,7 +239,7 @@
}
},
_goFile
(
id
)
{
this
.
$router
.
push
({
path
:
'/sampling_list/file'
,
query
:
{
i
d
:
id
}})
this
.
$router
.
push
({
path
:
'/sampling_list/file'
,
query
:
{
summaryI
d
:
id
}})
}
}
}
...
...
src/page/sampling-list/file/File.vue
View file @
f6aca89b
<
template
>
<div>
<div
class=
"layout-cont-btn"
style=
"background: #576b95"
>
<div
class=
"layout-cont-btn"
>
<van-pull-refresh
v-model=
"refreshing"
@
refresh=
"_refresh"
>
<van-list
v-model=
"loading"
...
...
@@ -20,8 +20,8 @@
</van-pull-refresh>
</div>
<div
class=
"bottom-btn bottom-btn-two"
>
<van-button
type=
"info"
block
@
click=
"_goto('/sampling
/file_upload')"
>
添加附件
</van-button>
<van-button
type=
"
info"
block
@
click=
"_uploadImg"
>
添加图片
</van-button>
<van-button
type=
"info"
square
@
click=
"_goto('/sampling_list
/file_upload')"
>
添加附件
</van-button>
<van-button
type=
"
primary"
square
@
click=
"_uploadImg"
>
添加图片
</van-button>
</div>
<van-image-preview
v-model=
"showImg"
:images=
"imgList"
>
<!--<template #:index>第{{ index }}页</template>-->
...
...
@@ -30,7 +30,7 @@
</template>
<
script
>
import
{
sampling
Plan
Attachment
}
from
'../../../api'
import
{
sampling
Summary
Attachment
}
from
'../../../api'
export
default
{
data
()
{
...
...
@@ -38,7 +38,7 @@
resultList
:
[],
page
:
1
,
rows
:
20
,
plan
Id
:
''
,
summary
Id
:
''
,
imgList
:
[
''
],
loading
:
false
,
//加载中...
finished
:
false
,
//没有更多数据
...
...
@@ -51,8 +51,8 @@
}
},
mounted
()
{
this
.
planId
=
this
.
$route
.
query
.
plan
Id
;
this
.
action
=
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
plan_attachment/upload?planId='
+
this
.
plan
Id
;
this
.
summaryId
=
this
.
$route
.
query
.
summary
Id
;
this
.
action
=
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
summary_attachment/'
+
this
.
summary
Id
;
this
.
_getData
();
},
methods
:
{
...
...
@@ -64,12 +64,12 @@
let
data
=
{
page
:
this
.
page
,
rows
:
this
.
rows
,
planId
:
this
.
plan
Id
summaryId
:
this
.
summary
Id
};
return
this
.
$serializeForm
(
data
)
},
_getData
:
async
function
()
{
let
result
=
await
sampling
Plan
Attachment
.
page
(
this
.
_searchParams
())
let
result
=
await
sampling
Summary
Attachment
.
page
(
this
.
_searchParams
())
this
.
resultList
=
[...(
this
.
page
===
1
?
[]
:
this
.
resultList
),
...
result
.
records
]
this
.
refreshing
=
false
this
.
loading
=
false
...
...
@@ -83,11 +83,11 @@
},
//路由跳转
_goto
(
next
)
{
let
data
=
{
planId
:
this
.
plan
Id
};
let
data
=
{
summaryId
:
this
.
summary
Id
};
this
.
$router
.
push
({
path
:
next
,
query
:
data
})
},
_del
:
async
function
(
id
)
{
let
result
=
await
sampling
Plan
Attachment
.
deleteByIds
({
id
:
id
})
let
result
=
await
sampling
Summary
Attachment
.
deleteByIds
({
id
:
id
})
if
(
result
)
{
this
.
$toast
(
'删除成功!'
)
this
.
_refresh
()
...
...
@@ -98,7 +98,7 @@
if
(
data
.
type
.
toLowerCase
()
===
'jpg'
||
data
.
type
.
toLowerCase
()
===
'png'
)
{
this
.
showImg
=
true
//预览图片
this
.
imgList
[
0
]
=
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
plan
_attachment/down?id='
+
data
.
id
;
this
.
imgList
[
0
]
=
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
summary
_attachment/down?id='
+
data
.
id
;
}
else
{
//下载文件
let
name
=
''
;
...
...
src/page/sampling-list/file/FileDownLoad.vue
View file @
f6aca89b
...
...
@@ -40,7 +40,7 @@
forbidClick
:
true
,
});
var
dtask
=
plus
.
downloader
.
createDownload
(
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
plan
_attachment/down?id='
+
this
.
id
,
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
summary
_attachment/down?id='
+
this
.
id
,
{},
(
d
,
status
)
=>
{
// 下载完成
if
(
status
==
200
)
{
...
...
@@ -64,7 +64,7 @@
forbidClick
:
true
,
});
var
dtask
=
plus
.
downloader
.
createDownload
(
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
plan
_attachment/down?id='
+
this
.
id
,
{},
(
d
,
status
)
=>
{
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
summary
_attachment/down?id='
+
this
.
id
,
{},
(
d
,
status
)
=>
{
if
(
status
==
200
)
{
plus
.
runtime
.
openFile
(
d
.
filename
);
//cn.wps.moffice_eng-----wps的包名
}
...
...
src/page/sampling-list/file/FileUpload.vue
View file @
f6aca89b
...
...
@@ -24,7 +24,7 @@
export
default
{
data
()
{
return
{
plan
Id
:
''
,
summary
Id
:
''
,
action
:
''
,
dataObj
:
{
file
:
''
,
...
...
@@ -37,8 +37,8 @@
},
methods
:
{
_getQuery
()
{
this
.
planId
=
this
.
$route
.
query
.
plan
Id
;
this
.
action
=
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
plan_attachment/upload?planId='
+
this
.
plan
Id
;
this
.
summaryId
=
this
.
$route
.
query
.
summary
Id
;
this
.
action
=
this
.
$global
.
baseURL
+
'/drs/v1/sampling_
summary_attachment/'
+
this
.
summary
Id
;
this
.
headers
=
{
'accessToken'
:
localStorage
.
getItem
(
'accessToken'
)};
},
//web
...
...
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