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
9f1534f6
Commit
9f1534f6
authored
Oct 29, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
2a4a2448
b89b6cec
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
2806 additions
and
44 deletions
+2806
-44
soil-test.js
api/soil/soil-test.js
+17
-1
SelEquip.vue
components/select-equip/SelEquip.vue
+1
-1
SoilSampleItemManageHis.vue
pages/soil-test-manage/SoilSampleItemManageHis.vue
+628
-0
SoilSampleManageHis.vue
pages/soil-test-manage/SoilSampleManageHis.vue
+562
-0
DataAuditHis.vue
pages/soil-test-manage/test-data-audit/DataAuditHis.vue
+4
-1
DataCheckHis.vue
pages/soil-test-manage/test-data-check/DataCheckHis.vue
+5
-3
EquipManage.vue
pages/soil-test-manage/test-input/EquipManage.vue
+157
-0
SoilSampleItemManageHis.vue
...s/soil-test-manage/test-input/SoilSampleItemManageHis.vue
+628
-0
SoilSampleManageHis.vue
pages/soil-test-manage/test-input/SoilSampleManageHis.vue
+562
-0
TestInputHis.vue
pages/soil-test-manage/test-input/TestInputHis.vue
+5
-3
ItemRightList.vue
...s/soil-test-manage/test-input/item-tabs/ItemRightList.vue
+62
-17
SampleRightList.vue
...il-test-manage/test-input/sample-tabs/SampleRightList.vue
+162
-9
ItemLeftList.vue
...k-manage/entrust-sample-manage/item-tabs/ItemLeftList.vue
+4
-1
ItemRightList.vue
...-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
+8
-8
ItemTabs.vue
...-task-manage/entrust-sample-manage/item-tabs/ItemTabs.vue
+1
-0
No files found.
api/soil/soil-test.js
View file @
9f1534f6
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
*/
*/
import
http
from
'../http'
import
http
from
'../http'
import
{
https
}
from
'../https'
// import { https } from '../https'
// import { https } from '../https'
export
default
{
export
default
{
...
@@ -20,6 +21,8 @@ export default {
...
@@ -20,6 +21,8 @@ export default {
http
.
post
(
'soil/v1/experiment/page_allot'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/experiment/page_allot'
,
data
).
then
(
res
=>
res
),
pageExpTest
:
data
=>
pageExpTest
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_test'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/entrust/page_exp_test'
,
data
).
then
(
res
=>
res
),
pageExpTestHis
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_test_his'
,
data
).
then
(
res
=>
res
),
samplePage
:
data
=>
http
.
post
(
'soil/v1/sample/page'
,
data
).
then
(
res
=>
res
),
samplePage
:
data
=>
http
.
post
(
'soil/v1/sample/page'
,
data
).
then
(
res
=>
res
),
pageExpTestSample
:
data
=>
pageExpTestSample
:
data
=>
http
.
post
(
'soil/v1/sample/page_exp_test_sample'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/sample/page_exp_test_sample'
,
data
).
then
(
res
=>
res
),
...
@@ -97,5 +100,18 @@ export default {
...
@@ -97,5 +100,18 @@ export default {
'&remark='
+
'&remark='
+
data
.
remark
data
.
remark
)
)
.
then
(
res
=>
res
)
.
then
(
res
=>
res
),
// 添加设备信息
addExpEquip
:
data
=>
https
.
post
(
'soil/v1/experiment_rel_equip/add_exp_equip'
,
JSON
.
stringify
(
data
))
.
then
(
res
=>
res
),
equipPage
:
data
=>
http
.
post
(
'soil/v1/experiment_rel_equip/page'
,
data
).
then
(
res
=>
res
),
deleteEquip
:
data
=>
http
.
delete
(
'soil/v1/experiment_rel_equip/?ids='
+
data
).
then
(
res
=>
res
),
pageExpCheckHis
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_check_his'
,
data
).
then
(
res
=>
res
),
pageExpTestSampleHis
:
data
=>
http
.
post
(
'soil/v1/sample/page_exp_test_sample_his'
,
data
).
then
(
res
=>
res
)
}
}
components/select-equip/SelEquip.vue
View file @
9f1534f6
...
@@ -204,7 +204,7 @@ export default {
...
@@ -204,7 +204,7 @@ export default {
}
}
},
},
_ok
()
{
_ok
()
{
if
(
this
.
tempData
.
length
===
0
)
{
if
(
this
.
delIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
this
.
_hideLoading
()
this
.
_hideLoading
()
}
else
{
}
else
{
...
...
pages/soil-test-manage/SoilSampleItemManageHis.vue
0 → 100644
View file @
9f1534f6
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"1200"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-sample-company"
v-show=
"searchOpen"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"检测项目:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入检测项目"
clearable
/>
</Form-item>
<Form-item
label=
"检测依据:"
class=
"search-item"
>
<Input
v-model=
"formObj.code"
@
on-enter=
"_formSearch"
placeholder=
"请输入检测依据"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
class=
"contHide"
show-search-btn=
"true"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
:get-page=
"getPage"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.detail"
>
<a
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
</div>
<div
v-else-if=
"item.key==='epibolyItem'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-select
v-if=
"showOption"
v-model=
"scope.row.epibolyItem"
@
change=
"_optionChange(scope.row)"
placeholder=
"请选择"
>
<el-option
v-for=
"(item,index) in subOptions"
:key=
"index"
:label=
"item.label"
:value=
"index"
/>
</el-select>
<span
v-if=
"!showOption"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'否'
:
'是'
}}
</span>
</div>
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
<div
v-else-if=
"item.judged"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'否'
:
'是'
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.code"
@
blur=
"_codeEdit(
{id:scope.row.id, obj :{code:scope.row.code}})"
style="width: 130px;"
blur
placeholder="请选择检测依据"
/>
<i
@
click
.
stop=
"_selectjudgeBasis(scope.row.id,scope.$index)"
style=
"cursor: pointer;font-size: 14px;"
class=
"icons iconfont pt-search icon-search"
></i>
</div>
<div
v-else-if=
"item.key==='compareSymbol'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.compareSymbol"
@
blur=
"_compareSymbolEdit(
{id:scope.row.id, obj :{compareSymbol:scope.row.compareSymbol}})"
blur
placeholder="请输入比较符"
/>
</div>
<div
v-else-if=
"item.key==='limitValue'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.limitValue"
@
blur=
"_limitValueEdit(
{id:scope.row.id, obj :{limitValue:scope.row.limitValue}})"
blur
placeholder="请输入限值"
/>
</div>
<div
v-else-if=
"item.key==='unit'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.unit"
@
blur=
"_unitEdit(
{id:scope.row.id, obj :{unit:scope.row.unit}})"
blur
placeholder="请输入单位"
/>
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</template>
<
script
>
import
http
from
'../../api/http'
import
{
soilEntrust
}
from
'../../api'
export
default
{
components
:
{},
data
()
{
return
{
formId
:
'SoilSampleItemManage'
,
currentComponent
:
''
,
btn
:
[
// { type: 'success', id: '', name: '提交分包' },
{
type
:
'success'
,
id
:
'ZBC'
,
name
:
'取消分包'
}
],
iconMsg
:
[{
type
:
'pt-a-end'
,
id
:
''
,
name
:
'删除'
}],
sampleId
:
''
,
// 样品id
showModal
:
false
,
modalTitle
:
'管理检测项目'
,
selectIds
:
[],
itemId
:
''
,
index
:
''
,
showOption
:
true
,
searchOpen
:
true
,
selectData
:
{},
getPage
:
{},
currentRow
:
''
,
currentIndex
:
''
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'关闭'
,
type
:
'primary'
}
],
pageColumns
:
[
{
title
:
'试验名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'试验项目英文简写'
,
key
:
'shortName'
,
width
:
140
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
180
},
{
title
:
'试验方法'
,
key
:
'testMethod'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
180
}
],
subOptions
:
[
{
value
:
'0'
,
label
:
'否'
},
{
value
:
'1'
,
label
:
'是'
}
],
dateList
:
[],
formObj
:
{
name
:
undefined
,
sampleId
:
undefined
,
code
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_selectjudgeBasis
(
id
,
index
)
{
console
.
log
(
id
)
this
.
itemId
=
id
this
.
index
=
index
this
.
$refs
.
EditModal
.
_open
()
},
_optionChange
(
data
)
{
console
.
log
(
data
)
if
(
data
.
epibolyItem
===
1
)
{
this
.
_submit
(
data
.
id
)
}
else
{
this
.
_cancelSub
(
data
.
id
)
}
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'关闭'
:
this
.
_cancel
()
break
}
},
_cancel
()
{
this
.
$emit
(
'on-result-change'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
showModal
=
false
},
_ok
()
{
console
.
log
(
this
.
getPage
.
records
)
},
_modalResult
(
data1
,
data2
)
{
switch
(
this
.
currentComponent
)
{
case
'CopyModal'
:
if
(
data1
===
0
)
{
this
.
_copySample
(
data2
)
}
else
{
this
.
_copyAll
(
data2
)
}
break
default
:
this
.
_search
()
}
},
_handleRow
(
data
)
{
this
.
currentRow
=
data
.
row
this
.
currentIndex
=
data
.
rowIndex
},
_dateChange
(
data
)
{
this
.
formObj
.
ctimeBegin
=
data
[
0
]
this
.
formObj
.
ctimeEnd
=
data
[
1
]
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'提交分包'
:
this
.
_submitOutPack
()
break
case
'取消分包'
:
this
.
_cancelOutPack
()
break
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'复制历史样品'
:
this
.
_copyHisSample
()
break
case
'导入样品'
:
this
.
_importSample
()
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导出'
:
this
.
_exportSample
()
break
case
'添加模拟样品'
:
this
.
_editImitateModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_backData
(
data
)
{
this
.
getPage
.
records
[
this
.
index
].
code
=
data
.
code
this
.
_codeEdit
({
id
:
this
.
itemId
,
obj
:
{
code
:
data
.
code
}
})
},
_codeEdit
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
pageItemEdit
(
data
)
if
(
result
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
_page
()
}
else
{
this
.
$message
.
warning
(
'保存失败'
)
}
},
_compareSymbolEdit
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
pageItemEdit
(
data
)
if
(
result
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
_page
()
}
else
{
this
.
$message
.
warning
(
'保存失败'
)
}
},
_limitValueEdit
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
pageItemEdit
(
data
)
if
(
result
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
_page
()
}
else
{
this
.
$message
.
warning
(
'保存失败'
)
}
},
_unitEdit
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
pageItemEdit
(
data
)
if
(
result
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
_page
()
}
else
{
this
.
$message
.
warning
(
'保存失败'
)
}
},
_submitOutPack
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定分包这'
+
this
.
selectIds
.
length
+
'条'
,
onOk
:
()
=>
{
this
.
_submit
()
}
})
}
},
_cancelOutPack
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定取消这'
+
this
.
selectIds
.
length
+
'条分包'
,
onOk
:
()
=>
{
this
.
_cancelSub
()
}
})
}
},
_submit
:
async
function
(
data
)
{
if
(
data
!==
undefined
)
{
this
.
selectIds
=
data
}
const
result
=
await
soilEntrust
.
submitOutPack
(
this
.
selectIds
)
if
(
result
)
{
this
.
_resultChange
(
'分包成功'
)
}
},
_cancelSub
:
async
function
(
data
)
{
if
(
data
!==
undefined
)
{
this
.
selectIds
=
data
}
const
result
=
await
soilEntrust
.
cancelOutPack
(
this
.
selectIds
)
if
(
result
)
{
this
.
_resultChange
(
'取消分包成功'
)
}
},
_exportSample
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条样品'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出这'
+
this
.
selectIds
.
length
+
'条样品'
,
onOk
:
()
=>
{
http
.
open
(
'/food/v1/sample/company/export'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
},
'_blank'
)
}
})
}
},
_copyHisSample
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
sampleId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'复制'
:
this
.
_copy
(
data
)
break
case
'删除'
:
console
.
log
(
index
)
this
.
_deleteById
(
data
.
id
)
break
case
'导出样品委托协议'
:
this
.
_exportAgreement
(
data
.
id
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'sampleId'
)
break
}
})
},
_exportAgreement
(
id
)
{
this
.
$store
.
dispatch
(
'ReportExport/getById'
,
'food-contract-company-export-sample-agreement'
)
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
ReportExport
.
model
)
{
if
(
this
.
$store
.
state
.
ReportExport
.
model
.
indexOf
(
'?'
)
!==
-
1
)
{
window
.
open
(
this
.
$store
.
state
.
ReportExport
.
model
+
'&sampleId='
+
id
,
'_blank'
)
}
else
{
window
.
open
(
this
.
$store
.
state
.
ReportExport
.
model
+
'?sampleId='
+
id
,
'_blank'
)
}
}
})
},
_tableResultChange
(
msg
,
data
)
{
const
selectIds
=
[]
switch
(
msg
)
{
case
'selectData'
:
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
break
// case 'iconClick':
// this._iconClick(data.name, data.rowData, data.componentName)
// break
case
'page'
:
this
.
_page
()
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_open
(
id
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
sampleId
=
id
// 委托id
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_page
()
},
_openRecord
(
id
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
sampleId
=
id
// 委托id
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
showOption
=
false
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
=
this
.
$serializeForm
(
this
.
formObj
)
this
.
formObj
.
sampleId
=
this
.
sampleId
const
result
=
await
soilEntrust
.
experimentPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
console
.
log
(
result
)
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
ids
)
}
})
},
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilEntrust
.
deleteById
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'删除成功! '
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_detailModal
(
data
)
{},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
console
.
log
(
data
)
this
.
$refs
.
sampleManageEdit
.
_open
(
data
)
// localStorage.setItem('type', data.type)
// // 编辑
// this.$store.dispatch('FoodSample/getByCompanyId', data.id).then(() => {
// const result = this.$store.state.FoodSample.companyModel
// if (data.type === 0) {
// // 普通企业样品
// this.$refs.refModal._open(result, this.sampleId)
// } else if (data.type === 3) {
// // 模拟样品
// this._editImitateModal(true, result)
// }
// })
}
else
{
// 添加
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
sampleId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
sampleId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
sampleId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
},
_copy
(
data
)
{
this
.
$refs
.
copyModal
.
_open
(
data
.
id
,
data
.
type
)
},
// 复制样品
_copySample
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopySample
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopySample
(
result
)
}
})
},
_copyAll
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopyAll
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopyAll
(
result
)
}
})
},
// 导入样品
_importSample
()
{
const
data
=
{
importUrl
:
'/food/v1/sample/company/import_'
+
this
.
sampleId
,
downloadUrl
:
'/food/v1/excel/template/FoodSampleCompany'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
,
this
.
selectData
[
0
],
this
.
selectData
)
}
},
// 导入检测项目包
_importItemPackage
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
,
'sample-rel-package-item'
)
}
},
_copyHisItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
}
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
</
script
>
pages/soil-test-manage/SoilSampleManageHis.vue
0 → 100644
View file @
9f1534f6
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"960"
class=
"modal-footer-none"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-sample-company"
v-show=
"searchOpen"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"试样编号:"
class=
"search-item"
>
<Input
v-model=
"formObj.sampleCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入样品编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_page"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
class=
"contHide"
show-search-btn=
"true"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETableHeight
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
select-data
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.detail"
>
<a
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
</div>
<div
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETableHeight>
</Col>
</Row>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
</div>
</template>
<
script
>
import
http
from
'../../api/http'
import
{
soilEntrust
}
from
'../../api'
import
{
getLodop
}
from
'../../plugins/clodop/LodopFuncs'
import
SoilSampleItemManage
from
'./SoilSampleItemManageHis'
let
LODOP
export
default
{
components
:
{
SoilSampleItemManage
},
data
()
{
return
{
formId
:
'soilSampleManage'
,
currentComponent
:
''
,
btn
:
[
{
type
:
'success'
,
id
:
'ZBC'
,
name
:
'打印标签'
}
],
itemList
:
[],
indexList
:
[],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
],
iconMsg
:
[
{
type
:
'ios-beaker'
,
id
:
''
,
name
:
'管理检测项目'
}
// { type: 'md-trash', id: '', name: '删除' }
],
entrustId
:
''
,
// 委托id
showModal
:
false
,
recordHis
:
false
,
searchOpen
:
true
,
modalTitle
:
'管理样品'
,
selectIds
:
[],
selectData
:
{},
getPage
:
{},
pageColumns
:
[
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
100
,
fixed
:
'left'
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
100
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
100
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
,
width
:
160
},
{
title
:
'土质描述详情'
,
key
:
'describeDetail'
,
width
:
160
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
120
}
],
sampleId
:
''
,
dateList
:
[],
formObj
:
{
entrustId
:
undefined
,
sampleCode
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
methods
:
{
_inputChange
:
async
function
(
info
)
{
const
result
=
await
soilEntrust
.
sampleEdit
({
id
:
info
.
id
,
describeDetail
:
info
.
describeDetail
})
if
(
result
)
{
this
.
_resultChange
(
'修改成功'
)
}
},
_handleRow
(
data
)
{
this
.
currentRow
=
data
.
row
this
.
currentIndex
=
data
.
rowIndex
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'确定'
:
this
.
_ok
()
break
}
},
_cancel
()
{
this
.
showModal
=
false
},
_ok
()
{
this
.
showModal
=
false
this
.
$refs
.
footerModal
.
_hideLoading
()
console
.
log
(
this
.
getPage
)
},
_itemImportBack
(
data
)
{
if
(
this
.
selectIds
===
undefined
||
this
.
selectIds
.
length
===
0
)
{
return
false
}
if
(
data
===
undefined
||
data
.
length
===
0
)
{
return
false
}
this
.
_importItemOk
({
sampleIds
:
this
.
selectIds
,
drugItemList
:
data
})
},
// _importItemOk: async function(data) {
// const result = await drugSample.importSampleItemDTO(data)
// if (result) {
// this.$Message.success('导入成功!')
// await this._page()
// }
// },
_modalResult
(
data1
,
data2
)
{
switch
(
this
.
currentComponent
)
{
case
'CopyModal'
:
if
(
data1
===
0
)
{
this
.
_copySample
(
data2
)
}
else
{
this
.
_copyAll
(
data2
)
}
break
default
:
this
.
_search
()
}
},
_dateChange
(
data
)
{
this
.
formObj
.
ctimeBegin
=
data
[
0
]
this
.
formObj
.
ctimeEnd
=
data
[
1
]
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'复制历史样品'
:
this
.
_copyHisSample
()
break
case
'导入样品'
:
this
.
_importSample
()
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'打印标签'
:
this
.
_printLabel
()
break
case
'试样制备'
:
this
.
_samplePre
()
break
case
'批量填写土质描述详情'
:
this
.
_writeDetail
(
this
.
selectIds
)
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导出'
:
this
.
_exportSample
()
break
case
'添加模拟样品'
:
this
.
_editImitateModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_samplePre
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$message
.
warning
(
'至少选择一条数据'
)
}
else
{
this
.
$refs
.
preModal
.
_open
(
this
.
selectIds
.
join
(
','
))
}
},
_writeDetail
(
id
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
const
ids
=
id
.
join
(
','
)
this
.
$refs
.
writeDetailModal
.
_open
(
ids
)
}
},
_exportSample
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条样品'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出这'
+
this
.
selectIds
.
length
+
'条样品'
,
onOk
:
()
=>
{
http
.
open
(
'/food/v1/sample/company/export'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
},
'_blank'
)
}
})
}
},
_copyHisSample
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
entrustId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'管理检测项目'
:
this
.
_itemManage
(
data
.
id
)
break
case
'制备详情'
:
this
.
_preEdit
(
data
.
id
)
break
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'复制'
:
this
.
_copy
(
data
)
break
case
'删除'
:
console
.
log
(
index
)
this
.
_deleteById
(
data
.
id
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'sampleId'
)
break
}
})
},
_preEdit
(
id
)
{
this
.
$refs
.
preHisModal
.
_open
(
id
)
},
_itemManage
(
data
)
{
// 管理检测项目
if
(
this
.
recordHis
)
{
this
.
$refs
.
sampleItemManage
.
_openRecord
(
data
)
}
else
{
this
.
$refs
.
sampleItemManage
.
_open
(
data
)
}
},
_tableResultChange
(
msg
,
data
)
{
const
selectIds
=
[]
switch
(
msg
)
{
case
'selectData'
:
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
break
case
'allSelect'
:
console
.
log
(
'123465798'
,
data
)
this
.
allSelect
(
data
)
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
allSelect
(
data
)
{
this
.
indexList
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
indexList
.
push
(
data
[
i
].
index
)
}
console
.
log
(
'索引'
,
this
.
indexList
)
},
_open
(
id
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
formObj
.
entrustId
=
id
// 委托id
console
.
log
(
this
.
entrustId
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_page
()
},
_openHis
(
id
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
formObj
.
entrustId
=
id
// 委托id
console
.
log
(
this
.
entrustId
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
recordHis
=
true
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
const
result
=
await
soilEntrust
.
pagePrepareHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
// this.$store.dispatch('FoodSample/deleteByIds', ids).then(() => {
// this._resultChange('删除成功!')
// })
this
.
_deleteOk
(
ids
)
}
})
},
// _deleteOk: async function(ids) {
// const result = await drugSample.deleteById(ids)
// if (result) {
// this._resultChange('删除成功')
// }
// },
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_detailModal
(
data
)
{},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
console
.
log
(
data
)
this
.
$refs
.
sampleManageEdit
.
_open
(
data
)
}
else
{
// 添加
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
entrustId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
entrustId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
entrustId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
},
_copy
(
data
)
{
this
.
$refs
.
copyModal
.
_open
(
data
.
id
,
data
.
type
)
},
// 复制样品
_copySample
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopySample
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopySample
(
result
)
}
})
},
_copyAll
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopyAll
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopyAll
(
result
)
}
})
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
sampleItemModal
.
_open
()
this
.
$refs
.
pageTable
.
checkedData
()
}
},
// 导入检测项目包
_importItemPackage
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
// this.$refs.refModal._open(this.selectIds, 'sample-rel-package-item')
this
.
$refs
.
itemPackageModal
.
_open
(
this
.
selectIds
,
'sample-rel-package-item'
)
}
},
_printLabel
()
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
for
(
let
m
=
0
;
m
<
this
.
selectData
.
length
;
m
++
)
{
const
row
=
this
.
selectData
[
m
]
this
.
_printLabelOk
(
row
)
}
}
},
_printLabelOk
(
row
)
{
LODOP
=
getLodop
()
if
(
LODOP
===
'undefined'
||
LODOP
===
undefined
)
{
this
.
_pluginDownload
()
return
false
}
if
(
LODOP
.
GET_PRINTER_COUNT
()
===
0
)
{
this
.
$Messager
.
warning
(
'系统未关联打印机,请确认....'
)
return
false
}
LODOP
.
PRINT_INITA
(
'0mm'
,
'0mm'
,
'70.01mm'
,
'50.01mm'
,
'样品标签打印'
)
LODOP
.
ADD_PRINT_LINE
(
36
,
15
,
35
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
74
,
15
,
73
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
107
,
15
,
106
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
140
,
15
,
139
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
175
,
15
,
174
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
15
,
174
,
16
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
74
,
174
,
75
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
251
,
174
,
252
,
0
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
17
,
59
,
20
,
'样品名称'
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
18
,
59
,
20
,
'样品编号'
)
LODOP
.
ADD_PRINT_TEXT
(
116
,
17
,
59
,
20
,
'样品状态'
)
LODOP
.
ADD_PRINT_TEXT
(
151
,
27
,
39
,
20
,
'备注'
)
LODOP
.
ADD_PRINT_TEXT
(
16
,
95
,
100
,
20
,
'检测样品标签'
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Bold'
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
78
,
135
,
20
,
row
.
name
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
77
,
136
,
20
,
row
.
sampleCode
)
LODOP
.
ADD_PRINT_TEXT
(
117
,
76
,
176
,
20
,
'□未检 □在检 □已检 □留样'
)
if
(
row
.
surplus
===
'取回'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'☑"取回 □服务方处理'
)
}
else
if
(
row
.
surplus
===
'服务方处理'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 ☑服务方处理'
)
}
else
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 □服务方处理'
)
}
LODOP
.
PRINT_DESIGN
()
},
_copyHisItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
}
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
</
script
>
pages/soil-test-manage/test-data-audit/DataAuditHis.vue
View file @
9f1534f6
...
@@ -64,16 +64,19 @@
...
@@ -64,16 +64,19 @@
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userResult"
></UserInfo>
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userResult"
></UserInfo>
<Operation
ref=
"operation"
></Operation>
<Operation
ref=
"operation"
></Operation>
<FileManage
ref=
"FileManage"
></FileManage>
<FileManage
ref=
"FileManage"
></FileManage>
<SoilSampleManageHis
ref=
"sampleManageModal"
></SoilSampleManageHis>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
{
soilTest
}
from
'../../../api'
import
{
soilTest
}
from
'../../../api'
import
Operation
from
'../../../components/operation/Operation'
import
Operation
from
'../../../components/operation/Operation'
import
SoilSampleManageHis
from
'../SoilSampleManageHis'
export
default
{
export
default
{
components
:
{
components
:
{
UserInfo
,
UserInfo
,
Operation
Operation
,
SoilSampleManageHis
},
},
data
()
{
data
()
{
return
{
return
{
...
...
pages/soil-test-manage/test-data-check/DataCheckHis.vue
View file @
9f1534f6
...
@@ -64,16 +64,19 @@
...
@@ -64,16 +64,19 @@
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userResult"
></UserInfo>
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userResult"
></UserInfo>
<Operation
ref=
"operation"
></Operation>
<Operation
ref=
"operation"
></Operation>
<FileManage
ref=
"FileManage"
></FileManage>
<FileManage
ref=
"FileManage"
></FileManage>
<SoilSampleManageHis
ref=
"sampleManageModal"
></SoilSampleManageHis>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
{
soilTest
}
from
'../../../api'
import
{
soilTest
}
from
'../../../api'
import
Operation
from
'../../../components/operation/Operation'
import
Operation
from
'../../../components/operation/Operation'
import
SoilSampleManageHis
from
'../SoilSampleManageHis'
export
default
{
export
default
{
components
:
{
components
:
{
UserInfo
,
UserInfo
,
Operation
Operation
,
SoilSampleManageHis
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -89,7 +92,6 @@ export default {
...
@@ -89,7 +92,6 @@ export default {
name
:
'管理样品'
name
:
'管理样品'
},
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
},
{
{
type
:
'ios-clock'
,
type
:
'ios-clock'
,
id
:
''
,
id
:
''
,
...
@@ -399,7 +401,7 @@ export default {
...
@@ -399,7 +401,7 @@ export default {
_page
:
async
function
()
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilTest
.
pageExp
Test
(
const
result
=
await
soilTest
.
pageExp
CheckHis
(
this
.
$serializeForm
(
this
.
formObj
)
this
.
$serializeForm
(
this
.
formObj
)
)
)
if
(
result
)
{
if
(
result
)
{
...
...
pages/soil-test-manage/test-input/EquipManage.vue
0 → 100644
View file @
9f1534f6
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"800"
class=
"modal-footer-none full-screen"
>
<div
slot=
"header"
>
{{
modalTitle
}}
</div>
<div>
<Form
id=
"index-right-form"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"仪器名称:"
>
<Input
v-model=
"formObj.equipName"
@
on-enter=
"_formSearch"
placeholder=
"请输入仪器名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 10px;"
/>
<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"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='defaulted'"
>
{{
scope
.
row
[
item
.
key
]?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</div>
</Modal>
<IndexManageEdit
ref=
"indexEdit"
@
on-result-change=
"_page"
></IndexManageEdit>
</div>
</template>
<
script
>
import
{
soilTest
}
from
'../../../api'
import
IndexManageEdit
from
'./IndexManageEdit'
export
default
{
components
:
{
IndexManageEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
pageColumns
:
[
{
title
:
'仪器名称'
,
key
:
'equipName'
,
width
:
120
},
{
title
:
'仪器编号'
,
key
:
'equipNum'
,
width
:
120
},
{
title
:
'仪器品牌'
,
key
:
'brand'
,
width
:
120
},
{
title
:
'采集类型'
,
key
:
'collectionType'
,
width
:
120
},
{
title
:
'采集地址'
,
key
:
'collectionAddress'
,
width
:
120
},
{
title
:
'采集命令'
,
key
:
'acquisitionCommand'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}],
selectIds
:
[],
formObj
:
{
name
:
''
},
// 资质信息
aptitudeItemInfo
:
{}
}
},
methods
:
{
_open
(
data
)
{
console
.
log
(
data
)
this
.
aptitudeItemInfo
=
data
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
id
=
data
.
id
this
.
modalTitle
=
data
.
name
+
' 设备管理'
this
.
showModal
=
true
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
experimentId
=
this
.
id
const
result
=
await
soilTest
.
equipPage
(
this
.
$serializeForm
(
this
.
formObj
))
if
(
result
)
{
console
.
log
(
result
)
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'删除'
:
this
.
_deleteByIds
(
data
.
id
)
break
}
},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
this
.
_getById
(
data
)
}
else
{
this
.
$refs
.
indexEdit
.
_open
(
this
.
id
,
''
)
}
},
_getById
:
async
function
(
data
)
{
const
result
=
await
soilTest
.
itemGetById
(
data
.
id
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$refs
.
indexEdit
.
_open
(
''
,
result
)
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加指标'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteByIds
()
break
}
},
_deleteByIds
(
id
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除这条记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
id
)
}
})
},
_delOk
:
async
function
(
id
)
{
const
result
=
await
soilTest
.
deleteEquip
(
id
)
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-input/SoilSampleItemManageHis.vue
0 → 100644
View file @
9f1534f6
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"1200"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-sample-company"
v-show=
"searchOpen"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"检测项目:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入检测项目"
clearable
/>
</Form-item>
<Form-item
label=
"检测依据:"
class=
"search-item"
>
<Input
v-model=
"formObj.code"
@
on-enter=
"_formSearch"
placeholder=
"请输入检测依据"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
class=
"contHide"
show-search-btn=
"true"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
:get-page=
"getPage"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.detail"
>
<a
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
</div>
<div
v-else-if=
"item.key==='epibolyItem'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-select
v-if=
"showOption"
v-model=
"scope.row.epibolyItem"
@
change=
"_optionChange(scope.row)"
placeholder=
"请选择"
>
<el-option
v-for=
"(item,index) in subOptions"
:key=
"index"
:label=
"item.label"
:value=
"index"
/>
</el-select>
<span
v-if=
"!showOption"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'否'
:
'是'
}}
</span>
</div>
<span
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
<div
v-else-if=
"item.judged"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'否'
:
'是'
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.code"
@
blur=
"_codeEdit(
{id:scope.row.id, obj :{code:scope.row.code}})"
style="width: 130px;"
blur
placeholder="请选择检测依据"
/>
<i
@
click
.
stop=
"_selectjudgeBasis(scope.row.id,scope.$index)"
style=
"cursor: pointer;font-size: 14px;"
class=
"icons iconfont pt-search icon-search"
></i>
</div>
<div
v-else-if=
"item.key==='compareSymbol'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.compareSymbol"
@
blur=
"_compareSymbolEdit(
{id:scope.row.id, obj :{compareSymbol:scope.row.compareSymbol}})"
blur
placeholder="请输入比较符"
/>
</div>
<div
v-else-if=
"item.key==='limitValue'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.limitValue"
@
blur=
"_limitValueEdit(
{id:scope.row.id, obj :{limitValue:scope.row.limitValue}})"
blur
placeholder="请输入限值"
/>
</div>
<div
v-else-if=
"item.key==='unit'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.unit"
@
blur=
"_unitEdit(
{id:scope.row.id, obj :{unit:scope.row.unit}})"
blur
placeholder="请输入单位"
/>
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
</div>
</template>
<
script
>
import
http
from
'../../../api/http'
import
{
soilEntrust
}
from
'../../../api'
export
default
{
components
:
{},
data
()
{
return
{
formId
:
'SoilSampleItemManage'
,
currentComponent
:
''
,
btn
:
[
// { type: 'success', id: '', name: '提交分包' },
{
type
:
'success'
,
id
:
'ZBC'
,
name
:
'取消分包'
}
],
iconMsg
:
[{
type
:
'pt-a-end'
,
id
:
''
,
name
:
'删除'
}],
sampleId
:
''
,
// 样品id
showModal
:
false
,
modalTitle
:
'管理检测项目'
,
selectIds
:
[],
itemId
:
''
,
index
:
''
,
showOption
:
true
,
searchOpen
:
true
,
selectData
:
{},
getPage
:
{},
currentRow
:
''
,
currentIndex
:
''
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'关闭'
,
type
:
'primary'
}
],
pageColumns
:
[
{
title
:
'试验名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'试验项目英文简写'
,
key
:
'shortName'
,
width
:
140
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
180
},
{
title
:
'试验方法'
,
key
:
'testMethod'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
180
}
],
subOptions
:
[
{
value
:
'0'
,
label
:
'否'
},
{
value
:
'1'
,
label
:
'是'
}
],
dateList
:
[],
formObj
:
{
name
:
undefined
,
sampleId
:
undefined
,
code
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
methods
:
{
_selectjudgeBasis
(
id
,
index
)
{
console
.
log
(
id
)
this
.
itemId
=
id
this
.
index
=
index
this
.
$refs
.
EditModal
.
_open
()
},
_optionChange
(
data
)
{
console
.
log
(
data
)
if
(
data
.
epibolyItem
===
1
)
{
this
.
_submit
(
data
.
id
)
}
else
{
this
.
_cancelSub
(
data
.
id
)
}
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'关闭'
:
this
.
_cancel
()
break
}
},
_cancel
()
{
this
.
$emit
(
'on-result-change'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
showModal
=
false
},
_ok
()
{
console
.
log
(
this
.
getPage
.
records
)
},
_modalResult
(
data1
,
data2
)
{
switch
(
this
.
currentComponent
)
{
case
'CopyModal'
:
if
(
data1
===
0
)
{
this
.
_copySample
(
data2
)
}
else
{
this
.
_copyAll
(
data2
)
}
break
default
:
this
.
_search
()
}
},
_handleRow
(
data
)
{
this
.
currentRow
=
data
.
row
this
.
currentIndex
=
data
.
rowIndex
},
_dateChange
(
data
)
{
this
.
formObj
.
ctimeBegin
=
data
[
0
]
this
.
formObj
.
ctimeEnd
=
data
[
1
]
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'提交分包'
:
this
.
_submitOutPack
()
break
case
'取消分包'
:
this
.
_cancelOutPack
()
break
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'复制历史样品'
:
this
.
_copyHisSample
()
break
case
'导入样品'
:
this
.
_importSample
()
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导出'
:
this
.
_exportSample
()
break
case
'添加模拟样品'
:
this
.
_editImitateModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_backData
(
data
)
{
this
.
getPage
.
records
[
this
.
index
].
code
=
data
.
code
this
.
_codeEdit
({
id
:
this
.
itemId
,
obj
:
{
code
:
data
.
code
}
})
},
_codeEdit
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
pageItemEdit
(
data
)
if
(
result
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
_page
()
}
else
{
this
.
$message
.
warning
(
'保存失败'
)
}
},
_compareSymbolEdit
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
pageItemEdit
(
data
)
if
(
result
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
_page
()
}
else
{
this
.
$message
.
warning
(
'保存失败'
)
}
},
_limitValueEdit
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
pageItemEdit
(
data
)
if
(
result
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
_page
()
}
else
{
this
.
$message
.
warning
(
'保存失败'
)
}
},
_unitEdit
:
async
function
(
data
)
{
const
result
=
await
soilEntrust
.
pageItemEdit
(
data
)
if
(
result
)
{
this
.
$message
.
success
(
'保存成功'
)
this
.
_page
()
}
else
{
this
.
$message
.
warning
(
'保存失败'
)
}
},
_submitOutPack
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定分包这'
+
this
.
selectIds
.
length
+
'条'
,
onOk
:
()
=>
{
this
.
_submit
()
}
})
}
},
_cancelOutPack
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定取消这'
+
this
.
selectIds
.
length
+
'条分包'
,
onOk
:
()
=>
{
this
.
_cancelSub
()
}
})
}
},
_submit
:
async
function
(
data
)
{
if
(
data
!==
undefined
)
{
this
.
selectIds
=
data
}
const
result
=
await
soilEntrust
.
submitOutPack
(
this
.
selectIds
)
if
(
result
)
{
this
.
_resultChange
(
'分包成功'
)
}
},
_cancelSub
:
async
function
(
data
)
{
if
(
data
!==
undefined
)
{
this
.
selectIds
=
data
}
const
result
=
await
soilEntrust
.
cancelOutPack
(
this
.
selectIds
)
if
(
result
)
{
this
.
_resultChange
(
'取消分包成功'
)
}
},
_exportSample
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条样品'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出这'
+
this
.
selectIds
.
length
+
'条样品'
,
onOk
:
()
=>
{
http
.
open
(
'/food/v1/sample/company/export'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
},
'_blank'
)
}
})
}
},
_copyHisSample
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
sampleId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'复制'
:
this
.
_copy
(
data
)
break
case
'删除'
:
console
.
log
(
index
)
this
.
_deleteById
(
data
.
id
)
break
case
'导出样品委托协议'
:
this
.
_exportAgreement
(
data
.
id
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'sampleId'
)
break
}
})
},
_exportAgreement
(
id
)
{
this
.
$store
.
dispatch
(
'ReportExport/getById'
,
'food-contract-company-export-sample-agreement'
)
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
ReportExport
.
model
)
{
if
(
this
.
$store
.
state
.
ReportExport
.
model
.
indexOf
(
'?'
)
!==
-
1
)
{
window
.
open
(
this
.
$store
.
state
.
ReportExport
.
model
+
'&sampleId='
+
id
,
'_blank'
)
}
else
{
window
.
open
(
this
.
$store
.
state
.
ReportExport
.
model
+
'?sampleId='
+
id
,
'_blank'
)
}
}
})
},
_tableResultChange
(
msg
,
data
)
{
const
selectIds
=
[]
switch
(
msg
)
{
case
'selectData'
:
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
break
// case 'iconClick':
// this._iconClick(data.name, data.rowData, data.componentName)
// break
case
'page'
:
this
.
_page
()
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_open
(
id
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
sampleId
=
id
// 委托id
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_page
()
},
_openRecord
(
id
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
sampleId
=
id
// 委托id
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
showOption
=
false
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
=
this
.
$serializeForm
(
this
.
formObj
)
this
.
formObj
.
sampleId
=
this
.
sampleId
const
result
=
await
soilEntrust
.
experimentPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
console
.
log
(
result
)
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
ids
)
}
})
},
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilEntrust
.
deleteById
(
ids
)
if
(
result
)
{
this
.
_resultChange
(
'删除成功! '
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_detailModal
(
data
)
{},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
console
.
log
(
data
)
this
.
$refs
.
sampleManageEdit
.
_open
(
data
)
// localStorage.setItem('type', data.type)
// // 编辑
// this.$store.dispatch('FoodSample/getByCompanyId', data.id).then(() => {
// const result = this.$store.state.FoodSample.companyModel
// if (data.type === 0) {
// // 普通企业样品
// this.$refs.refModal._open(result, this.sampleId)
// } else if (data.type === 3) {
// // 模拟样品
// this._editImitateModal(true, result)
// }
// })
}
else
{
// 添加
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
sampleId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
sampleId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
sampleId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
},
_copy
(
data
)
{
this
.
$refs
.
copyModal
.
_open
(
data
.
id
,
data
.
type
)
},
// 复制样品
_copySample
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopySample
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopySample
(
result
)
}
})
},
_copyAll
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopyAll
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopyAll
(
result
)
}
})
},
// 导入样品
_importSample
()
{
const
data
=
{
importUrl
:
'/food/v1/sample/company/import_'
+
this
.
sampleId
,
downloadUrl
:
'/food/v1/excel/template/FoodSampleCompany'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
,
this
.
selectData
[
0
],
this
.
selectData
)
}
},
// 导入检测项目包
_importItemPackage
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
,
'sample-rel-package-item'
)
}
},
_copyHisItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
}
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
</
script
>
pages/soil-test-manage/test-input/SoilSampleManageHis.vue
0 → 100644
View file @
9f1534f6
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"960"
class=
"modal-footer-none"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-sample-company"
v-show=
"searchOpen"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"试样编号:"
class=
"search-item"
>
<Input
v-model=
"formObj.sampleCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入样品编号"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_page"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
class=
"contHide"
show-search-btn=
"true"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETableHeight
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
select-data
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.detail"
>
<a
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
</div>
<div
v-else-if=
"item.status"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETableHeight>
</Col>
</Row>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
</Modal>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
</div>
</template>
<
script
>
import
http
from
'../../../api/http'
import
{
getLodop
}
from
'../../../plugins/clodop/LodopFuncs'
import
{
soilTest
,
soilEntrust
}
from
'../../../api'
import
SoilSampleItemManage
from
'./SoilSampleItemManageHis'
let
LODOP
export
default
{
components
:
{
SoilSampleItemManage
},
data
()
{
return
{
formId
:
'soilSampleManage'
,
currentComponent
:
''
,
btn
:
[
{
type
:
'success'
,
id
:
'ZBC'
,
name
:
'打印标签'
}
],
itemList
:
[],
indexList
:
[],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
],
iconMsg
:
[
{
type
:
'ios-beaker'
,
id
:
''
,
name
:
'管理检测项目'
}
// { type: 'md-trash', id: '', name: '删除' }
],
entrustId
:
''
,
// 委托id
showModal
:
false
,
recordHis
:
false
,
searchOpen
:
true
,
modalTitle
:
'管理样品'
,
selectIds
:
[],
selectData
:
{},
getPage
:
{},
pageColumns
:
[
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
100
,
fixed
:
'left'
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
100
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
100
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
,
width
:
160
},
{
title
:
'土质描述详情'
,
key
:
'describeDetail'
,
width
:
160
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
120
}
],
sampleId
:
''
,
dateList
:
[],
formObj
:
{
entrustId
:
undefined
,
sampleCode
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
methods
:
{
_inputChange
:
async
function
(
info
)
{
const
result
=
await
soilEntrust
.
sampleEdit
({
id
:
info
.
id
,
describeDetail
:
info
.
describeDetail
})
if
(
result
)
{
this
.
_resultChange
(
'修改成功'
)
}
},
_handleRow
(
data
)
{
this
.
currentRow
=
data
.
row
this
.
currentIndex
=
data
.
rowIndex
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'确定'
:
this
.
_ok
()
break
}
},
_cancel
()
{
this
.
showModal
=
false
},
_ok
()
{
this
.
showModal
=
false
this
.
$refs
.
footerModal
.
_hideLoading
()
console
.
log
(
this
.
getPage
)
},
_itemImportBack
(
data
)
{
if
(
this
.
selectIds
===
undefined
||
this
.
selectIds
.
length
===
0
)
{
return
false
}
if
(
data
===
undefined
||
data
.
length
===
0
)
{
return
false
}
this
.
_importItemOk
({
sampleIds
:
this
.
selectIds
,
drugItemList
:
data
})
},
// _importItemOk: async function(data) {
// const result = await drugSample.importSampleItemDTO(data)
// if (result) {
// this.$Message.success('导入成功!')
// await this._page()
// }
// },
_modalResult
(
data1
,
data2
)
{
switch
(
this
.
currentComponent
)
{
case
'CopyModal'
:
if
(
data1
===
0
)
{
this
.
_copySample
(
data2
)
}
else
{
this
.
_copyAll
(
data2
)
}
break
default
:
this
.
_search
()
}
},
_dateChange
(
data
)
{
this
.
formObj
.
ctimeBegin
=
data
[
0
]
this
.
formObj
.
ctimeEnd
=
data
[
1
]
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
(
false
)
break
case
'复制历史样品'
:
this
.
_copyHisSample
()
break
case
'导入样品'
:
this
.
_importSample
()
break
case
'导入检测项目'
:
this
.
_importItem
()
break
case
'导入检测项目包'
:
this
.
_importItemPackage
()
break
case
'打印标签'
:
this
.
_printLabel
()
break
case
'试样制备'
:
this
.
_samplePre
()
break
case
'批量填写土质描述详情'
:
this
.
_writeDetail
(
this
.
selectIds
)
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导出'
:
this
.
_exportSample
()
break
case
'添加模拟样品'
:
this
.
_editImitateModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_samplePre
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$message
.
warning
(
'至少选择一条数据'
)
}
else
{
this
.
$refs
.
preModal
.
_open
(
this
.
selectIds
.
join
(
','
))
}
},
_writeDetail
(
id
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
const
ids
=
id
.
join
(
','
)
this
.
$refs
.
writeDetailModal
.
_open
(
ids
)
}
},
_exportSample
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条样品'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定导出这'
+
this
.
selectIds
.
length
+
'条样品'
,
onOk
:
()
=>
{
http
.
open
(
'/food/v1/sample/company/export'
,
{
ids
:
this
.
selectIds
.
join
(
','
)
},
'_blank'
)
}
})
}
},
_copyHisSample
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
entrustId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'管理检测项目'
:
this
.
_itemManage
(
data
.
id
)
break
case
'制备详情'
:
this
.
_preEdit
(
data
.
id
)
break
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'复制'
:
this
.
_copy
(
data
)
break
case
'删除'
:
console
.
log
(
index
)
this
.
_deleteById
(
data
.
id
)
break
case
'附件'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
,
'sampleId'
)
break
}
})
},
_preEdit
(
id
)
{
this
.
$refs
.
preHisModal
.
_open
(
id
)
},
_itemManage
(
data
)
{
// 管理检测项目
if
(
this
.
recordHis
)
{
this
.
$refs
.
sampleItemManage
.
_openRecord
(
data
)
}
else
{
this
.
$refs
.
sampleItemManage
.
_open
(
data
)
}
},
_tableResultChange
(
msg
,
data
)
{
const
selectIds
=
[]
switch
(
msg
)
{
case
'selectData'
:
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
break
case
'allSelect'
:
console
.
log
(
'123465798'
,
data
)
this
.
allSelect
(
data
)
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
allSelect
(
data
)
{
this
.
indexList
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
this
.
indexList
.
push
(
data
[
i
].
index
)
}
console
.
log
(
'索引'
,
this
.
indexList
)
},
_open
(
id
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
formObj
.
entrustId
=
id
// 委托id
console
.
log
(
this
.
entrustId
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_page
()
},
_openHis
(
id
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
formObj
.
entrustId
=
id
// 委托id
console
.
log
(
this
.
entrustId
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
recordHis
=
true
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
const
result
=
await
soilTest
.
pageExpTestSampleHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
// this.$store.dispatch('FoodSample/deleteByIds', ids).then(() => {
// this._resultChange('删除成功!')
// })
this
.
_deleteOk
(
ids
)
}
})
},
// _deleteOk: async function(ids) {
// const result = await drugSample.deleteById(ids)
// if (result) {
// this._resultChange('删除成功')
// }
// },
_deleteById
(
id
)
{
// 删除一条记录
this
.
_deleteByIds
([
id
])
},
_deleteSelected
()
{
// 批量删除
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
,
'确定删除 '
+
ids
.
length
+
' 条记录?'
)
}
},
_detailModal
(
data
)
{},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
console
.
log
(
data
)
this
.
$refs
.
sampleManageEdit
.
_open
(
data
)
}
else
{
// 添加
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
entrustId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
entrustId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
entrustId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
},
_copy
(
data
)
{
this
.
$refs
.
copyModal
.
_open
(
data
.
id
,
data
.
type
)
},
// 复制样品
_copySample
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopySample
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopySample
(
result
)
}
})
},
_copyAll
(
data
)
{
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
companyModel
if
(
data
.
type
===
0
)
{
// 普通样品
this
.
currentComponent
=
'FoodSampleCompanyEdit'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openCopyAll
(
result
)
})
}
else
if
(
data
.
type
===
3
)
{
// 模拟样品
this
.
$refs
.
imitateModal
.
_openCopyAll
(
result
)
}
})
},
// 导入检测项目
_importItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
sampleItemModal
.
_open
()
this
.
$refs
.
pageTable
.
checkedData
()
}
},
// 导入检测项目包
_importItemPackage
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
// this.$refs.refModal._open(this.selectIds, 'sample-rel-package-item')
this
.
$refs
.
itemPackageModal
.
_open
(
this
.
selectIds
,
'sample-rel-package-item'
)
}
},
_printLabel
()
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
for
(
let
m
=
0
;
m
<
this
.
selectData
.
length
;
m
++
)
{
const
row
=
this
.
selectData
[
m
]
this
.
_printLabelOk
(
row
)
}
}
},
_printLabelOk
(
row
)
{
LODOP
=
getLodop
()
if
(
LODOP
===
'undefined'
||
LODOP
===
undefined
)
{
this
.
_pluginDownload
()
return
false
}
if
(
LODOP
.
GET_PRINTER_COUNT
()
===
0
)
{
this
.
$Messager
.
warning
(
'系统未关联打印机,请确认....'
)
return
false
}
LODOP
.
PRINT_INITA
(
'0mm'
,
'0mm'
,
'70.01mm'
,
'50.01mm'
,
'样品标签打印'
)
LODOP
.
ADD_PRINT_LINE
(
36
,
15
,
35
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
74
,
15
,
73
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
107
,
15
,
106
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
140
,
15
,
139
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
175
,
15
,
174
,
251
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
15
,
174
,
16
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
74
,
174
,
75
,
0
,
1
)
LODOP
.
ADD_PRINT_LINE
(
35
,
251
,
174
,
252
,
0
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
17
,
59
,
20
,
'样品名称'
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
18
,
59
,
20
,
'样品编号'
)
LODOP
.
ADD_PRINT_TEXT
(
116
,
17
,
59
,
20
,
'样品状态'
)
LODOP
.
ADD_PRINT_TEXT
(
151
,
27
,
39
,
20
,
'备注'
)
LODOP
.
ADD_PRINT_TEXT
(
16
,
95
,
100
,
20
,
'检测样品标签'
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Bold'
,
1
)
LODOP
.
ADD_PRINT_TEXT
(
49
,
78
,
135
,
20
,
row
.
name
)
LODOP
.
ADD_PRINT_TEXT
(
82
,
77
,
136
,
20
,
row
.
sampleCode
)
LODOP
.
ADD_PRINT_TEXT
(
117
,
76
,
176
,
20
,
'□未检 □在检 □已检 □留样'
)
if
(
row
.
surplus
===
'取回'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'☑"取回 □服务方处理'
)
}
else
if
(
row
.
surplus
===
'服务方处理'
)
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 ☑服务方处理'
)
}
else
{
LODOP
.
ADD_PRINT_TEXT
(
152
,
77
,
138
,
20
,
'□取回 □服务方处理'
)
}
LODOP
.
PRINT_DESIGN
()
},
_copyHisItem
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选中一条样品数据!'
)
}
else
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectIds
)
}
},
_operationRecord
(
id
)
{
// 操作日志
this
.
$refs
.
recordModal
.
_open
(
id
)
}
}
}
</
script
>
pages/soil-test-manage/test-input/TestInputHis.vue
View file @
9f1534f6
...
@@ -64,16 +64,19 @@
...
@@ -64,16 +64,19 @@
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userResult"
></UserInfo>
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userResult"
></UserInfo>
<Operation
ref=
"operation"
></Operation>
<Operation
ref=
"operation"
></Operation>
<FileManage
ref=
"FileManage"
></FileManage>
<FileManage
ref=
"FileManage"
></FileManage>
<SoilSampleManageHis
ref=
"sampleManageModal"
></SoilSampleManageHis>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
UserInfo
from
'../../../components/user-info-single/AssignPerson'
import
{
soilTest
}
from
'../../../api'
import
{
soilTest
}
from
'../../../api'
import
Operation
from
'../../../components/operation/Operation'
import
Operation
from
'../../../components/operation/Operation'
import
SoilSampleManageHis
from
'./SoilSampleManageHis'
export
default
{
export
default
{
components
:
{
components
:
{
UserInfo
,
UserInfo
,
Operation
Operation
,
SoilSampleManageHis
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -89,7 +92,6 @@ export default {
...
@@ -89,7 +92,6 @@ export default {
name
:
'管理样品'
name
:
'管理样品'
},
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-cloud'
,
id
:
''
,
name
:
'附件'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
},
{
{
type
:
'ios-clock'
,
type
:
'ios-clock'
,
id
:
''
,
id
:
''
,
...
@@ -399,7 +401,7 @@ export default {
...
@@ -399,7 +401,7 @@ export default {
_page
:
async
function
()
{
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
console
.
log
(
'this.formObj'
,
this
.
formObj
)
console
.
log
(
'this.formObj'
,
this
.
formObj
)
const
result
=
await
soilTest
.
pageExpTest
(
const
result
=
await
soilTest
.
pageExpTest
His
(
this
.
$serializeForm
(
this
.
formObj
)
this
.
$serializeForm
(
this
.
formObj
)
)
)
if
(
result
)
{
if
(
result
)
{
...
...
pages/soil-test-manage/test-input/item-tabs/ItemRightList.vue
View file @
9f1534f6
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
<SelectOriTempRecord
ref=
"recordModal"
@
on-result-change=
"_page"
></SelectOriTempRecord>
<SelectOriTempRecord
ref=
"recordModal"
@
on-result-change=
"_page"
></SelectOriTempRecord>
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
<EquipManage
ref=
"equipModal"
@
on-result-change=
"_page"
></EquipManage>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
</div>
</div>
</template>
</template>
...
@@ -62,13 +63,15 @@ import SelectOriTempRecord from '../SelectOriTempRecord'
...
@@ -62,13 +63,15 @@ import SelectOriTempRecord from '../SelectOriTempRecord'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
import
IndexManage
from
'../IndexManage'
import
IndexManage
from
'../IndexManage'
import
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
EquipManage
from
'../EquipManage'
export
default
{
export
default
{
components
:
{
components
:
{
AssignPerson
,
AssignPerson
,
SelectOriTempRecord
,
SelectOriTempRecord
,
OriginalRecordEdit
,
OriginalRecordEdit
,
IndexManage
,
IndexManage
,
SelEquip
SelEquip
,
EquipManage
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -119,7 +122,8 @@ export default {
...
@@ -119,7 +122,8 @@ export default {
],
],
iconMsg
:
[
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
}
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
},
{
type
:
'ios-flask'
,
id
:
''
,
name
:
'设备列表'
}
],
],
getPage
:
{},
getPage
:
{},
pageColumns
:
[
pageColumns
:
[
...
@@ -168,17 +172,28 @@ export default {
...
@@ -168,17 +172,28 @@ export default {
switch
(
res
)
{
switch
(
res
)
{
case
'查看原始记录'
:
case
'查看原始记录'
:
console
.
log
(
data
)
console
.
log
(
data
)
this
.
_viewRecord
(
'1309434759937146882'
)
if
(
data
.
recorded
===
'是'
)
{
// this._viewRecord('1309434759937146882')
this
.
_viewRecord
(
data
.
originalRecordId
)
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
break
break
case
'查看指标'
:
case
'查看指标'
:
this
.
_indexManage
(
data
)
this
.
_indexManage
(
data
)
break
break
case
'设备列表'
:
this
.
_equipManage
(
data
)
break
}
}
})
})
},
},
_indexManage
(
data
)
{
_indexManage
(
data
)
{
this
.
$refs
.
indexModal
.
_open
(
data
)
this
.
$refs
.
indexModal
.
_open
(
data
)
},
},
_equipManage
(
data
)
{
this
.
$refs
.
equipModal
.
_open
(
data
)
},
_viewRecord
(
originalRecordId
)
{
_viewRecord
(
originalRecordId
)
{
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
// eslint-disable-next-line no-undef
// eslint-disable-next-line no-undef
...
@@ -210,8 +225,30 @@ export default {
...
@@ -210,8 +225,30 @@ export default {
this
.
userColumns
=
colList
this
.
userColumns
=
colList
this
.
$refs
.
pageTable
.
_loadColumn
(
colList
)
this
.
$refs
.
pageTable
.
_loadColumn
(
colList
)
},
},
_equipResult
(
res
)
{
_equipResult
:
async
function
(
res
)
{
console
.
log
(
res
)
console
.
log
(
res
)
const
tempData
=
{}
tempData
.
equipList
=
[]
res
.
map
((
item
,
index
)
=>
{
tempData
.
equipList
.
push
({
equipId
:
item
.
id
,
equipName
:
item
.
name
,
acquisitionCommand
:
item
.
acquisitionCommand
,
brand
:
item
.
brand
,
collectionAddress
:
item
.
acquisitionAddress
,
collectionType
:
item
.
acquisitionType
,
equipNum
:
item
.
labNum
,
ipAddress
:
item
.
ipAddress
,
labNum
:
item
.
classId
,
spec
:
item
.
spec
})
})
tempData
.
expIds
=
this
.
selectIds
const
result
=
await
soilTest
.
addExpEquip
(
tempData
)
if
(
result
)
{
this
.
$Message
.
success
(
'添加成功'
)
}
// let equipIds = []
// let equipIds = []
// for (let i = 0; i
<
res
.
length
;
i
++
)
{
// for (let i = 0; i
<
res
.
length
;
i
++
)
{
// equipIds.push(res[i].id)
// equipIds.push(res[i].id)
...
@@ -392,17 +429,13 @@ export default {
...
@@ -392,17 +429,13 @@ export default {
},
},
_submitItem
(
data
)
{
_submitItem
(
data
)
{
console
.
log
(
data
)
console
.
log
(
data
)
if
(
data
[
0
].
recorded
!==
'是'
)
{
this
.
$Modal
.
confirm
({
this
.
$Message
.
warning
(
'未编制报告不能提交'
)
title
:
'提示'
,
}
else
{
content
:
'确定提交该数据?'
,
this
.
$Modal
.
confirm
({
onOk
:
()
=>
{
title
:
'提示'
,
this
.
_submitOk
()
content
:
'确定提交该数据?'
,
}
onOk
:
()
=>
{
})
this
.
_submitOk
()
}
})
}
},
},
_submitOk
:
async
function
()
{
_submitOk
:
async
function
()
{
const
result
=
await
soilTest
.
endExp
(
this
.
selectIds
.
join
(
','
))
const
result
=
await
soilTest
.
endExp
(
this
.
selectIds
.
join
(
','
))
...
@@ -414,8 +447,20 @@ export default {
...
@@ -414,8 +447,20 @@ export default {
if
(
this
.
selectIds
.
length
===
0
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$message
.
warning
(
'请至少选择一条数据'
)
this
.
$message
.
warning
(
'请至少选择一条数据'
)
}
else
{
}
else
{
console
.
log
(
'打开填写原始记录界面'
)
const
errorInfo
=
[]
this
.
$refs
.
recordModal
.
_open
(
this
.
selectIds
,
this
.
entrustId
)
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
console
.
log
(
this
.
selectData
[
i
].
recorded
)
if
(
this
.
selectData
[
i
].
recorded
===
'否'
)
{
errorInfo
.
push
(
this
.
selectData
[
i
].
index
+
1
)
}
}
console
.
log
(
'未编制报告'
,
errorInfo
)
if
(
errorInfo
.
length
!==
0
)
{
this
.
$Message
.
warning
(
'第'
+
errorInfo
+
'条数据未编制报告'
)
}
else
{
console
.
log
(
'打开填写原始记录界面'
)
this
.
$refs
.
recordModal
.
_open
(
this
.
selectIds
,
this
.
entrustId
)
}
}
}
},
},
_allotByPerson
()
{
_allotByPerson
()
{
...
...
pages/soil-test-manage/test-input/sample-tabs/SampleRightList.vue
View file @
9f1534f6
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<!-- 表格 -->
<!-- 表格 -->
<Col
span=
"24"
>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:pageColumns=
"pageColumns"
:tableHeight=
"tableHeight"
<PTVXETable
ref=
"pageTable"
:pageColumns=
"pageColumns"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:table-name=
"tableName"
:rows=
"100"
is-task
select-data
>
@
on-result-change=
"_tableResultChange"
:
icon-msg=
"iconMsg"
:
getPage=
"getPage"
:table-name=
"tableName"
:rows=
"100"
is-task
select-data
>
<vxe-table-column
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
:key=
"item.key"
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</div>
</div>
<a
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<a
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<a
v-else-if=
"item.key==='num'"
@
click
.
stop=
"_sampleDetail(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<a
v-else-if=
"item.key==='num'"
@
click
.
stop=
"_sampleDetail(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<span
v-else-if=
"item.key==='
statu
s'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.key==='
progres
s'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
<span
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else-if=
"item.datetime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</span>
<span
v-else-if=
"item.datetime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</span>
...
@@ -48,14 +48,28 @@
...
@@ -48,14 +48,28 @@
</Col>
</Col>
</Row>
</Row>
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_assignBackData"
></AssignPerson>
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_assignBackData"
></AssignPerson>
<SelectOriTempRecord
ref=
"recordModal"
@
on-result-change=
"_page"
></SelectOriTempRecord>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
<EquipManage
ref=
"equipModal"
@
on-result-change=
"_page"
></EquipManage>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Global
from
'../../../../api/config'
import
Global
from
'../../../../api/config'
import
{
soilTest
}
from
'../../../../api'
import
{
soilTest
}
from
'../../../../api'
import
AssignPerson
from
'../../../../components/user-info-single/AssignPerson'
import
AssignPerson
from
'../../../../components/user-info-single/AssignPerson'
import
SelectOriTempRecord
from
'../SelectOriTempRecord'
import
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
IndexManage
from
'../IndexManage'
import
EquipManage
from
'../EquipManage'
export
default
{
export
default
{
components
:
{
AssignPerson
},
components
:
{
AssignPerson
,
SelectOriTempRecord
,
SelEquip
,
IndexManage
,
EquipManage
},
data
()
{
data
()
{
return
{
return
{
// 定义表格名称----英文
// 定义表格名称----英文
...
@@ -86,7 +100,9 @@ export default {
...
@@ -86,7 +100,9 @@ export default {
{
key
:
'detectType'
,
name
:
'样品类别'
,
placeholder
:
'请输入样品类别'
}
{
key
:
'detectType'
,
name
:
'样品类别'
,
placeholder
:
'请输入样品类别'
}
],
],
btn
:
[
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'试验项目分配'
},
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'完成提交'
},
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
},
{
type
:
''
,
id
:
'food-task-assign-adjust-group'
,
name
:
'调整分组'
},
{
type
:
''
,
id
:
'food-task-assign-adjust-group'
,
name
:
'调整分组'
},
{
{
type
:
''
,
type
:
''
,
...
@@ -95,15 +111,24 @@ export default {
...
@@ -95,15 +111,24 @@ export default {
},
},
{
type
:
''
,
id
:
'food-task-assign-maintain-info'
,
name
:
'信息维护'
}
{
type
:
''
,
id
:
'food-task-assign-maintain-info'
,
name
:
'信息维护'
}
],
],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
},
{
type
:
'ios-flask'
,
id
:
''
,
name
:
'设备列表'
}
],
getPage
:
{},
getPage
:
{},
pageColumns
:
[
pageColumns
:
[
{
title
:
'试验名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'试验项目'
,
key
:
'name'
,
width
:
120
,
fixed
:
'left'
},
{
title
:
'试验项目英文简写'
,
key
:
'shortName'
,
width
:
140
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
180
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
180
},
{
title
:
'试样包装类型'
,
key
:
'samplePack'
,
width
:
180
},
{
title
:
'是否填写原始记录'
,
key
:
'recorded'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
180
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'检测
依据'
,
key
:
'testBasis'
,
width
:
18
0
},
{
title
:
'检测
方法'
,
key
:
'testMethod'
,
width
:
26
0
},
{
title
:
'
试验方法'
,
key
:
'testMethod'
,
width
:
18
0
},
{
title
:
'
检测依据'
,
key
:
'testBasis'
,
width
:
14
0
},
{
title
:
'
状态'
,
key
:
'status'
,
width
:
18
0
}
{
title
:
'
检测科室'
,
key
:
'groupName'
,
width
:
15
0
}
],
],
leftSelectData
:
[],
leftSelectData
:
[],
sampleIds
:
[],
sampleIds
:
[],
...
@@ -238,6 +263,30 @@ export default {
...
@@ -238,6 +263,30 @@ export default {
})
})
}
}
},
},
_equipResult
:
async
function
(
res
)
{
console
.
log
(
res
)
const
tempData
=
{}
tempData
.
equipList
=
[]
res
.
map
((
item
,
index
)
=>
{
tempData
.
equipList
.
push
({
equipId
:
item
.
id
,
equipName
:
item
.
name
,
acquisitionCommand
:
item
.
acquisitionCommand
,
brand
:
item
.
brand
,
collectionAddress
:
item
.
acquisitionAddress
,
collectionType
:
item
.
acquisitionType
,
equipNum
:
item
.
labNum
,
ipAddress
:
item
.
ipAddress
,
labNum
:
item
.
classId
,
spec
:
item
.
spec
})
})
tempData
.
expIds
=
this
.
selectIds
const
result
=
await
soilTest
.
addExpEquip
(
tempData
)
if
(
result
)
{
this
.
$Message
.
success
(
'添加成功'
)
}
},
// 调整分组
// 调整分组
_userGroupResult
(
data
)
{
_userGroupResult
(
data
)
{
const
tempData
=
{
const
tempData
=
{
...
@@ -260,6 +309,15 @@ export default {
...
@@ -260,6 +309,15 @@ export default {
case
'试验项目分配'
:
case
'试验项目分配'
:
this
.
_userAssign
()
this
.
_userAssign
()
break
break
case
'填写原始记录'
:
this
.
_addRecord
()
break
case
'完成提交'
:
this
.
_submitItem
(
this
.
selectData
)
break
case
'设备'
:
this
.
_selectEquipment
()
break
case
'按组分配'
:
case
'按组分配'
:
await
this
.
_reportDueDate
()
await
this
.
_reportDueDate
()
await
this
.
_groupAssign
()
await
this
.
_groupAssign
()
...
@@ -285,6 +343,49 @@ export default {
...
@@ -285,6 +343,49 @@ export default {
break
break
}
}
},
},
_selectEquipment
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
selEquip
.
_open
(
'sample-input'
)
}
},
_submitItem
(
data
)
{
console
.
log
(
data
)
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定提交该数据?'
,
onOk
:
()
=>
{
this
.
_submitOk
()
}
})
},
_submitOk
:
async
function
()
{
const
result
=
await
soilTest
.
endExp
(
this
.
selectIds
.
join
(
','
))
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
}
},
_addRecord
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$message
.
warning
(
'请至少选择一条数据'
)
}
else
{
const
errorInfo
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
console
.
log
(
this
.
selectData
[
i
].
recorded
)
if
(
this
.
selectData
[
i
].
recorded
===
'否'
)
{
errorInfo
.
push
(
this
.
selectData
[
i
].
index
+
1
)
}
}
console
.
log
(
'未编制报告'
,
errorInfo
)
if
(
errorInfo
.
length
!==
0
)
{
this
.
$Message
.
warning
(
'第'
+
errorInfo
+
'条数据未编制报告'
)
}
else
{
console
.
log
(
'打开填写原始记录界面'
)
this
.
$refs
.
recordModal
.
_open
(
this
.
selectIds
,
this
.
entrustId
)
}
}
},
// 信息维护
// 信息维护
_maintainInfo
()
{
_maintainInfo
()
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
...
@@ -366,6 +467,9 @@ export default {
...
@@ -366,6 +467,9 @@ export default {
this
.
selectIds
=
selectIds
this
.
selectIds
=
selectIds
this
.
selectData
=
data
this
.
selectData
=
data
break
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'table-col'
:
case
'table-col'
:
// 用户选中的表格列
// 用户选中的表格列
this
.
userColumns
=
data
this
.
userColumns
=
data
...
@@ -376,6 +480,55 @@ export default {
...
@@ -376,6 +480,55 @@ export default {
break
break
}
}
},
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'查看原始记录'
:
console
.
log
(
data
)
if
(
data
.
recorded
===
'是'
)
{
// this._viewRecord('1309434759937146882')
this
.
_viewRecord
(
data
.
originalRecordId
)
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
break
case
'查看指标'
:
this
.
_indexManage
(
data
)
break
case
'设备列表'
:
this
.
_equipManage
(
data
)
break
}
})
},
_indexManage
(
data
)
{
this
.
$refs
.
indexModal
.
_open
(
data
)
},
_equipManage
(
data
)
{
this
.
$refs
.
equipModal
.
_open
(
data
)
},
_viewRecord
(
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
)
}
}
}
}
)
},
// 按人分配 选人选时间
// 按人分配 选人选时间
_userAssign
()
{
_userAssign
()
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemLeftList.vue
View file @
9f1534f6
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<Col
span=
"24"
>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:pageColumns=
"pageColumns"
:table-name=
"tableName"
<PTVXETable
ref=
"pageTable"
:pageColumns=
"pageColumns"
:table-name=
"tableName"
:tableHeight=
"tableHeight"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:rows=
"100"
select-data
>
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:rows=
"100"
:is-radio=
"true"
select-data
hide-checkbox
>
<vxe-table-column
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
:key=
"item.key"
...
@@ -120,6 +120,9 @@ export default {
...
@@ -120,6 +120,9 @@ export default {
case
'selectData'
:
case
'selectData'
:
this
.
$emit
(
'on-result-change'
,
data
)
this
.
$emit
(
'on-result-change'
,
data
)
break
break
case
'singleSelect'
:
this
.
$emit
(
'on-result-change'
,
data
)
break
case
'changeSize'
:
case
'changeSize'
:
this
.
_page
()
this
.
_page
()
break
break
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
View file @
9f1534f6
...
@@ -350,16 +350,16 @@ export default {
...
@@ -350,16 +350,16 @@ export default {
return
obj
return
obj
},
},
_page
:
async
function
()
{
_page
:
async
function
()
{
const
saveName
=
[]
const
saveName
=
this
.
leftSelectData
.
name
const
saveMethod
=
[]
const
saveMethod
=
this
.
leftSelectData
.
testMethod
for
(
let
i
=
0
;
i
<
this
.
leftSelectData
.
length
;
i
++
)
{
//
for (let i = 0; i
<
this
.
leftSelectData
.
length
;
i
++
)
{
saveName
.
push
(
this
.
leftSelectData
[
i
].
name
)
//
saveName.push(this.leftSelectData[i].name)
saveMethod
.
push
(
this
.
leftSelectData
[
i
].
testMethod
)
//
saveMethod.push(this.leftSelectData[i].testMethod)
}
//
}
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
this
.
entrustId
this
.
formObj
.
entrustId
=
this
.
entrustId
this
.
formObj
.
name
=
saveName
.
join
(
','
)
this
.
formObj
.
name
=
saveName
this
.
formObj
.
testMethod
=
saveMethod
.
join
(
','
)
this
.
formObj
.
testMethod
=
saveMethod
const
result
=
await
soilTest
.
pageExperimentAllot
(
const
result
=
await
soilTest
.
pageExperimentAllot
(
this
.
$serializeForm
(
this
.
formObj
)
this
.
$serializeForm
(
this
.
formObj
)
)
)
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemTabs.vue
View file @
9f1534f6
...
@@ -30,6 +30,7 @@ export default {
...
@@ -30,6 +30,7 @@ export default {
methods
:
{
methods
:
{
_leftResult
(
data
)
{
_leftResult
(
data
)
{
this
.
$refs
.
rightModal
.
_open
(
this
.
id
,
data
)
this
.
$refs
.
rightModal
.
_open
(
this
.
id
,
data
)
console
.
log
(
data
)
},
},
_rightResult
()
{
_rightResult
()
{
this
.
$refs
.
leftModal
.
_page
()
this
.
$refs
.
leftModal
.
_page
()
...
...
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