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
4d3b7751
Commit
4d3b7751
authored
Sep 25, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了试验项目原始记录查看
parent
365a29c1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
374 additions
and
7 deletions
+374
-7
soil-test.js
api/soil/soil-test.js
+5
-1
OriginalRecordView.vue
pages/soil-test-manage/test-input/OriginalRecordView.vue
+353
-0
SampleManage.vue
pages/soil-test-manage/test-input/SampleManage.vue
+8
-2
SampleRightList.vue
...il-test-manage/test-input/sample-tabs/SampleRightList.vue
+3
-2
SampleTabs.vue
pages/soil-test-manage/test-input/sample-tabs/SampleTabs.vue
+5
-2
No files found.
api/soil/soil-test.js
View file @
4d3b7751
...
...
@@ -45,5 +45,9 @@ export default {
saveItem
:
data
=>
http
.
post
(
'soil/v1/original_record/save_original_record'
,
data
)
.
then
(
res
=>
res
)
.
then
(
res
=>
res
),
recordPage
:
data
=>
http
.
post
(
'soil/v1/original_record/page'
,
data
).
then
(
res
=>
res
),
pageTest
:
data
=>
http
.
post
(
'soil/v1/experiment/page_test'
,
data
).
then
(
res
=>
res
)
}
pages/soil-test-manage/test-input/OriginalRecordView.vue
0 → 100644
View file @
4d3b7751
<
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.templateTitle"
@
on-enter=
"_formSearch"
placeholder=
"请输入模板名称"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托单位:"
>
<Input
v-model=
"formObj.cusNames"
@
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>
<!-- <template slot="col">-->
<!-- <vxe-table-column-->
<!-- :width="190"-->
<!-- title="操作"-->
<!-- align="center"-->
<!-- fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <VXEIconList :msg="(scope.row.hasInputItem===1) ? iconMsg : iconMsgDisable"-->
<!-- @on-result-change="_iconClick" :rowData="scope.row"></VXEIconList>-->
<!-- </template>-->
<!-- </vxe-table-column>-->
<!-- </template>-->
</PTVXETable>
</Col>
</Row>
<ItemOriginalRecordEdit
ref=
"recordEditModal"
></ItemOriginalRecordEdit>
</div>
</template>
<
script
>
/**
* 原始记录查看
*/
import
Global
from
'../../../api/config'
import
{
soilTest
}
from
'../../../api'
import
ItemOriginalRecordEdit
from
'./OriginalRecordEdit'
export
default
{
components
:
{
ItemOriginalRecordEdit
},
data
()
{
return
{
currentComponent
:
''
,
getPage
:
{},
btn
:
[
{
type
:
''
,
id
:
''
,
name
:
'纠正填写时间'
,
componentName
:
'EditDateModal'
},
{
type
:
''
,
id
:
''
,
name
:
'设置填写人乙'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
selectIds
:
[],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
,
componentName
:
'ItemOriginalRecordEdit'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
,
componentName
:
'OriginalItemView'
}
// {
// type: 'erlenmeyer-flask',
// id: '',
// name: '查看样品',
// componentName: 'SampleView'
// },
// {
// type: 'document-text',
// id: '',
// name: '查看检测项目',
// componentName: 'ItemView'
// },
// { type: 'cloud', id: '', name: '附件', componentName: 'FileManage' },
// { type: 'trash-a', id: '', name: '删除' },
// {
// type: 'ios-clock',
// id: '',
// name: '操作记录',
// componentName: 'ElnFormRecord'
// }
],
iconMsgDisable
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
,
disabled
:
true
},
{
type
:
''
,
id
:
''
,
name
:
'查看原始记录'
,
componentName
:
'OriginalItemView'
}
// {
// type: 'erlenmeyer-flask',
// id: '',
// name: '查看样品',
// componentName: 'SampleView'
// },
// {
// type: 'document-text',
// id: '',
// name: '查看检测项目',
// componentName: 'ItemView'
// },
// { type: 'cloud', id: '', name: '附件', componentName: 'FileManage' },
// { type: 'trash-a', id: '', name: '删除', disabled: true },
// {
// type: 'ios-clock',
// id: '',
// name: '操作记录',
// componentName: 'ElnFormRecord'
// }
],
pageColumns
:
[
{
title
:
'模板名称'
,
key
:
'title'
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
},
{
title
:
'填写人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
formObj
:
{
entrustId
:
''
,
batchNos
:
''
,
sampleNums
:
''
,
templateTitle
:
''
,
fillInTimeBegin
:
''
,
fillInTimeEnd
:
''
,
cusNames
:
''
,
codes
:
''
,
itemNames
:
''
,
testAccordings
:
''
},
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
'纠正填写时间'
:
this
.
_editWriteTime
()
break
case
'设置填写人乙'
:
this
.
_setAnotherTester
()
break
case
'删除'
:
this
.
_batchDelete
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
// 设置填写人乙
_setAnotherTester
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$msgTip
(
'warning'
)
}
else
{
this
.
$refs
.
testerModal
.
_open
(
this
.
selectIds
)
}
},
_editWriteTime
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
'填写时间'
)
}
},
_dateChange
(
data
)
{
this
.
formObj
.
fillInTimeBegin
=
data
[
0
]
this
.
formObj
.
fillInTimeEnd
=
data
[
1
]
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
$refs
.
refModal
.
_openWithType
(
data
.
id
,
'ENVTESTMAKEEDIT'
)
break
case
'查看原始记录'
:
this
.
_recordView
(
data
.
id
)
break
case
'查看检测项目'
:
this
.
$refs
.
refModal
.
_open
(
data
)
break
case
'查看样品'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'originalId'
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
case
'操作记录'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
)
break
}
})
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
Global
.
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
}
},
// 批量删除原始记录
_batchDelete
()
{
if
(
this
.
selectIds
.
length
>
0
)
{
const
content
=
'确定删除这'
+
this
.
selectIds
.
length
+
'条数据?'
this
.
_deleteByIds
(
this
.
selectIds
,
content
)
}
else
{
this
.
$msgTip
(
'warning'
)
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
$store
.
dispatch
(
'EnvItem/deleteOriRecord'
,
ids
).
then
(()
=>
{
if
(
this
.
$store
.
state
.
EnvItem
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
'删除成功!'
)
}
})
}
})
}
}
}
</
script
>
pages/soil-test-manage/test-input/SampleManage.vue
View file @
4d3b7751
...
...
@@ -11,6 +11,9 @@
<el-tab-pane
label=
"按样品录入"
name=
"waitScan"
>
<WaitScan
ref=
"waitScanModal"
></WaitScan>
</el-tab-pane>
<el-tab-pane
label=
"查看原始记录"
name=
"viewRecord"
>
<OriginalRecordView
ref=
"recordModal"
></OriginalRecordView>
</el-tab-pane>
</el-tabs>
<!--
<keep-alive>
-->
<!-- <!– eslint-disable-next-line vue/require-component-is –>-->
...
...
@@ -23,11 +26,13 @@
<
script
>
import
WaitReceive
from
'./item-tabs/ItemTabs'
import
WaitScan
from
'./sample-tabs/SampleTabs'
import
OriginalRecordView
from
'./OriginalRecordView'
export
default
{
components
:
{
WaitReceive
,
WaitScan
WaitScan
,
OriginalRecordView
},
data
()
{
return
{
...
...
@@ -69,8 +74,9 @@ export default {
this
.
$refs
.
alreadyIssuedModal
.
_open
(
this
.
contractId
,
this
.
type
)
},
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'
alreadyIssue
d'
)
{
if
(
tab
.
name
===
'
viewRecor
d'
)
{
// this._issuedPage()
this
.
$refs
.
recordModal
.
_open
(
this
.
entrustId
)
}
else
if
(
tab
.
name
===
'waitReceive'
)
{
// this._waitPage()
this
.
$refs
.
waitScanModal
.
_clearTable
()
...
...
pages/soil-test-manage/test-input/sample-tabs/SampleRightList.vue
View file @
4d3b7751
...
...
@@ -306,8 +306,9 @@ export default {
this
.
$refs
.
refModal
.
_open
(
tempData
,
'planDate'
)
}
},
_open
(
data
)
{
_open
(
id
,
data
)
{
this
.
getPage
.
records
=
[]
console
.
log
(
id
)
this
.
sampleIds
=
data
if
(
data
.
length
===
0
)
{
this
.
$set
(
this
.
getPage
,
'records'
,
[])
...
...
@@ -338,7 +339,7 @@ export default {
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
sampleIds
=
this
.
sampleIds
const
result
=
await
soilTest
.
page
Allo
t
(
this
.
$serializeForm
(
this
.
formObj
))
const
result
=
await
soilTest
.
page
Tes
t
(
this
.
$serializeForm
(
this
.
formObj
))
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_checkAll
()
...
...
pages/soil-test-manage/test-input/sample-tabs/SampleTabs.vue
View file @
4d3b7751
...
...
@@ -23,16 +23,19 @@ export default {
ItemRightList
},
data
()
{
return
{}
return
{
id
:
''
}
},
methods
:
{
_leftResult
(
data
)
{
this
.
$refs
.
SamplerightModal
.
_open
(
data
)
this
.
$refs
.
SamplerightModal
.
_open
(
this
.
id
,
data
)
},
_rightResult
()
{
this
.
$refs
.
SampleleftModal
.
_page
()
},
_open
(
id
)
{
this
.
id
=
id
this
.
$refs
.
SampleleftModal
.
_open
(
id
)
// this.$refs.rightModal._getColumn()
},
...
...
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