Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
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
wangweidong
patzn-cloud-web-back-soil
Commits
07a80edb
Commit
07a80edb
authored
Dec 16, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加了查看项目报告
parent
4744ce26
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
287 additions
and
3 deletions
+287
-3
soil-report.js
api/soil/soil-report.js
+3
-1
ItemReportView.vue
pages/soil-test-manage/test-input/ItemReportView.vue
+276
-0
SampleManage.vue
pages/soil-test-manage/test-input/SampleManage.vue
+8
-1
ItemLeftList.vue
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
+0
-1
No files found.
api/soil/soil-report.js
View file @
07a80edb
...
@@ -19,5 +19,7 @@ export default {
...
@@ -19,5 +19,7 @@ export default {
http
http
.
post
(
'soil/v1/original_record/get_excel_original_record?expId='
+
data
)
.
post
(
'soil/v1/original_record/get_excel_original_record?expId='
+
data
)
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
reportPage
:
data
=>
http
.
post
(
'soil/v1/report/page'
,
data
).
then
(
res
=>
res
)
reportPage
:
data
=>
http
.
post
(
'soil/v1/report/page'
,
data
).
then
(
res
=>
res
),
originalRecordGetById
:
data
=>
http
.
get
(
'soil/v1/original_record/'
+
data
).
then
(
res
=>
res
)
}
}
pages/soil-test-manage/test-input/ItemReportView.vue
0 → 100644
View file @
07a80edb
<
template
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
:label-width=
"80"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"模板名称:"
>
<Input
v-model=
"formObj.title"
@
on-enter=
"_formSearch"
placeholder=
"请输入模板名称"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
v-model=
"formObj.entrustCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入委托编号"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:icon-msg=
"iconMsg"
:getPage=
"getPage"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<ItemOriginalRecordEdit
ref=
"recordEditModal"
></ItemOriginalRecordEdit>
<ItemView
ref=
"itemViewModal"
></ItemView>
</div>
</template>
<
script
>
/**
* 原始记录查看
*/
import
Global
from
'../../../api/config'
import
{
soilReport
,
soilTest
}
from
'../../../api'
import
ItemOriginalRecordEdit
from
'./OriginalRecordEdit'
import
ItemView
from
'./ItemView'
export
default
{
components
:
{
ItemOriginalRecordEdit
,
ItemView
},
data
()
{
return
{
currentComponent
:
''
,
getPage
:
{},
btn
:
[],
selectIds
:
[],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看项目报告'
},
{
type
:
'ios-list'
,
id
:
''
,
name
:
'查看试验项目'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
pageColumns
:
[
{
title
:
'模板名称'
,
key
:
'title'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
},
{
title
:
'填写人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
formObj
:
{
entrustId
:
''
},
searchOpen
:
false
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
''
,
340
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_componentResult
(
data
)
{
switch
(
this
.
currentComponent
)
{
case
'EditDateModal'
:
this
.
_updateDate
(
data
)
break
default
:
this
.
_page
()
}
},
_updateDate
(
date
)
{
this
.
$store
.
dispatch
(
'PrintForm/updateTimeBatch'
,
{
ids
:
this
.
selectIds
.
join
(
','
),
fillInTime
:
date
})
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
PrintForm
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
'更新成功!'
)
}
})
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
// this.$refs.recordEditModal._openWithType(
// data.originalRecordId,
// 'ENVTESTMAKEEDIT'
// )
this
.
_reportMakeLook
(
data
)
break
case
'查看项目报告'
:
this
.
_reportView
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
})
},
// 查看试验项目
_itemView
(
id
)
{
this
.
$refs
.
itemViewModal
.
_open
(
id
)
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
originalRecordGetById
(
data
.
id
)
// this._viewReport(data)
// const result = await soilReport.getExcelOriginalRecord(data.id)
if
(
result
)
{
console
.
log
(
'result'
)
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
recordUrl
+
'/print/v1/form/'
+
originalRecordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
_open
(
entrustId
)
{
this
.
formObj
.
entrustId
=
entrustId
this
.
_page
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
EnvItem
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
recordPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
// 删除原始记录
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
ids
)
}
})
},
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilTest
.
deleteRecord
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-input/SampleManage.vue
View file @
07a80edb
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
<el-tab-pane
label=
"按样品录入"
name=
"waitScan"
>
<el-tab-pane
label=
"按样品录入"
name=
"waitScan"
>
<WaitScan
ref=
"waitScanModal"
></WaitScan>
<WaitScan
ref=
"waitScanModal"
></WaitScan>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"查看项目报告"
name=
"viewReport"
>
<ItemReportView
ref=
"reportModal"
></ItemReportView>
</el-tab-pane>
<el-tab-pane
label=
"查看原始记录"
name=
"viewRecord"
>
<el-tab-pane
label=
"查看原始记录"
name=
"viewRecord"
>
<OriginalRecordView
ref=
"recordModal"
></OriginalRecordView>
<OriginalRecordView
ref=
"recordModal"
></OriginalRecordView>
</el-tab-pane>
</el-tab-pane>
...
@@ -27,12 +30,14 @@
...
@@ -27,12 +30,14 @@
import
WaitReceive
from
'./item-tabs/ItemTabs'
import
WaitReceive
from
'./item-tabs/ItemTabs'
import
WaitScan
from
'./sample-tabs/SampleTabs'
import
WaitScan
from
'./sample-tabs/SampleTabs'
import
OriginalRecordView
from
'./OriginalRecordView'
import
OriginalRecordView
from
'./OriginalRecordView'
import
ItemReportView
from
'./ItemReportView'
export
default
{
export
default
{
components
:
{
components
:
{
WaitReceive
,
WaitReceive
,
WaitScan
,
WaitScan
,
OriginalRecordView
OriginalRecordView
,
ItemReportView
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -85,6 +90,8 @@ export default {
...
@@ -85,6 +90,8 @@ export default {
this
.
$refs
.
waitReceiveModal
.
_clearTable
()
this
.
$refs
.
waitReceiveModal
.
_clearTable
()
this
.
$refs
.
waitScanModal
.
_open
(
this
.
entrustId
)
this
.
$refs
.
waitScanModal
.
_open
(
this
.
entrustId
)
// this._waitSend()
// this._waitSend()
}
else
{
this
.
$refs
.
reportModal
.
_open
(
this
.
entrustId
)
}
}
},
},
_search
()
{
_search
()
{
...
...
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
View file @
07a80edb
...
@@ -213,7 +213,6 @@ export default {
...
@@ -213,7 +213,6 @@ export default {
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
return
false
return
false
}
else
{
}
else
{
this
.
$emit
(
'on-result-change'
)
this
.
_viewReport
(
result
)
this
.
_viewReport
(
result
)
}
}
}
}
...
...
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