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
f87c6d1b
Commit
f87c6d1b
authored
Nov 16, 2020
by
zhangmengqi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
cfbf2c59
bb378d5b
Hide whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
3226 additions
and
990 deletions
+3226
-990
soil-sample.js
api/soil/soil-sample.js
+3
-1
soil-test.js
api/soil/soil-test.js
+4
-0
Operation.vue
components/operation/Operation.vue
+8
-5
SoilSampleManage.vue
pages/meter-entrust/SoilSampleManage.vue
+8
-288
SoilSampleManageHis.vue
pages/meter-entrust/SoilSampleManageHis.vue
+7
-272
EntrustRegisterEdit.vue
pages/meter-entrust/entrust-register/EntrustRegisterEdit.vue
+0
-1
EntrustRegisterHis.vue
pages/meter-entrust/entrust-register/EntrustRegisterHis.vue
+1
-3
SoilSampleItemManage.vue
pages/soil-sample-manage/SoilSampleItemManage.vue
+1
-1
SoilSampleItemManageHis.vue
pages/soil-sample-manage/SoilSampleItemManageHis.vue
+2
-5
SoilSampleManage.vue
pages/soil-sample-manage/SoilSampleManage.vue
+0
-261
SoilSampleManageHis.vue
pages/soil-sample-manage/SoilSampleManageHis.vue
+1
-9
SoilSampleManageTab.vue
pages/soil-sample-manage/SoilSampleManageTab.vue
+355
-0
CollectFileManage.vue
...il-sample-manage/sample-preparation/CollectFileManage.vue
+199
-0
CollectManage.vue
...s/soil-sample-manage/sample-preparation/CollectManage.vue
+161
-0
EquipManage.vue
pages/soil-sample-manage/sample-preparation/EquipManage.vue
+157
-0
IndexManage.vue
pages/soil-sample-manage/sample-preparation/IndexManage.vue
+162
-0
IndexManageEdit.vue
...soil-sample-manage/sample-preparation/IndexManageEdit.vue
+371
-0
OriginalRecordClassTree.vue
...ple-manage/sample-preparation/OriginalRecordClassTree.vue
+145
-0
OriginalRecordEdit.vue
...l-sample-manage/sample-preparation/OriginalRecordEdit.vue
+147
-0
RecordIframe.vue
pages/soil-sample-manage/sample-preparation/RecordIframe.vue
+128
-0
SampleManage.vue
pages/soil-sample-manage/sample-preparation/SampleManage.vue
+79
-0
SamplePreparation.vue
...il-sample-manage/sample-preparation/SamplePreparation.vue
+4
-30
SelectOriTempRecord.vue
...-sample-manage/sample-preparation/SelectOriTempRecord.vue
+285
-0
RecordIndex.vue
...ple-preparation/sample-preparation-record/RecordIndex.vue
+48
-0
RecordLeftList.vue
...-preparation/sample-preparation-record/RecordLeftList.vue
+151
-0
RecordRightList.vue
...preparation/sample-preparation-record/RecordRightList.vue
+743
-0
AlreadyIssuedHis.vue
...sample-receive/entrust-sample-manage/AlreadyIssuedHis.vue
+1
-0
SoilSampleItemManage.vue
...le-receive/entrust-sample-manage/SoilSampleItemManage.vue
+2
-5
WaitReceiveHis.vue
...e/sample-receive/entrust-sample-manage/WaitReceiveHis.vue
+1
-0
ItemManage.vue
pages/soil-sample-manage/sample-take/ItemManage.vue
+11
-14
AuditIndex.vue
pages/soil-test-manage/test-data-audit/AuditIndex.vue
+0
-8
DataAuditHis.vue
pages/soil-test-manage/test-data-audit/DataAuditHis.vue
+0
-4
SoilSampleItemManageHis.vue
...l-test-manage/test-data-audit/SoilSampleItemManageHis.vue
+2
-5
SoilSampleManageHis.vue
.../soil-test-manage/test-data-audit/SoilSampleManageHis.vue
+1
-9
DataCheckHis.vue
pages/soil-test-manage/test-data-check/DataCheckHis.vue
+2
-10
SoilSampleItemManageHis.vue
...l-test-manage/test-data-check/SoilSampleItemManageHis.vue
+2
-5
SoilSampleManageHis.vue
.../soil-test-manage/test-data-check/SoilSampleManageHis.vue
+1
-9
DataConsult.vue
pages/soil-test-manage/test-data-consult/DataConsult.vue
+0
-4
SoilSampleItemManageHis.vue
...test-manage/test-data-consult/SoilSampleItemManageHis.vue
+2
-5
SoilSampleManageHis.vue
...oil-test-manage/test-data-consult/SoilSampleManageHis.vue
+1
-10
SelectOriTempRecord.vue
pages/soil-test-manage/test-input/SelectOriTempRecord.vue
+19
-6
SoilSampleItemManageHis.vue
...s/soil-test-manage/test-input/SoilSampleItemManageHis.vue
+2
-5
SoilSampleManageHis.vue
pages/soil-test-manage/test-input/SoilSampleManageHis.vue
+1
-9
TestInputHis.vue
pages/soil-test-manage/test-input/TestInputHis.vue
+0
-4
SampleRightList.vue
...il-test-manage/test-input/sample-tabs/SampleRightList.vue
+7
-1
common.js
plugins/common.js
+1
-1
No files found.
api/soil/soil-sample.js
View file @
f87c6d1b
...
...
@@ -177,5 +177,7 @@ export default {
pageSecondary
:
data
=>
http
.
post
(
'soil/v1/prepare/page_secondary'
,
data
).
then
(
res
=>
res
),
pageSecondaryHis
:
data
=>
http
.
post
(
'soil/v1/prepare/page_secondary_his'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/prepare/page_secondary_his'
,
data
).
then
(
res
=>
res
),
sampleDeleteById
:
data
=>
http
.
delete
(
'soil/v1/sample/?ids='
+
data
).
then
(
res
=>
res
)
}
api/soil/soil-test.js
View file @
f87c6d1b
...
...
@@ -53,8 +53,12 @@ export default {
http
.
post
(
'soil/v1/experiment/page_exp_allot_his'
,
data
).
then
(
res
=>
res
),
pageTestByExp
:
data
=>
http
.
post
(
'soil/v1/experiment/page_test_by_exp'
,
data
).
then
(
res
=>
res
),
pagePrepareByExp
:
data
=>
http
.
post
(
'soil/v1/experiment/page_prepare_by_exp'
,
data
).
then
(
res
=>
res
),
pageExperimentTest
:
data
=>
http
.
post
(
'soil/v1/experiment/page_exp_test'
,
data
).
then
(
res
=>
res
),
pageExpPrepare
:
data
=>
http
.
post
(
'soil/v1/experiment/page_exp_prepare'
,
data
).
then
(
res
=>
res
),
zTree
:
data
=>
http
.
post
(
'/print/v1/template_category/ztree'
,
data
).
then
(
res
=>
res
),
templatePage
:
data
=>
...
...
components/operation/Operation.vue
View file @
f87c6d1b
...
...
@@ -102,40 +102,43 @@ export default {
_page
:
async
function
()
{
console
.
log
(
'要传的参数'
)
console
.
log
(
this
.
formObj
)
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
pageOutTaskOperation
(
this
.
formObj
)
console
.
log
(
result
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
// this.$refs.pageTable._page(
// 'search-contract-record',
// 'FoodContractRecord/page',
// this.$serializeFormSearch(this.formObj)
// )
},
_pageSurplus
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
prepareRecordPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_pageBackup
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
backupRecordPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_pageTask
:
async
function
()
{
console
.
log
(
'要传的参数'
)
console
.
log
(
this
.
formObj
)
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
meterEntrust
.
pageTask
(
this
.
formObj
)
console
.
log
(
result
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_tableResultChange
(
msg
,
data
)
{
...
...
pages/meter-entrust/SoilSampleManage.vue
View file @
f87c6d1b
...
...
@@ -63,34 +63,15 @@
</div>
</template>
<
script
>
import
http
from
'../../api/http'
import
{
soilEntrust
}
from
'../../api'
import
{
getLodop
}
from
'../../plugins/clodop/LodopFuncs'
import
{
soilEntrust
,
soilSample
}
from
'../../api'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
let
LODOP
export
default
{
components
:
{
SoilSampleItemManage
},
data
()
{
return
{
formId
:
'soilSampleManage'
,
currentComponent
:
''
,
btn
:
[
// {
// type: 'success',
// id: '',
// name: '导入检测项目'
// }
// {
// type: 'success',
// id: '',
// name: '导入检测项目包'
// },
// {
// type: 'success',
// id: '',
// name: '打印标签'
// }
],
btn
:
[],
itemList
:
[],
indexList
:
[],
footerList
:
[
...
...
@@ -153,102 +134,16 @@ export default {
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
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导出'
:
this
.
_exportSample
()
break
case
'添加模拟样品'
:
this
.
_editImitateModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_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
.
contractId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
...
...
@@ -256,19 +151,9 @@ export default {
case
'管理检测项目'
:
this
.
_itemManage
(
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
}
})
},
...
...
@@ -346,192 +231,27 @@ export default {
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('删除成功')
// }
// },
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
sampleDeleteById
(
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
.
contractId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
contractId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
contractId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
},
_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
.
contractId
,
downloadUrl
:
'/food/v1/excel/template/FoodSampleCompany'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_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
)
}
}
}
...
...
pages/meter-entrust/SoilSampleManageHis.vue
View file @
f87c6d1b
...
...
@@ -66,11 +66,8 @@
</div>
</template>
<
script
>
import
http
from
'../../api/http'
import
{
soilEntrust
}
from
'../../api'
import
{
getLodop
}
from
'../../plugins/clodop/LodopFuncs'
import
{
soilEntrust
,
soilSample
}
from
'../../api'
import
SoilSampleItemManage
from
'./SoilSampleItemManageHis'
let
LODOP
export
default
{
components
:
{
SoilSampleItemManage
},
data
()
{
...
...
@@ -146,102 +143,16 @@ export default {
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
.
_copyHisItem
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导出'
:
this
.
_exportSample
()
break
case
'添加模拟样品'
:
this
.
_editImitateModal
(
false
)
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_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
.
contractId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
...
...
@@ -249,19 +160,9 @@ export default {
case
'管理检测项目'
:
this
.
_itemManage
(
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
}
})
},
...
...
@@ -340,192 +241,26 @@ export default {
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('删除成功')
// }
// },
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
sampleDeleteById
(
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
.
contractId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
contractId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
contractId
)
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
_page
()
this
.
$Message
.
success
(
msg
)
},
_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
.
contractId
,
downloadUrl
:
'/food/v1/excel/template/FoodSampleCompany'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_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
)
}
}
}
...
...
pages/meter-entrust/entrust-register/EntrustRegisterEdit.vue
View file @
f87c6d1b
...
...
@@ -754,7 +754,6 @@ export default {
break
case
'删除'
:
this
.
getPage
.
records
.
splice
(
index
,
1
)
this
.
_deleteSample
(
data
)
break
case
'操作日志'
:
// this._record(data.id)
...
...
pages/meter-entrust/entrust-register/EntrustRegisterHis.vue
View file @
f87c6d1b
...
...
@@ -49,10 +49,8 @@
</div>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<component
ref=
"refModal"
:is=
"currentComponent"
@
on-result-change=
"_componentResult"
></component>
<component
ref=
"refModal"
:is=
"currentComponent"
></component>
</keep-alive>
<!-- <MeterEntrustRecord ref="entrustRecordModal" @on-result-change="_page"></MeterEntrustRecord>-->
<!-- <SoilSampleManage ref="sampleManageModal" @on-result-change="_page"></SoilSampleManage>-->
</div>
</template>
<
script
>
...
...
pages/soil-sample-manage/SoilSampleItemManage.vue
View file @
f87c6d1b
...
...
@@ -12,7 +12,7 @@
<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
/>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入
试验名称
"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
...
...
pages/soil-sample-manage/SoilSampleItemManageHis.vue
View file @
f87c6d1b
...
...
@@ -11,11 +11,8 @@
<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
label=
"试验名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
...
...
pages/soil-sample-manage/SoilSampleManage.vue
View file @
f87c6d1b
...
...
@@ -76,13 +76,10 @@
</div>
</template>
<
script
>
import
http
from
'../../api/http'
import
{
soilEntrust
}
from
'../../api'
import
{
getLodop
}
from
'../../plugins/clodop/LodopFuncs'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
import
DescribeDetailModal
from
'./sample-preparation/DescribeDetailModal'
import
PreparationModal
from
'./sample-preparation/Preparation'
let
LODOP
export
default
{
components
:
{
SoilSampleItemManage
,
DescribeDetailModal
,
PreparationModal
},
data
()
{
...
...
@@ -227,15 +224,6 @@ export default {
}
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'
:
...
...
@@ -257,42 +245,12 @@ export default {
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
...
...
@@ -314,27 +272,6 @@ export default {
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
.
contractId
)
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
...
...
@@ -342,19 +279,6 @@ export default {
case
'管理检测项目'
:
this
.
_itemManage
(
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
}
})
},
...
...
@@ -428,197 +352,12 @@ export default {
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_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
.
contractId
)
}
},
// 添加编辑模拟样品
_editImitateModal
(
edit
,
data
)
{
if
(
edit
)
{
// 模拟样品的编辑
const
tempData
=
JSON
.
parse
(
JSON
.
stringify
(
data
))
// 深拷贝
this
.
$refs
.
imitateModal
.
_open
(
tempData
,
this
.
contractId
)
}
else
{
// 模拟样品的添加
this
.
$refs
.
imitateModal
.
_open
(
''
,
this
.
contractId
)
}
},
_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
)
}
})
},
// 导入样品
_importSample
()
{
const
data
=
{
importUrl
:
'/food/v1/sample/company/import_'
+
this
.
contractId
,
downloadUrl
:
'/food/v1/excel/template/FoodSampleCompany'
,
title
:
'导入'
}
this
.
$refs
.
refModal
.
_open
(
data
)
},
// 导入检测项目
_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
)
}
}
}
...
...
pages/soil-sample-manage/SoilSampleManageHis.vue
View file @
f87c6d1b
...
...
@@ -215,15 +215,6 @@ export default {
}
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'
:
...
...
@@ -382,6 +373,7 @@ export default {
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilEntrust
.
pagePrepareHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
...
...
pages/soil-sample-manage/SoilSampleManageTab.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<div>
<!--内容-->
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
v-show=
"searchOpen"
id=
"search-sample-company"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"试样编号:"
class=
"search-item"
>
<Input
v-model=
"formObj.sampleCode"
placeholder=
"请输入样品编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_page"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
class=
"contHide"
show-search-btn=
"true"
@
on-result-change=
"_btnClick"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETableHeight
ref=
"pageTable"
:table-height=
"tableHeight"
:form-id=
"formId"
:loading=
"true"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
is-edit
select-data
@
on-result-change=
"_tableResultChange"
>
<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"
:edit-render=
"item.editCell?
{autofocus: 'input'}:null" sortable>
<template
v-slot:edit=
"scope"
>
<div
v-if=
"item.key==='describeDetail'"
@
click
.
stop=
"_handleRow(scope)"
>
<!--
<el-input
v-model=
"scope.row.describeDetail"
@
change=
"_inputChange(scope.row)"
placeholder=
"请输入土质描述详情"
>
-->
<!--
</el-input>
-->
<Input
:value=
"scope.row.describeDetail"
@
change
.
native=
"_inputChange($event.target.value,scope.row)"
></Input>
</div>
<div
v-else-if=
"item.key==='remark'"
@
click
.
stop=
"_handleRow(scope)"
>
<el-input
v-model=
"scope.row.remark"
@
change=
"_remarkChange(scope.row)"
></el-input>
</div>
</
template
>
<
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>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
<DescribeDetailModal
ref=
"writeDetailModal"
@
on-result-change=
"_page"
></DescribeDetailModal>
<PreparationModal
ref=
"preModal"
@
on-result-change=
"_page"
></PreparationModal>
</div>
</template>
<
script
>
import
{
soilEntrust
}
from
'../../api'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
import
DescribeDetailModal
from
'./sample-preparation/DescribeDetailModal'
import
PreparationModal
from
'./sample-preparation/Preparation'
export
default
{
components
:
{
SoilSampleItemManage
,
DescribeDetailModal
,
PreparationModal
},
data
()
{
return
{
formId
:
'soilSampleManage'
,
currentComponent
:
''
,
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'试样制备'
},
{
type
:
'success'
,
id
:
'ZBC'
,
name
:
'打印标签'
},
{
type
:
'success'
,
id
:
''
,
name
:
'批量填写土质描述详情'
}
],
itemList
:
[],
indexList
:
[],
currentIndex
:
-
1
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
],
iconMsg
:
[
{
type
:
'ios-beaker'
,
id
:
''
,
name
:
'管理检测项目'
}
],
contractId
:
''
,
// 委托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
:
'experimentNames'
,
width
:
110
},
{
title
:
'试验项目简写'
,
key
:
'experimentShortNames'
,
width
:
120
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
,
width
:
160
},
{
title
:
'土质描述详情'
,
key
:
'describeDetail'
,
width
:
200
,
editCell
:
true
},
{
title
:
'备注'
,
key
:
'remark'
,
width
:
200
,
editCell
:
true
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
120
}
],
sampleId
:
''
,
dateList
:
[],
formObj
:
{
name
:
undefined
,
sampleCode
:
undefined
}
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{
this
.
$refs
.
pageTable
.
_showLoading
()
},
methods
:
{
_inputChange
:
async
function
(
info
,
data
)
{
this
.
getPage
.
records
[
data
.
index
].
describeDetail
=
info
const
result
=
await
soilEntrust
.
sampleEdit
({
id
:
data
.
id
,
describeDetail
:
info
})
if
(
result
)
{
this
.
$Message
.
success
(
'修改成功'
)
}
},
_remarkChange
:
async
function
(
info
)
{
const
result
=
await
soilEntrust
.
sampleRemarkEdit
({
id
:
info
.
id
,
remark
:
info
.
remark
})
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
}
},
_visibleChange
(
data
)
{
if
(
data
===
false
)
{
this
.
$emit
(
'on-result-change'
)
}
},
_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
})
},
_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
.
_samplePre
()
break
case
'批量填写土质描述详情'
:
this
.
_writeDetail
(
this
.
selectIds
)
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
)
}
},
_iconClick
(
res
,
data
,
componentName
,
index
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'管理检测项目'
:
this
.
_itemManage
(
data
.
id
)
break
}
})
},
_itemManage
(
data
)
{
// 管理检测项目
if
(
this
.
recordHis
)
{
this
.
$refs
.
sampleItemManage
.
_openRecord
(
data
)
}
else
{
this
.
$refs
.
sampleItemManage
.
_open
(
data
)
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'selectData'
:
const
selectIds
=
[]
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
.
contractId
=
id
// 委托id
console
.
log
(
this
.
contractId
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_page
()
},
_openHis
(
id
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
dateList
=
[]
this
.
showModal
=
true
this
.
contractId
=
id
// 委托id
console
.
log
(
this
.
contractId
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
recordHis
=
true
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
this
.
contractId
const
result
=
await
soilEntrust
.
pagePrepare
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_search
()
{
this
.
_page
()
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/CollectFileManage.vue
0 → 100644
View file @
f87c6d1b
<
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"
:getPage=
"getPage"
:icon-msg=
"iconMsg"
>
<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>
<div
class=
"viewFileImg"
>
<vue-gallery-slideshow
:images=
"imgViewList"
:index=
"imgViewIndex"
@
close=
"imgViewIndex = null"
></vue-gallery-slideshow>
</div>
</Modal>
<IndexManageEdit
ref=
"indexEdit"
@
on-result-change=
"_page"
></IndexManageEdit>
</div>
</template>
<
script
>
import
{
soilAptitude
,
soilTest
}
from
'../../../api'
import
global
from
'../../../api/config'
import
IndexManageEdit
from
'./IndexManageEdit'
export
default
{
components
:
{
IndexManageEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[{
type
:
'success'
,
id
:
'ZBC'
,
name
:
'添加指标'
}],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
imgViewList
:
[],
imgViewIndex
:
null
,
viewUri
:
'/soil/v1/sample_photo/view'
,
pageColumns
:
[
{
title
:
'仪器名称'
,
key
:
'equipName'
,
width
:
120
},
{
title
:
'仪器编号'
,
key
:
'equipNum'
,
width
:
120
},
{
title
:
'规格型号'
,
key
:
'spec'
,
width
:
120
},
{
title
:
'仪器品牌'
,
key
:
'brand'
,
width
:
120
},
{
title
:
'实验室编号'
,
key
:
'labNum'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-eye'
,
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
.
expId
=
this
.
id
const
result
=
await
soilTest
.
collectFilePage
(
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
.
_viewFile
(
data
)
break
}
},
_viewFile
(
data
)
{
// this.$pdfView(data.objectKey)
const
imgViewList
=
[]
// imgViewList.push(global.baseURL + this.downloadFileUrlFile + data.id)
this
.
imgViewList
=
imgViewList
imgViewList
.
push
(
global
.
baseURL
+
this
.
viewUri
+
'?id='
+
data
.
id
+
'&objectKey='
+
data
.
objectKey
)
console
.
log
(
global
.
baseURL
+
this
.
viewUri
+
'?id='
+
data
.
id
+
'&objectKey='
+
data
.
objectKey
)
this
.
imgViewIndex
=
0
},
_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
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
// this.$msgTip('warning')
this
.
$message
.
warning
(
'请至少选择一条记录'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除 '
+
this
.
selectIds
.
length
+
' 条记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
this
.
selectIds
)
}
})
}
},
_delOk
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
expItemDeleteByIds
(
ids
)
if
(
result
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
<
style
scoped
>
.viewFileImg
>>>
.vgs__container
{
height
:
100%
!important
;
}
</
style
>
pages/soil-sample-manage/sample-preparation/CollectManage.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"100"
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.name"
@
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"
: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
{
soilAptitude
,
soilTest
}
from
'../../../api'
import
IndexManageEdit
from
'./IndexManageEdit'
export
default
{
components
:
{
IndexManageEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[{
type
:
'success'
,
id
:
'ZBC'
,
name
:
'添加指标'
}],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
pageColumns
:
[
{
title
:
'采集内容'
,
key
:
'name'
},
{
title
:
'检测值'
,
key
:
'testValue'
,
width
:
120
},
{
title
:
'实验室编号'
,
key
:
'labNum'
,
width
:
120
},
{
title
:
'仪器名称'
,
key
:
'equipName'
,
width
:
120
},
{
title
:
'仪器编号'
,
key
:
'equipNum'
,
width
:
120
},
{
title
:
'规格型号'
,
key
:
'spec'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-create'
,
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
.
expId
=
this
.
id
const
result
=
await
soilTest
.
collectDataPage
(
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
}
},
_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
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
// this.$msgTip('warning')
this
.
$message
.
warning
(
'请至少选择一条记录'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除 '
+
this
.
selectIds
.
length
+
' 条记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
this
.
selectIds
)
}
})
}
},
_delOk
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
expItemDeleteByIds
(
ids
)
if
(
result
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/EquipManage.vue
0 → 100644
View file @
f87c6d1b
<
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
.
expId
=
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-sample-manage/sample-preparation/IndexManage.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"100"
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.name"
@
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"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
>
<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
{
soilAptitude
,
soilTest
}
from
'../../../api'
import
IndexManageEdit
from
'./IndexManageEdit'
export
default
{
components
:
{
IndexManageEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加指标'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
pageColumns
:
[
{
title
:
'试验指标名称'
,
key
:
'name'
},
{
title
:
'试验指标大类'
,
key
:
'mainType'
,
width
:
120
},
{
title
:
'试验指标小类'
,
key
:
'smallType'
,
width
:
120
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
120
},
{
title
:
'检测值'
,
key
:
'testValue'
,
width
:
120
},
{
title
:
'单位'
,
key
:
'unit'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-create'
,
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
.
itemPage
(
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
}
},
_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
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
// this.$msgTip('warning')
this
.
$message
.
warning
(
'请至少选择一条记录'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除 '
+
this
.
selectIds
.
length
+
' 条记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
this
.
selectIds
)
}
})
}
},
_delOk
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
expItemDeleteByIds
(
ids
)
if
(
result
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/IndexManageEdit.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
@
on-visible-change=
"_visibleChange"
width=
"900"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
ref=
"formObj"
:id=
"formId"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
inline
>
<div>
<Form-item
label=
"试验指标名称"
prop=
"name"
class=
"width-48"
>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入试验名称"
/>
</Form-item>
<Form-item
label=
"试验指标大类"
prop=
"mainType"
class=
"width-48"
>
<Input
v-model=
"formObj.mainType"
name=
"mainType"
placeholder=
"请输入试验指标大类"
/>
</Form-item>
<Form-item
label=
"试验指标小类"
prop=
"smallType"
class=
"width-48"
>
<Input
v-model=
"formObj.smallType"
name=
"smallType"
placeholder=
"请输入试验指标小类"
/>
</Form-item>
<Form-item
label=
"状态"
prop=
"status"
class=
"width-48"
>
<Input
v-model=
"formObj.status"
name=
"status"
placeholder=
"请输入状态"
/>
</Form-item>
<Form-item
label=
"检测值"
prop=
"testValue"
class=
"width-48"
>
<Input
v-model=
"formObj.testValue"
name=
"testValue"
placeholder=
"请输入检测值"
/>
</Form-item>
<Form-item
label=
"单位"
prop=
"unit"
class=
"width-48"
>
<Input
v-model=
"formObj.unit"
name=
"unit"
placeholder=
"请输入单位"
/>
</Form-item>
</div>
</Form>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></modal-footer>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 添加编辑环境资质项目表
*/
import
{
soilTest
}
from
'../../../api'
export
default
{
components
:
{},
data
()
{
return
{
activeName
:
''
,
hideUserSel
:
true
,
id
:
''
,
modalTitle
:
''
,
expId
:
''
,
formObj
:
{
name
:
''
,
unit
:
''
,
status
:
''
,
mainType
:
''
,
smallType
:
''
,
testValue
:
''
},
ruleValidate
:
{
name
:
[{
required
:
true
,
message
:
'指标名称不能为空'
,
trigger
:
'blur'
}]
},
showModal
:
false
,
footerList
:
[
{
name
:
'取消'
,
type
:
''
},
{
name
:
'保存'
,
type
:
'primary'
}
],
microbedList
:
[{
value
:
0
,
name
:
'否'
},
{
value
:
1
,
name
:
'是'
}],
// 检测依据
testBasisData
:
[],
// 类别下拉数组
typeData
:
[],
// 检测科室
groupData
:
[],
groupName
:
''
,
// 主检人
userData
:
[],
// 单位
unitData
:
[],
aptitudeData
:
[],
aptitude
:
''
,
// testBasisName: '',
computeTypeList
:
[],
tester
:
''
,
marksList
:
[],
detectionTypeList
:
[],
testItemData
:
[],
formId
:
''
}
},
mounted
()
{
// 检测科室
// this._getUserGroup()
// 检测依据
// this._getTestBasisList()
// 资质
// this._getAptitudeList()
// this._getType()
},
methods
:
{
// 字典
_dicSearch
()
{
this
.
$store
.
dispatch
(
'LmsBaseDict/getItem'
,
'食品检出类别'
).
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
LmsBaseDict
.
item
this
.
detectionTypeList
=
result
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
// 添加界面默认第一个
this
.
formObj
.
detectionType
=
result
.
length
>
0
?
result
[
0
].
name
:
''
}
})
},
_testBasisChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
stdId
=
data
.
id
this
.
formObj
.
testBasis
=
data
.
stdNum
this
.
formObj
.
testBasisName
=
data
.
name
this
.
formObj
.
testMethod
=
data
.
stdNum
this
.
$refs
.
formObj
.
validateField
(
'testBasis'
)
break
case
'query'
:
this
.
formObj
.
stdId
=
''
this
.
formObj
.
testMethod
=
''
this
.
formObj
.
testBasis
=
data
.
stdNum
this
.
formObj
.
testBasisName
=
''
this
.
_getTestBasisList
(
data
)
break
case
'blur'
:
if
(
this
.
formObj
.
stdId
===
''
)
{
this
.
formObj
.
testBasis
=
''
this
.
formObj
.
testMethod
=
''
this
.
_getTestBasisList
()
}
this
.
$refs
.
formObj
.
validateField
(
'testBasis'
)
}
},
_selectJudgeType
(
data
)
{
this
.
formObj
.
microbed
=
data
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
case
'填写说明'
:
this
.
$refs
.
introduction
.
_open
()
this
.
_hideLoading
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_open
(
id
,
formObj
)
{
this
.
formId
=
'edit-form'
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
id
=
''
this
.
expId
=
id
this
.
modalTitle
=
'添加试验指标'
}
else
{
this
.
hideUserSel
=
true
this
.
id
=
formObj
.
id
this
.
formObj
=
formObj
this
.
modalTitle
=
'编辑试验指标'
}
this
.
showModal
=
true
},
// 获取检测项目
_getItemList
(
value
)
{
const
data
=
{}
if
(
value
)
{
Object
.
assign
(
data
,
{
name
:
value
})
}
this
.
$store
.
dispatch
(
'FoodAptitudeItem/getTestItem'
,
data
).
then
(()
=>
{
this
.
testItemData
=
this
.
$store
.
state
.
FoodAptitudeItem
.
list
})
},
// 检测项目结果
_testItemChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
name
=
data
this
.
$refs
.
formObj
.
validateField
(
'name'
)
this
.
_changeMicrobed
()
break
case
'query'
:
this
.
formObj
.
name
=
data
this
.
_getItemList
(
data
)
break
case
'blur'
:
this
.
_changeMicrobed
()
break
}
},
_changeMicrobed
()
{
// 新增或者导入新增资质时 如果检测项目名称带‘菌’字,则是否微生物默认为‘是’
if
(
this
.
id
===
''
)
{
if
(
this
.
formObj
.
name
.
indexOf
(
'菌'
)
>
-
1
)
{
this
.
$set
(
this
.
formObj
,
'microbed'
,
1
)
}
else
{
this
.
$set
(
this
.
formObj
,
'microbed'
,
0
)
}
}
},
_clearMarks
()
{
this
.
marksList
=
[]
},
_getMarks
()
{
if
(
this
.
formObj
.
computeMark
)
{
this
.
$store
.
dispatch
(
'AptitudeFood/getMarks'
,
{
computeMark
:
this
.
formObj
.
computeMark
})
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
AptitudeFood
.
model
)
{
this
.
marksList
=
this
.
$store
.
state
.
AptitudeFood
.
model
}
})
}
},
_getType
()
{
this
.
$store
.
dispatch
(
'LmsEnum/getByType'
,
'ItemCalculateType'
)
.
then
(()
=>
{
this
.
computeTypeList
=
this
.
$store
.
state
.
LmsEnum
.
model
})
},
// 资质
_getAptitudeList
()
{
this
.
$store
.
dispatch
(
'LmsBaseDict/getItem'
,
'所需资质'
).
then
(()
=>
{
this
.
aptitudeData
=
this
.
$store
.
state
.
LmsBaseDict
.
item
})
},
// 主检人&检测科室
_groupChange
(
data
)
{
if
(
data
)
{
this
.
groupName
=
data
.
label
this
.
formObj
.
groupId
=
data
.
value
this
.
formObj
.
tester
=
''
this
.
formObj
.
testerId
=
''
this
.
_getUserList
(
data
.
value
)
}
},
_userChange
(
data
)
{
if
(
data
)
{
this
.
formObj
.
testerId
=
data
.
value
this
.
formObj
.
tester
=
data
.
label
}
},
_getUserList
(
groupId
)
{
const
data
=
{
rows
:
500
}
if
(
groupId
)
{
Object
.
assign
(
data
,
{
groupId
:
groupId
})
}
this
.
$store
.
dispatch
(
'LmsUserGroup/getUserByGroupId'
,
data
).
then
(()
=>
{
this
.
userData
=
this
.
$store
.
state
.
LmsUserGroup
.
userPage
.
records
})
},
_getUserGroup
()
{
this
.
$store
.
dispatch
(
'LmsUserGroup/list'
).
then
(()
=>
{
this
.
groupData
=
this
.
$store
.
state
.
LmsUserGroup
.
list
})
},
// 单位
_unitChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
unit
=
data
break
case
'query'
:
this
.
_getUnitList
(
data
)
break
}
},
_getUnitList
(
data
)
{
this
.
unitData
=
[]
if
(
data
)
{
this
.
$store
.
dispatch
(
'AptitudeFood/historyUnit'
,
{
unit
:
data
})
.
then
(()
=>
{
this
.
unitData
=
this
.
$store
.
state
.
AptitudeFood
.
list
})
}
else
{
this
.
$store
.
dispatch
(
'AptitudeFood/historyUnit'
).
then
(()
=>
{
this
.
unitData
=
this
.
$store
.
state
.
AptitudeFood
.
list
})
}
},
// 检测依据
_getTestBasisList
(
data
)
{
const
obj
=
{
classify
:
1
}
if
(
data
)
{
obj
.
stdNum
=
data
.
stdNum
}
this
.
$store
.
dispatch
(
'StandardInfo/page'
,
obj
).
then
(()
=>
{
this
.
testBasisData
=
this
.
$store
.
state
.
StandardInfo
.
page
.
records
})
},
// 获取表数据
_resultChange
(
msg
)
{
this
.
showModal
=
false
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
'edit-form'
)
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
data
.
experimentId
=
this
.
expId
// 添加
this
.
_save
(
data
)
}
else
{
// 编辑
this
.
_edit
({
id
:
this
.
formObj
.
id
,
obj
:
data
})
}
}
else
{
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
$Message
.
error
(
'表单验证失败!'
)
}
})
},
_save
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilTest
.
itemSave
(
data
)
console
.
log
(
result
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilTest
.
itemEdit
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'编辑成功!'
)
}
},
_cancel
()
{
this
.
showModal
=
false
this
.
_hideLoading
()
},
// 切换tab
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'testStep'
)
{
this
.
$refs
.
testStepByAptitude
.
_open
(
this
.
formObj
.
stepId
,
this
.
formObj
.
id
)
}
},
_visibleChange
(
data
)
{
if
(
!
data
&&
this
.
$showBtn
(
'food-aptitude-item-step-edit'
))
{
this
.
$emit
(
'on-result-change'
)
this
.
$refs
.
testStepByAptitude
.
_clear
()
}
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/OriginalRecordClassTree.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<div>
<Form
onsubmit=
"return false"
>
<Form-item>
<Input
v-model=
"key"
@
on-enter=
"_search"
placeholder=
"请输入关键字,回车查询"
style=
"width:100%"
icon=
"ios-search-strong"
/>
</Form-item>
</Form>
</div>
<!--加载中-->
<div
v-show=
"isloading"
class=
"demo-spin-container spin-bg tree_height"
>
<Spin
fix
size=
"large"
></Spin>
</div>
<ul
:id=
"treeId"
v-show=
"isTree"
class=
"ztree ztreePro tree_height"
style=
"overflow-x: auto;"
></ul>
</div>
</
template
>
<
style
>
</
style
>
<
script
>
/**
* 原始记录类别添加编辑Ztree
*/
import
{
soilTest
}
from
'../../../api'
export
default
{
data
()
{
return
{
treeId
:
''
,
key
:
''
,
isloading
:
true
,
isTree
:
false
,
setting
:
{
data
:
{
simpleData
:
{
enable
:
true
,
idKey
:
'id'
,
pIdKey
:
'pid'
}
},
callback
:
{
onClick
:
this
.
zTreeOnClick
}
},
businessTypeList
:
''
}
},
created
()
{
// this._Ztree()
},
methods
:
{
_Ztree
(
tableHeight
,
businessTypeList
)
{
console
.
log
(
'请求树'
)
console
.
log
(
tableHeight
,
businessTypeList
)
this
.
key
=
''
this
.
treeId
=
'oriRecordClassTree'
+
this
.
$randomCode
()
this
.
isloading
=
true
this
.
isTree
=
false
if
(
businessTypeList
===
undefined
)
{
// 查询所有类别
this
.
_request
()
}
else
{
// 采样实/实验室不同类型
this
.
businessTypeList
=
businessTypeList
this
.
_requestByBusinessTypeList
()
}
if
(
tableHeight
)
{
$
(
'.tree_height'
).
height
(
tableHeight
)
}
else
{
$
(
'.tree_height'
).
height
(
document
.
documentElement
.
clientHeight
-
230
)
}
},
zTreeOnClick
(
event
,
treeId
,
treeNode
)
{
this
.
$emit
(
'on-result-change'
,
treeNode
)
},
_search
()
{
this
.
isloading
=
true
this
.
isTree
=
false
// 查询实验室、采样、所有类型的数据
if
(
this
.
businessTypeList
!==
undefined
)
{
this
.
_requestByBusinessTypeList
()
}
else
{
this
.
_request
()
}
this
.
$emit
(
'on-result-change'
)
},
// 原始记录模板管理查env所有的类别
_request
()
{
const
data
=
{}
if
(
this
.
key
)
{
data
.
name
=
this
.
key
}
this
.
$store
.
dispatch
(
'ElnTemplateCategory/list'
,
data
).
then
(()
=>
{
const
treeObj
=
$
.
fn
.
zTree
.
init
(
$
(
'#'
+
this
.
treeId
),
this
.
setting
,
this
.
$store
.
state
.
ElnTemplateCategory
.
list
)
treeObj
.
expandAll
(
true
)
setTimeout
(()
=>
{
this
.
isloading
=
false
this
.
isTree
=
true
},
300
)
})
},
// 采样/实验室查env下,不同类型(采样/实验室)的树数据
_requestByBusinessTypeList
:
async
function
()
{
const
data
=
{}
data
.
businessTypeList
=
this
.
businessTypeList
if
(
this
.
key
)
{
data
.
name
=
this
.
key
}
const
result
=
await
soilTest
.
zTree
(
data
)
if
(
result
)
{
const
treeObj
=
$
.
fn
.
zTree
.
init
(
$
(
'#'
+
this
.
treeId
),
this
.
setting
,
result
)
treeObj
.
expandAll
(
true
)
setTimeout
(()
=>
{
this
.
isloading
=
false
this
.
isTree
=
true
},
300
)
}
// this.$store.dispatch('ElnTemplateCategory/listType', data).then(() => {
// const treeObj = $.fn.zTree.init(
// $('#' + this.treeId),
// this.setting,
// this.$store.state.ElnTemplateCategory.list
// )
// treeObj.expandAll(true)
// setTimeout(() => {
// this.isloading = false
// this.isTree = true
// }, 300)
// })
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/OriginalRecordEdit.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<!--
<Modal
v-model=
"showModal"
title=
"原始记录"
:mask-closable=
"false"
width=
"1300"
class=
"modal-footer-none"
>
-->
<!--
<div
style=
"text-align:center;align-content:center;width: 100%;height: 790px"
v-html=
"htmlContent"
>
-->
<!--
</div>
-->
<!--
</Modal>
-->
</div>
</
template
>
<
script
>
import
Global
from
'../../../api/config'
import
{
soilTest
}
from
'../../../api'
/**
* 编辑原始记录详情
*/
export
default
{
data
()
{
return
{
// showModal: false,
again
:
false
,
formId
:
''
,
htmlContent
:
''
,
formIdTemp
:
''
}
},
created
()
{
// 监听原始记录消息
// eslint-disable-next-line nuxt/no-globals-in-created
window
.
addEventListener
(
'message'
,
this
.
_saveOriginal
)
},
// 销毁监听事件
beforeDestroy
()
{
this
.
again
=
false
window
.
removeEventListener
(
'message'
,
this
.
_saveOriginal
)
},
methods
:
{
_open
(
formId
)
{
this
.
formId
=
formId
this
.
formIdTemp
=
formId
+
this
.
$randomCode
()
this
.
again
=
true
// this.showModal = true;
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const
bindUri
=
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_YT_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
// this.htmlContent = '
<
iframe
style
=
"padding: 0px;width:100%;height:100%"
frameborder
=
"0"
src
=
' + encodeURI(url) + '
><
/iframe>'
;
this
.
$layx
(
this
.
formIdTemp
,
'编辑原始记录'
,
url
)
},
_openWithType
(
formId
,
fromType
)
{
this
.
formId
=
formId
this
.
formIdTemp
=
formId
+
this
.
$randomCode
()
this
.
again
=
true
// this.showModal = true;
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const
bindUri
=
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_YT_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
+
'&type='
+
fromType
// this.htmlContent = '
<
iframe
style
=
"padding: 0px;width:100%;height:100%"
frameborder
=
"0"
src
=
' + encodeURI(url) + '
><
/iframe>'
;
this
.
$layx
(
this
.
formIdTemp
,
'编辑原始记录'
,
url
)
},
_saveOriginal
(
data
)
{
console
.
log
(
'修改的数据'
,
data
)
if
(
this
.
again
)
{
if
(
data
.
data
.
msg
===
true
)
{
this
.
_editSaveRecord
(
data
)
}
else
{
this
.
_cancel
()
}
this
.
again
=
false
}
},
_cancel
()
{
// this.showModal = false;
// 关闭所有layx弹框
// eslint-disable-next-line no-undef
layx
.
destroyAll
(
this
.
formIdTemp
)
},
_updateRecord
:
async
function
(
param
)
{
const
result
=
await
soilTest
.
updateItem
(
param
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
_cancel
()
this
.
$emit
(
'on-result-change'
)
}
},
// 保存后解析项目的检测值
_editSaveRecord
(
data
)
{
const
param
=
{
formId
:
this
.
formId
}
console
.
log
(
'data'
,
data
)
const
copyMapTemp
=
{}
if
(
data
.
data
.
copySheet
&&
data
.
data
.
copyedSheet
)
{
param
.
copyMap
=
{}
const
copyedKey
=
String
(
data
.
data
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
data
.
data
.
copySheet
)
// 存在复制sheet的情况
param
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
}
else
if
(
typeof
data
.
data
.
testValueArry
!==
'undefined'
)
{
const
testValue
=
data
.
data
.
testValueArry
param
.
copyMap
=
{}
testValue
.
forEach
(
item
=>
{
const
copyedKey
=
String
(
item
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
item
.
copySheet
)
param
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
})
}
this
.
_updateRecord
(
param
)
// this.$store.dispatch('EnvItem/updateFormForItem', param).then(() => {
// if (this.$store.state.EnvItem.success) {
// this.$Message.success('保存成功')
// // this.showModal = false;
// this.$emit('on-result-change')
// this._cancel()
// }
// })
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/RecordIframe.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
</div>
</
template
>
<
script
>
import
{
Iframe
}
from
'../../../plugins/iframe'
/**
* 自定义打开 原始记录添加界面
*/
export
default
{
props
:
{
ifrAction
:
null
},
data
()
{
return
{
iframeShow
:
false
,
isLoading
:
false
,
fullScreenHeight
:
document
.
documentElement
.
clientHeight
-
82
+
'px'
,
iframeHeight
:
document
.
documentElement
.
clientHeight
-
300
+
'px'
,
iframeHeader
:
'原始记录添加'
}
},
methods
:
{
/** 自定义iframe**/
_createIframe
(
bindUri
,
params
)
{
Iframe
.
iframe
(
bindUri
,
params
)
},
/** 自定义iframe的使用**/
_closeIframe
()
{
Iframe
.
closeModalDiv
()
}
}
}
</
script
>
<
style
>
.record-modal
{
width
:
800px
;
height
:
500px
;
border
:
1px
solid
#0079fd
;
position
:
fixed
;
box-shadow
:
0
0
10px
#505050
;
top
:
0
;
left
:
0
;
display
:
block
;
}
.record-modal-header
{
width
:
100%
;
height
:
30px
;
background-color
:
#ffffff
;
position
:
relative
;
border-bottom
:
1px
solid
#ffffff
;
}
.record-modal-title
{
width
:
200px
;
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
100%
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#000
;
text-align
:
left
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
line-height
:
30px
;
margin-left
:
10px
;
}
.record-modal-btn
{
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
120px
;
height
:
100%
;
margin-top
:
0
;
/*margin-left: 680px;*/
}
.record-modal-btn
>
div
{
float
:
left
;
width
:
40px
;
height
:
100%
;
font-size
:
14px
;
line-height
:
30px
;
text-align
:
center
;
cursor
:
default
;
user-select
:
none
;
}
.record-modal-max
{
font-weight
:
bold
;
}
.record-modal-min
:hover
,
.record-modal-max
:hover
{
background-color
:
#e5e5e5
;
}
.record-modal-close
{
font-size
:
24px
!important
;
}
.record-modal-close
:hover
{
background-color
:
#e81123
!important
;
}
.record-modal-content
{
width
:
100%
;
height
:
470px
;
position
:
relative
;
background-color
:
#ffffff
;
}
.record-loading-content
{
background-color
:
#ffffff
;
width
:
100%
;
text-align
:
center
;
position
:
absolute
;
top
:
50%
;
transform
:
translateY
(
-50%
);
}
</
style
>
pages/soil-sample-manage/sample-preparation/SampleManage.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<Modal
v-model=
"showSampleModal"
@
on-visible-change=
"_visibleChange"
width=
"1200"
class=
"zIndex-900 modal-footer-none"
>
<p
slot=
"header"
>
管理样品
</p>
<div>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"制备管理"
name=
"prepareManage"
>
<SoilSampleManage
ref=
"prepareManage"
></SoilSampleManage>
</el-tab-pane>
<el-tab-pane
label=
"原始记录填写"
name=
"recordModal"
>
<RecordWrite
ref=
"recordModal"
></RecordWrite>
</el-tab-pane>
</el-tabs>
<!--
<keep-alive>
-->
<!-- <!– eslint-disable-next-line vue/require-component-is –>-->
<!--
<component
ref=
"refModal"
:is=
"currentComponent"
></component>
-->
<!--
</keep-alive>
-->
</div>
</Modal>
</div>
</
template
>
<
script
>
import
SoilSampleManage
from
'../SoilSampleManageTab'
import
RecordWrite
from
'./sample-preparation-record/RecordIndex'
export
default
{
components
:
{
SoilSampleManage
,
RecordWrite
},
data
()
{
return
{
type
:
''
,
contractId
:
''
,
// 合同id
entrustId
:
''
,
showSampleModal
:
false
,
modalTitle
:
''
,
selectIds
:
[],
activeName
:
'prepareManage'
,
name
:
''
,
currentComponent
:
''
}
},
mounted
()
{},
methods
:
{
_open
(
entrustId
,
type
,
name
)
{
this
.
type
=
type
// 类型(采样或送样)
this
.
name
=
name
this
.
showSampleModal
=
true
this
.
entrustId
=
entrustId
// 委托id
this
.
activeName
=
'prepareManage'
this
.
selectIds
=
[]
this
.
_preparePage
()
},
// 制备管理
_preparePage
()
{
this
.
$refs
.
prepareManage
.
_open
(
this
.
entrustId
)
},
// 原始记录填写
_recordPage
()
{
this
.
$refs
.
recordModal
.
_open
(
this
.
entrustId
)
},
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'prepareManage'
)
{
// this._issuedPage()
this
.
$refs
.
prepareManage
.
_open
(
this
.
entrustId
)
this
.
$refs
.
recordModal
.
_clearTable
()
}
else
{
this
.
$refs
.
recordModal
.
_open
(
this
.
entrustId
)
}
},
// 关闭弹框的时候刷新上个界面
_visibleChange
(
data
)
{
if
(
data
===
false
)
{
}
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/SamplePreparation.vue
View file @
f87c6d1b
...
...
@@ -57,8 +57,8 @@
import
{
soilEntrust
}
from
'../../../api'
import
http
from
'../../../api/http'
import
Operation
from
'../../../components/operation/Operation'
import
SoilSampleManage
from
'../SoilSampleManage'
import
global
from
'../../../api/config'
import
SampleManage
from
'./SampleManage'
import
SamplePreparationEdit
from
'./SamplePreparationEdit'
import
SoilSampleItemManageEdit
from
'./SoilSampleItemManageEdit'
import
SoilEntrustItemNum
from
'./SoilItemNum'
...
...
@@ -69,7 +69,7 @@ export default {
// eslint-disable-next-line vue/no-unused-components
SamplePreparationEdit
,
// eslint-disable-next-line vue/no-unused-components
S
oilS
ampleManage
,
SampleManage
,
// eslint-disable-next-line vue/no-unused-components
SoilSampleItemManageEdit
,
// eslint-disable-next-line vue/no-unused-components
...
...
@@ -80,29 +80,8 @@ export default {
currentComponent
:
''
,
formId
:
'meterSubcontractorFormId'
,
searchOpen
:
false
,
btn
:
[
// {
// type: 'success',
// id: '',
// name: '添加'
// },
// {
// type: 'success',
// id: '',
// name: '提交至评审'
// },
// {
// type: 'success',
// id: '',
// name: '提交'
// }
],
btn
:
[],
iconMsg
:
[
// {
// type: 'md-create',
// id: '',
// name: '编辑'
// },
{
type
:
'ios-list'
,
id
:
''
,
...
...
@@ -123,11 +102,6 @@ export default {
id
:
''
,
name
:
'导出开土制备记录'
},
// {
// type: 'ios-beaker',
// id: '',
// name: '管理样品'
// },
{
type
:
'ios-camera-outline'
,
id
:
''
,
...
...
@@ -260,7 +234,7 @@ export default {
},
_sampleManage
(
data
)
{
// 管理样品
this
.
currentComponent
=
'S
oilS
ampleManage'
this
.
currentComponent
=
'SampleManage'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
data
)
})
...
...
pages/soil-sample-manage/sample-preparation/SelectOriTempRecord.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<Modal
v-model=
"showModal"
v-drag
width=
"1100"
>
<p
slot=
"header"
>
选择原始记录模板
</p>
<div>
<TwoCard
@
on-result-change=
"_refresh"
:gutter=
16
left-name=
"原始记录模板类别"
right-name=
"实验室原始记录模板名称"
left-span=
"8"
>
<template
slot=
"left"
>
<OriginalRecordClassTree
ref=
"classTree"
@
on-result-change=
"_classData"
></OriginalRecordClassTree>
</
template
>
<
template
slot=
"right"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
:label-width=
"50"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"名称:"
>
<Input
v-model=
"formObj.title"
@
on-enter=
"_search"
placeholder=
"请输入名称"
style=
"width: 200px"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_search"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETableHeight
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:isRadio=
"true"
hide-checkbox
>
<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.key==='ctime'"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETableHeight>
</Col>
</Row>
</template>
</TwoCard>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></modal-footer>
</div>
</Modal>
<!--自定义post请求iframe-->
<RecordIframe
ref=
"iframeModal"
></RecordIframe>
</div>
</template>
<
script
>
/**
* 选择原始记录模板(实验室的)
*/
import
Global
from
'../../../api/config'
import
TwoCard
from
'../../../components/base/TwoCard'
import
{
soilTest
}
from
'../../../api'
import
OriginalRecordClassTree
from
'./OriginalRecordClassTree'
import
RecordIframe
from
'./RecordIframe'
let
count
=
0
export
default
{
components
:
{
OriginalRecordClassTree
,
TwoCard
,
RecordIframe
},
data
()
{
return
{
showModal
:
false
,
getPage
:
{},
pageColumns
:
[{
title
:
'名称'
,
key
:
'title'
}],
formObj
:
{
id
:
''
,
title
:
''
,
businessTypeList
:
0
},
entrustId
:
''
,
clientList
:
[],
selectData
:
[],
itemIds
:
[],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
]
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
''
,
300
)
}
},
created
()
{
// 监听原始记录消息
// eslint-disable-next-line nuxt/no-globals-in-created
window
.
addEventListener
(
'message'
,
this
.
_saveOriginal
)
},
// 销毁监听事件
beforeDestroy
()
{
count
=
0
window
.
removeEventListener
(
'message'
,
this
.
_saveOriginal
)
},
methods
:
{
// 刷新左右数据
_refresh
()
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
businessTypeList
=
0
this
.
$refs
.
classTree
.
_requestByBusinessTypeList
()
this
.
_search
()
},
// 左侧数据请求
_classTree
()
{
const
height
=
this
.
$tableHeight
(
''
,
300
)
this
.
$refs
.
classTree
.
_Ztree
(
height
,
0
)
},
// 左边树的点击
_classData
(
result
)
{
if
(
result
!==
undefined
)
{
this
.
formObj
.
id
=
result
.
id
}
else
{
this
.
formObj
.
id
=
''
}
this
.
_search
()
},
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
showModal
=
false
break
case
'确定'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_open
(
ids
,
entrustId
,
clientInfo
)
{
console
.
log
(
Global
.
recordURL
)
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
entrustId
=
entrustId
this
.
clientList
=
clientInfo
this
.
_classTree
()
this
.
showModal
=
true
this
.
itemIds
=
ids
this
.
formObj
.
businessTypeList
=
0
this
.
_page
()
this
.
selectData
=
[]
this
.
_hideLoading
()
count
=
0
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
this
.
id
const
result
=
await
soilTest
.
templatePage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_search
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'singleSelect'
:
this
.
selectData
=
[
data
]
break
case
'dbSelect'
:
this
.
selectData
=
[
data
]
this
.
_ok
()
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_ok
()
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一个原始记录模板!'
)
this
.
_hideLoading
()
}
else
{
console
.
log
(
this
.
selectData
)
// 校验多样品多项目原始记录模板
this
.
_createOriginalRecord
()
}
},
_check
:
async
function
(
param
)
{
const
result
=
await
soilTest
.
checkLimit
(
param
)
console
.
log
(
result
)
},
_createOriginalRecord
()
{
this
.
showModal
=
false
console
.
log
(
'环境'
,
process
.
env
.
NODE_ENV
)
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
let
baseUrl
=
Global
.
baseURL
baseUrl
+=
'/soil/v1/sample/original_record_data_bind?entrustId='
+
this
.
entrustId
+
'&expIds='
+
this
.
itemIds
+
'&modelId='
+
this
.
selectData
[
0
].
id
const
url
=
recordUrl
+
'/print/v1/eln/template_meter_'
+
this
.
selectData
[
0
].
id
+
'?bindUri='
+
encodeURIComponent
(
baseUrl
)
const
params
=
{
ids
:
this
.
itemIds
.
join
(
','
),
client
:
this
.
clientList
[
0
],
bindUri
:
encodeURIComponent
(
baseUrl
)
}
this
.
$refs
.
iframeModal
.
_createIframe
(
url
,
params
)
console
.
log
(
'原始记录'
,
url
,
params
)
localStorage
.
setItem
(
'recordStatus'
,
'addLabRecord'
)
},
_recordChange
()
{
this
.
$emit
(
'on-result-change'
)
},
_save
:
async
function
(
temp
)
{
const
result
=
await
soilTest
.
saveItem
(
temp
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$Message
.
success
(
'添加成功'
)
this
.
_recordChange
()
this
.
$refs
.
iframeModal
.
_closeIframe
()
}
},
// 保存原始记录信息
_saveOriginal
(
data
)
{
if
(
localStorage
.
getItem
(
'recordStatus'
)
===
'addLabRecord'
)
{
if
(
count
===
0
)
{
if
(
data
.
data
.
msg
!==
true
)
{
// 添加
const
tempData
=
{
formId
:
data
.
data
.
msg
,
ids
:
this
.
itemIds
.
join
(
','
)
}
console
.
log
(
'saveData'
,
data
)
const
copyMapTemp
=
{}
if
(
data
.
data
.
copySheet
&&
data
.
data
.
copyedSheet
)
{
tempData
.
copyMap
=
{}
const
copyedKey
=
String
(
data
.
data
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
data
.
data
.
copySheet
)
// 存在复制sheet的情况
tempData
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
}
else
if
(
typeof
data
.
data
.
testValueArry
!==
'undefined'
)
{
const
testValue
=
data
.
data
.
testValueArry
tempData
.
copyMap
=
{}
testValue
.
forEach
(
item
=>
{
const
copyedKey
=
String
(
item
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
item
.
copySheet
)
tempData
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
})
}
console
.
log
(
'保存的数据'
,
tempData
)
if
(
tempData
.
formId
!==
undefined
)
{
tempData
.
entrustId
=
this
.
entrustId
this
.
_save
(
tempData
)
}
}
}
count
=
count
+
1
}
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/sample-preparation-record/RecordIndex.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<TwoColumnPage>
<template
slot=
"left"
>
<ItemLeftList
ref=
"leftModal"
@
on-result-change=
"_leftResult"
></ItemLeftList>
</
template
>
<
template
slot=
"right"
>
<ItemRightList
ref=
"rightModal"
@
on-result-change=
"_rightResult"
></ItemRightList>
</
template
>
</TwoColumnPage>
</div>
</template>
<
script
>
import
TwoColumnPage
from
'../../../../components/base/TwoColumnPage'
import
ItemLeftList
from
'./RecordLeftList'
import
ItemRightList
from
'./RecordRightList'
export
default
{
components
:
{
TwoColumnPage
,
ItemLeftList
,
ItemRightList
},
data
()
{
return
{
id
:
''
}
},
methods
:
{
_leftResult
(
data
)
{
console
.
log
(
'ItemTabs'
,
data
)
this
.
$refs
.
rightModal
.
_open
(
this
.
id
,
data
)
},
_rightResult
()
{
this
.
$refs
.
leftModal
.
_page
()
},
_open
(
id
)
{
this
.
id
=
id
console
.
log
(
id
)
this
.
$refs
.
leftModal
.
_open
(
this
.
id
)
},
_clearTable
()
{
this
.
$refs
.
rightModal
.
_clearAll
()
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/sample-preparation-record/RecordLeftList.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"task-assign-item-left"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检测项目:"
>
<Input
v-model=
"formObj.name"
@
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
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 6px;"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:isRadio=
"true"
:pageColumns=
"pageColumns"
:table-name=
"tableName"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:hide-checkbox=
"true"
select-data
>
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<a
v-if=
"item.detail"
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<span
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
<VXESettingCol
slot=
"setting"
:pageColumns=
"pageColumns"
:userColumns=
"userColumns"
@
on-result-change=
"_resetColumn"
:table-name=
"tableName"
></VXESettingCol>
</PTVXETable>
</Col>
</Row>
</div>
</template>
<
script
>
import
{
soilTest
}
from
'../../../../api'
export
default
{
components
:
{},
data
()
{
return
{
currentComponent
:
''
,
formObj
:
{
name
:
undefined
},
tableName
:
'food-task-assign-item-left'
,
// 用户自己选中的列
userColumns
:
[],
optionList
:
[
{
key
:
'name'
,
name
:
'检测项目'
,
placeholder
:
'请输入检测项目'
},
{
key
:
'testBasis'
,
name
:
'检测依据'
,
placeholder
:
'请输入检测依据'
}
],
getPage
:
{},
id
:
''
,
pageColumns
:
[
{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
},
{
title
:
'检测方法'
,
key
:
'testMethod'
,
width
:
140
},
{
title
:
'检测依据名称'
,
key
:
'testBasisName'
,
width
:
200
}
]
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tabSearch'
)
}
},
methods
:
{
// 重置column
_resetColumn
(
colList
)
{
this
.
userColumns
=
colList
this
.
$refs
.
pageTable
.
_loadColumn
(
colList
)
},
_modalResult
()
{
if
(
this
.
currentComponent
===
'AutoAssignModal'
)
{
this
.
_formSearch
()
}
},
_selInputResult1
(
msg
,
data
)
{
switch
(
msg
)
{
case
'search'
:
this
.
_formSearch
()
break
}
},
_open
(
id
)
{
this
.
id
=
id
this
.
_page
()
},
_searchParams
()
{
const
obj
=
{}
const
obj1
=
this
.
$refs
.
selInput1
.
_getFormObj
()
Object
.
assign
(
obj
,
obj1
)
return
obj
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
this
.
id
const
result
=
await
soilTest
.
pagePrepareByExp
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_tableResultChange
(
msg
,
data
)
{
console
.
log
(
msg
,
data
)
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodItem
.
page
break
case
'selectData'
:
this
.
$emit
(
'on-result-change'
,
data
)
break
case
'singleSelect'
:
this
.
$emit
(
'on-result-change'
,
data
)
break
case
'changeSize'
:
this
.
_page
()
break
case
'table-col'
:
// 用户选中的表格列
this
.
userColumns
=
data
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'自动分配'
:
this
.
_autoAssign
()
break
}
},
_autoAssign
()
{
console
.
log
(
'自动分配'
)
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/sample-preparation-record/RecordRightList.vue
0 → 100644
View file @
f87c6d1b
<
template
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"task-assign-item-right"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检测项目:"
>
<Input
@
on-enter=
"_formSearch"
name=
"name"
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
:msg=
"envPro?btnPro:btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:pageColumns=
"pageColumns"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:icon-msg=
"iconMsg"
:table-name=
"tableName"
is-task
select-data
>
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.key === 'name'"
:style=
"
{color:colorComputed(scope.row.planEndDate)}">
{{
scope
.
row
[
item
.
key
]
}}
</div>
<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>
<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.key==='progress'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
<VXESettingCol
slot=
"setting"
:pageColumns=
"pageColumns"
:userColumns=
"userColumns"
@
on-result-change=
"_resetColumn"
:table-name=
"tableName"
></VXESettingCol>
</PTVXETable>
</Col>
</Row>
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_assignBackData"
></AssignPerson>
<SelectOriTempRecord
ref=
"recordModal"
@
on-result-change=
"_page"
></SelectOriTempRecord>
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
<EquipManage
ref=
"equipModal"
@
on-result-change=
"_page"
></EquipManage>
<CollectManage
ref=
"collectModal"
@
on-result-change=
"_page"
></CollectManage>
<CollectFileManage
ref=
"collectFileModal"
@
on-result-change=
"_page"
></CollectFileManage>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
</div>
</template>
<
script
>
import
Global
from
'../../../../api/config'
import
{
soilTest
}
from
'../../../../api'
import
AssignPerson
from
'../../../../components/user-info-single/assignPerson'
import
SelectOriTempRecord
from
'../SelectOriTempRecord'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
import
IndexManage
from
'../IndexManage'
import
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
EquipManage
from
'../EquipManage'
import
CollectManage
from
'../CollectManage'
import
CollectFileManage
from
'../CollectFileManage'
export
default
{
components
:
{
AssignPerson
,
SelectOriTempRecord
,
OriginalRecordEdit
,
IndexManage
,
SelEquip
,
EquipManage
,
CollectManage
,
CollectFileManage
},
data
()
{
return
{
// 定义表格名称----英文
tableName
:
'food-task-assign-item-right'
,
formObj
:
{
entrustId
:
''
,
name
:
''
,
testMethod
:
''
,
testBasis
:
''
},
entrustId
:
''
,
envPro
:
false
,
// 用户自己选中的列
userColumns
:
[],
currentComponent
:
''
,
optionList
:
[
{
key
:
'name'
,
name
:
'检测项目'
,
placeholder
:
'请输入检测项目'
},
{
key
:
'code'
,
name
:
'委托编号'
,
placeholder
:
'请输入委托编号'
},
{
key
:
'num'
,
name
:
'样品编号'
,
placeholder
:
'请输入样品编号'
},
{
key
:
'sampleName'
,
name
:
'样品名称'
,
placeholder
:
'请输入样品名称'
},
{
key
:
'testBasis'
,
name
:
'检测依据'
,
placeholder
:
'请输入检测依据'
},
{
key
:
'resultDate'
,
name
:
'数据出具日期'
,
placeholder
:
'请选择数据出具日期'
,
date
:
true
},
{
key
:
'receiveDate'
,
name
:
'接样日期'
,
placeholder
:
'请选择接样日期'
,
date
:
true
},
{
key
:
'tester'
,
name
:
'主检人'
,
placeholder
:
'请输入主检人'
},
{
key
:
'detectType'
,
name
:
'样品类别'
,
placeholder
:
'请输入样品类别'
}
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'完成提交'
},
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
}
],
btnPro
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
},
{
type
:
'success'
,
id
:
''
,
name
:
'完成提交'
}
],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
},
{
type
:
'ios-bookmarks'
,
id
:
''
,
name
:
'查看采集数据'
},
{
type
:
'ios-browsers'
,
id
:
''
,
name
:
'查看采集文件'
},
{
type
:
'ios-flask'
,
id
:
''
,
name
:
'设备列表'
}
],
getPage
:
{},
pageColumns
:
[
{
title
:
'试验项目'
,
key
:
'name'
,
width
:
120
,
fixed
:
'left'
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
180
},
{
title
:
'是否填写原始记录'
,
key
:
'recorded'
,
width
:
180
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
180
},
{
title
:
'试样包装类型'
,
key
:
'samplePack'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
180
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'检测方法'
,
key
:
'testMethod'
,
width
:
260
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
140
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
150
}
],
leftSelectData
:
{},
selectIds
:
[],
// 检测项目id
selectData
:
[],
// 检测项目data
selectSampleIds
:
[],
// 样品ids
result
:
[],
sampleNames
:
''
,
// 没有计划完成时间的样品名
defaultPlanDate
:
null
,
// 是否有字典
warningValue
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tabSearch'
)
},
colorComputed
()
{
return
function
(
val
)
{
return
val
-
new
Date
().
getTime
()
>
this
.
warningValue
*
86400000
?
'#606266'
:
val
-
new
Date
().
getTime
()
<=
0
?
'#eb6877'
:
'#f90'
}
}
},
mounted
()
{
// this._dicSearch()
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
this
.
envPro
=
true
}
},
methods
:
{
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'查看原始记录'
:
console
.
log
(
data
)
if
(
data
.
recordId
)
{
this
.
_viewRecord
(
data
.
recordId
)
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
break
case
'查看指标'
:
this
.
_indexManage
(
data
)
break
case
'查看采集数据'
:
this
.
_collectManage
(
data
)
break
case
'查看采集文件'
:
this
.
_collectFileManage
(
data
)
break
case
'设备列表'
:
this
.
_equipManage
(
data
)
break
}
})
},
_collectManage
(
data
)
{
this
.
$refs
.
collectModal
.
_open
(
data
)
},
_collectFileManage
(
data
)
{
this
.
$refs
.
collectFileModal
.
_open
(
data
)
},
_indexManage
(
data
)
{
this
.
$refs
.
indexModal
.
_open
(
data
)
},
_equipManage
(
data
)
{
this
.
$refs
.
equipModal
.
_open
(
data
)
},
_viewRecord
(
recordId
)
{
console
.
log
(
recordId
)
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
recordUrl
+
'/print/v1/form/'
+
recordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
// 获取column
_getColumn
()
{
this
.
$refs
.
pageTable
.
_getColByTableName
()
},
// 重置column
_resetColumn
(
colList
)
{
this
.
userColumns
=
colList
this
.
$refs
.
pageTable
.
_loadColumn
(
colList
)
},
_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
(
'添加成功'
)
}
},
// 从字典查预警期
_dicSearch
()
{
const
data
=
[
'食品检测预警天数'
,
'食品默认计划完成时间'
]
this
.
$store
.
dispatch
(
'LmsBaseDict/listDict'
,
data
).
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
LmsBaseDict
.
list
// eslint-disable-next-line camelcase
const
result_1
=
result
[
0
]
// eslint-disable-next-line camelcase
const
result_2
=
result
[
1
]
// 1食品检测预警天数
if
(
result_1
.
length
!==
0
)
{
this
.
warningValue
=
result_1
[
0
].
name
}
// 2食品默认计划完成时间
this
.
defaultPlanDate
=
result_2
.
length
!==
0
?
result_2
[
0
].
name
===
'是'
?
(
this
.
defaultPlanDate
=
true
)
:
(
this
.
defaultPlanDate
=
false
)
:
(
this
.
defaultPlanDate
=
false
)
})
},
_selInputResult1
(
msg
,
data
)
{
switch
(
msg
)
{
case
'keyword'
:
this
.
$refs
.
selInput2
.
_setCompareKeyword
(
data
)
break
case
'search'
:
this
.
_formSearch
()
break
}
},
_selInputResult2
(
msg
,
data
)
{
switch
(
msg
)
{
case
'keyword'
:
this
.
$refs
.
selInput1
.
_setCompareKeyword
(
data
)
break
case
'search'
:
this
.
_formSearch
()
break
}
},
_modalResult
(
data
)
{
switch
(
this
.
currentComponent
)
{
case
'AssignPerson'
:
if
(
this
.
defaultPlanDate
)
{
this
.
_trueDefault
(
data
)
}
else
{
this
.
_userResult
(
data
)
}
break
case
'EndDateModal'
:
// if(this.defaultPlanDate){
// this._endDate()
// } else {
this
.
_page
()
// }
break
case
'UserGroup'
:
this
.
_userGroupResult
(
data
)
break
default
:
this
.
_page
()
}
},
// 为 true时,有字典按人分配
_trueDefault
(
data
)
{
const
tempData
=
{
ids
:
this
.
selectIds
.
join
(
','
),
personId
:
data
.
userId
,
personName
:
data
.
realname
,
groupId
:
data
.
groupId
,
groupName
:
data
.
groupName
}
Object
.
assign
(
tempData
,
{
planDate
:
null
})
this
.
$store
.
dispatch
(
'FoodItem/personAllot'
,
tempData
).
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodItem
.
success
)
{
this
.
sampleNames
=
''
this
.
_page
()
this
.
_resultChange
(
'分配成功!'
)
}
})
},
// 设置时间
_endDate
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
this
.
currentComponent
=
'AssignPerson'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_openGoupByUserId
(
'分配人员'
,
user
.
id
,
'itemTree'
)
})
}
},
// 调整分组
_userGroupResult
(
data
)
{
const
tempData
=
{
groupId
:
data
.
id
,
groupName
:
data
.
name
,
ids
:
this
.
selectIds
.
join
(
','
)
}
this
.
$store
.
dispatch
(
'FoodItem/adjustTestGroup'
,
tempData
).
then
(()
=>
{
this
.
_resultChange
(
'调整成功'
)
})
},
_resultChange
(
msg
)
{
this
.
$Message
.
success
(
msg
)
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
},
async
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'按人分配'
:
this
.
_allotByPerson
()
// await this._reportDueDate()
// await this._userAssign()
break
case
'试验项目分配'
:
this
.
_userAssign
()
break
case
'填写原始记录'
:
this
.
_addRecord
()
break
case
'完成提交'
:
this
.
_submitItem
(
this
.
selectData
)
break
case
'设备'
:
this
.
_selectEquipment
()
break
case
'按组分配'
:
await
this
.
_reportDueDate
()
await
this
.
_groupAssign
()
break
case
'调整分组'
:
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择=一条数据'
)
}
else
{
this
.
currentComponent
=
'UserGroup'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
()
})
}
break
case
'设置计划完成时间'
:
this
.
currentComponent
=
'EndDateModal'
this
.
$nextTick
(
function
()
{
this
.
_changeDate
()
})
break
case
'信息维护'
:
this
.
_maintainInfo
()
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
=
[]
const
clientInfo
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
clientInfo
.
push
(
this
.
selectData
[
i
].
client
)
console
.
log
(
this
.
selectData
[
i
].
recorded
)
if
(
this
.
selectData
[
i
].
recorded
!==
'否'
)
{
errorInfo
.
push
(
this
.
selectData
[
i
].
index
+
1
)
}
}
if
(
errorInfo
.
length
!==
0
)
{
this
.
$Message
.
warning
(
'所选数据中有已填写原始记录的'
)
}
else
{
console
.
log
(
'打开填写原始记录界面'
)
this
.
$refs
.
recordModal
.
_open
(
this
.
selectIds
,
this
.
entrustId
,
clientInfo
)
}
}
},
_allotByPerson
()
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
this
.
$refs
.
personModal
.
_openGoupByUserId
(
'分配人员'
,
user
.
id
,
'itemTree'
)
},
// 信息维护
_maintainInfo
()
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
currentComponent
=
'MaintainInfoModal'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
selectSampleIds
,
2
)
})
}
},
_changeDate
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
const
tempData
=
{
ids
:
this
.
selectIds
.
join
(
','
)
}
this
.
$refs
.
refModal
.
_open
(
tempData
,
'planDate'
)
}
},
_open
(
id
,
data
)
{
this
.
leftSelectData
=
data
this
.
entrustId
=
id
if
(
data
.
length
===
0
)
{
this
.
$set
(
this
.
getPage
,
'records'
,
[])
this
.
$set
(
this
.
getPage
,
'total'
,
0
)
this
.
$set
(
this
.
getPage
,
'current'
,
1
)
this
.
selectSampleIds
=
[]
this
.
selectIds
=
[]
this
.
selectData
=
[]
this
.
result
=
[]
}
else
{
this
.
_formSearch
()
}
},
_refresh
()
{
this
.
$emit
(
'on-result-change'
)
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_searchParams
()
{
const
obj
=
{}
const
obj1
=
this
.
$refs
.
selInput1
.
_getFormObj
()
const
obj2
=
this
.
$refs
.
selInput2
.
_getFormObj
()
const
obj3
=
{
foodItemList
:
this
.
leftSelectData
}
Object
.
assign
(
obj
,
obj1
,
obj2
,
obj3
)
return
obj
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
this
.
entrustId
this
.
formObj
.
name
=
this
.
leftSelectData
.
name
this
.
formObj
.
testMethod
=
this
.
leftSelectData
.
testMethod
const
result
=
await
soilTest
.
pageExpPrepare
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_checkAll
()
this
.
getPage
=
result
}
},
_tableResultChange
(
msg
,
data
)
{
const
selectIds
=
[]
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
// this.result = this.getPage.records;
// this.$nextTick(() => {
// this.$refs.pageTable._checkAll()
// })
// if (this.getPage.records.length === 0) {
// this.$emit('on-result-change')
// }
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'selectData'
:
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
this
.
selectData
=
data
break
case
'table-col'
:
// 用户选中的表格列
this
.
userColumns
=
data
break
case
'changeSize'
:
this
.
_page
()
// this.$refs.pageTable._checkAll()
break
}
},
// 按人分配 选人选时间
_assignBackData
(
data
)
{
console
.
log
(
data
)
const
tempData
=
{}
tempData
.
ids
=
this
.
selectIds
.
join
(
','
)
tempData
.
user
=
data
.
realname
tempData
.
userId
=
data
.
userId
this
.
_allotItems
(
tempData
)
},
_allotItems
:
async
function
(
data
)
{
const
result
=
await
soilTest
.
allotExp
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'分配成功'
)
}
},
_userAssign
()
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
console
.
log
(
user
)
this
.
$refs
.
personModal
.
_openGoup
(
'分配人员'
,
'itemTree'
)
// if (this.defaultPlanDate) {
// // 有字典
// if (this.sampleNames === '') {
// // 有计划完成时间
// const user = Global.getUserInfo('userInfo')
// this.currentComponent = 'AssignPerson'
// this.$nextTick(function() {
// this.$refs.refModal._openGoupByUserId(
// '分配人员',
// user.id,
// 'itemTree'
// )
// })
// } else {
// // 有字典,无计划完成时间的
// this.$Modal.confirm({
// title: '提示',
// content:
// '所选项目中含有未设置计划完成时间的' +
// `${this._reportDueDate()}` +
// '请确认!',
// onOk: () => {}
// })
// }
// } else {
// // 无字典
// this.currentComponent = 'EndDateModal'
// this.$nextTick(() => {
// this._endDate()
// })
// }
},
// 遍历出计划时间为空的样品名
_reportDueDate
()
{
const
sampleNames
=
[]
for
(
let
i
=
0
;
i
<
this
.
result
.
length
;
i
++
)
{
if
(
!
this
.
result
[
i
].
planEndDate
)
{
sampleNames
.
push
(
this
.
result
[
i
].
name
)
}
}
this
.
sampleNames
=
[...
new
Set
(
sampleNames
)].
join
(
','
)
return
this
.
sampleNames
},
_userResult
(
data
)
{
const
tempData
=
{
ids
:
this
.
selectIds
.
join
(
','
),
personId
:
data
.
userId
,
personName
:
data
.
realname
,
groupId
:
data
.
groupId
,
groupName
:
data
.
groupName
}
this
.
currentComponent
=
'EndDateModal'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_open
(
tempData
,
'user'
)
})
},
// 按组分配 选时间
_groupAssign
()
{
if
(
this
.
defaultPlanDate
)
{
// 有字典
if
(
this
.
sampleNames
===
''
)
{
// 有计划完成时间
const
tempData
=
{
ids
:
this
.
selectIds
.
join
(
','
)
}
Object
.
assign
(
tempData
,
{
planDate
:
null
})
this
.
$store
.
dispatch
(
'FoodItem/groupAllot'
,
tempData
).
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodItem
.
success
)
{
this
.
$Message
.
success
(
'分配成功!'
)
this
.
_page
()
}
})
}
else
{
// 有字典,无计划完成时间
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'所选项目中含有未设置计划完成时间的'
+
`
${
this
.
_reportDueDate
()}
`
+
'请确认!'
,
onOk
:
()
=>
{}
})
}
}
else
{
// 无字典的
// eslint-disable-next-line no-lonely-if
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
const
tempData
=
{
ids
:
this
.
selectIds
.
join
(
','
)
}
this
.
currentComponent
=
'EndDateModal'
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_open
(
tempData
,
'group'
)
})
}
}
},
// 委托详情
_detailModal
(
data
)
{
this
.
$store
.
dispatch
(
'FoodContract/getById'
,
data
.
contractId
).
then
(()
=>
{
if
(
data
.
type
===
1
)
{
this
.
currentComponent
=
'FoodContractGovernDetail'
}
else
{
this
.
currentComponent
=
'FoodContractCompanyDetail'
}
this
.
$nextTick
(
function
()
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodContract
.
model
)
})
})
},
// 样品详情
_sampleDetail
(
data
)
{
this
.
$nextTick
(
function
()
{
if
(
data
.
type
===
1
)
{
this
.
currentComponent
=
'FoodSampleGovernDetail'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
}
else
{
this
.
currentComponent
=
'FoodSampleCompanyDetail'
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
sampleId
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
companyModel
)
})
}
this
.
$refs
.
refModal
.
_open
(
data
.
sampleId
)
})
},
_clearAll
()
{
this
.
getPage
.
records
=
[]
this
.
selectIds
=
[]
}
}
}
</
script
>
pages/soil-sample-manage/sample-receive/entrust-sample-manage/AlreadyIssuedHis.vue
View file @
f87c6d1b
...
...
@@ -158,6 +158,7 @@ export default {
})
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilEntrust
.
pageSendHis
(
this
.
formObj
)
console
.
log
(
this
.
formObj
)
if
(
result
)
{
...
...
pages/soil-sample-manage/sample-receive/entrust-sample-manage/SoilSampleItemManage.vue
View file @
f87c6d1b
...
...
@@ -11,11 +11,8 @@
<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
label=
"试验名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
...
...
pages/soil-sample-manage/sample-receive/entrust-sample-manage/WaitReceiveHis.vue
View file @
f87c6d1b
...
...
@@ -155,6 +155,7 @@ export default {
})
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilEntrust
.
pageReceiveHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
...
...
pages/soil-sample-manage/sample-take/ItemManage.vue
View file @
f87c6d1b
...
...
@@ -9,29 +9,26 @@
<Col
span=
"24"
>
<Form
v-show=
"searchOpen"
:label-width=
"110"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"样品编号:"
class=
"search-item"
>
<Input
v-model=
"formObj.num"
placeholder=
"请输入样品编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
<Form-item
label=
"样品名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.sampleName"
placeholder=
"请输入样品名称"
clearable
@
on-enter=
"_formSearch"
/>
<Form-item
label=
"试验名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:show-search-btn=
"true"
class=
"contHide"
@
on-result-change=
"_btnClick
"
>
<btn-list
:msg=
"btn"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide
"
>
</btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:table-height=
"tableHeight"
:get-page=
"getPage"
@
on-result-change=
"_tableResultChange"
is-group
select-data
@
on-result-change=
"_tableResultChange"
>
select-data
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
...
...
@@ -54,9 +51,9 @@
<div
v-else-if=
"item.key==='qualified'"
>
{{
scope
.
row
.
qualified
?
scope
.
row
.
qualified
.
display
:
''
}}
</div>
<!--科室 start-->
<div
v-else-if=
"item.key==='groupName'"
>
<el-select
v-model=
"scope.row.groupName"
transfer
size=
"small
"
@
change=
"_groupChange"
@
click
.
native
.
stop=
"_handleRow(scope)
"
>
<el-select
v-model=
"scope.row.groupName"
@
change=
"_groupChange"
@
click
.
native
.
stop=
"_handleRow(scope)
"
transfer
size=
"small
"
>
<el-option
v-for=
"item in groupData"
:key=
"item.name"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
...
...
@@ -65,10 +62,10 @@
<!--检测依据简称 start-->
<div
v-else-if=
"item.key==='testBasisSm'"
>
<el-select
v-model=
"scope.row.testBasisSm"
@
change=
"_saveTestBasisSm(scope)"
placeholder=
"请选择检测依据简称"
size=
"small"
style=
"width:100%"
@
change=
"_saveTestBasisSm(scope)"
>
style=
"width:100%"
>
<el-option
v-for=
"item in testBasisSmList"
:key=
"item"
...
...
pages/soil-test-manage/test-data-audit/AuditIndex.vue
View file @
f87c6d1b
...
...
@@ -2,14 +2,6 @@
<div>
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<!--
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
-->
<!--
<el-tab-pane
label=
"数据审核"
name=
"check"
>
-->
<!--
<SampleBackupsManage
ref=
"checkTabs"
></SampleBackupsManage>
-->
<!--
</el-tab-pane>
-->
<!--
<el-tab-pane
label=
"历史任务"
name=
"checkHis"
>
-->
<!--
<SampleBackupsQuery
ref=
"checkHisTabs"
></SampleBackupsQuery>
-->
<!--
</el-tab-pane>
-->
<!--
</el-tabs>
-->
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"数据审核"
name=
"check"
></el-tab-pane>
<el-tab-pane
label=
"历史任务"
name=
"checkHis"
></el-tab-pane>
...
...
pages/soil-test-manage/test-data-audit/DataAuditHis.vue
View file @
f87c6d1b
...
...
@@ -65,10 +65,6 @@
<!-- eslint-disable-next-line vue/require-component-is -->
<component
ref=
"refModal"
:is=
"currentComponent"
@
on-result-change=
"_componentResult"
></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div>
</template>
<
script
>
...
...
pages/soil-test-manage/test-data-audit/SoilSampleItemManageHis.vue
View file @
f87c6d1b
...
...
@@ -11,11 +11,8 @@
<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
label=
"试验名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
...
...
pages/soil-test-manage/test-data-audit/SoilSampleManageHis.vue
View file @
f87c6d1b
...
...
@@ -171,15 +171,6 @@ export default {
}
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'
:
...
...
@@ -368,6 +359,7 @@ export default {
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
pageExpAuditSampleHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
...
...
pages/soil-test-manage/test-data-check/DataCheckHis.vue
View file @
f87c6d1b
...
...
@@ -65,10 +65,6 @@
<!-- eslint-disable-next-line vue/require-component-is -->
<component
ref=
"refModal"
:is=
"currentComponent"
@
on-result-change=
"_componentResult"
></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div>
</template>
<
script
>
...
...
@@ -138,11 +134,7 @@ export default {
}
}
},
mounted
()
{
// this._page()
// 样品接收是否选择人员
// this.acceptSelectUserValue = localStorage.getItem('acceptSelectUserValue')
},
mounted
()
{},
methods
:
{
_userResult
(
data
,
msg
)
{
const
sendData
=
{
...
...
@@ -387,7 +379,7 @@ export default {
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodContract
.
page
this
.
_page
()
break
case
'selectIds'
:
this
.
selectIds
=
data
...
...
pages/soil-test-manage/test-data-check/SoilSampleItemManageHis.vue
View file @
f87c6d1b
...
...
@@ -11,11 +11,8 @@
<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
label=
"试验名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
...
...
pages/soil-test-manage/test-data-check/SoilSampleManageHis.vue
View file @
f87c6d1b
...
...
@@ -171,15 +171,6 @@ export default {
}
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'
:
...
...
@@ -368,6 +359,7 @@ export default {
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
pageExpCheckSampleHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
...
...
pages/soil-test-manage/test-data-consult/DataConsult.vue
View file @
f87c6d1b
...
...
@@ -65,10 +65,6 @@
<!-- eslint-disable-next-line vue/require-component-is -->
<component
ref=
"refModal"
:is=
"currentComponent"
@
on-result-change=
"_componentResult"
></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div>
</template>
<
script
>
...
...
pages/soil-test-manage/test-data-consult/SoilSampleItemManageHis.vue
View file @
f87c6d1b
...
...
@@ -11,11 +11,8 @@
<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
label=
"试验名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
...
...
pages/soil-test-manage/test-data-consult/SoilSampleManageHis.vue
View file @
f87c6d1b
...
...
@@ -95,7 +95,6 @@ export default {
id
:
''
,
name
:
'管理检测项目'
}
// { type: 'md-trash', id: '', name: '删除' }
],
entrustId
:
''
,
// 委托id
showModal
:
false
,
...
...
@@ -171,15 +170,6 @@ export default {
}
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'
:
...
...
@@ -368,6 +358,7 @@ export default {
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
pageExpAuditSampleHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
...
...
pages/soil-test-manage/test-input/SelectOriTempRecord.vue
View file @
f87c6d1b
...
...
@@ -24,7 +24,7 @@
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
<PTVXETable
Height
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:isRadio=
"true"
hide-checkbox
>
<vxe-table-column
:field=
"item.key"
...
...
@@ -40,7 +40,7 @@
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</PTVXETable
Height
>
</Col>
</Row>
</template>
...
...
@@ -92,7 +92,7 @@ export default {
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
''
,
3
8
0
)
return
this
.
$tableHeight
(
''
,
3
0
0
)
}
},
created
()
{
...
...
@@ -115,7 +115,7 @@ export default {
},
// 左侧数据请求
_classTree
()
{
const
height
=
this
.
$tableHeight
(
''
,
85
)
const
height
=
this
.
$tableHeight
(
''
,
300
)
this
.
$refs
.
classTree
.
_Ztree
(
height
,
0
)
},
// 左边树的点击
...
...
@@ -206,11 +206,24 @@ export default {
}
else
{
recordUrl
=
Global
.
recordURL
}
let
baseUrl
=
Global
.
baseURL
baseUrl
+=
'/soil/v1/sample/original_record_data_bind?entrustId='
+
this
.
entrustId
+
'&expIds='
+
this
.
itemIds
+
'&modelId='
+
this
.
selectData
[
0
].
id
const
url
=
recordUrl
+
'/print/v1/eln/template_meter_'
+
this
.
selectData
[
0
].
id
recordUrl
+
'/print/v1/eln/template_meter_'
+
this
.
selectData
[
0
].
id
+
'?bindUri='
+
encodeURIComponent
(
baseUrl
)
const
params
=
{
ids
:
this
.
itemIds
.
join
(
','
),
client
:
this
.
clientList
[
0
]
client
:
this
.
clientList
[
0
],
bindUri
:
encodeURIComponent
(
baseUrl
)
}
this
.
$refs
.
iframeModal
.
_createIframe
(
url
,
params
)
console
.
log
(
'原始记录'
,
url
,
params
)
...
...
pages/soil-test-manage/test-input/SoilSampleItemManageHis.vue
View file @
f87c6d1b
...
...
@@ -11,11 +11,8 @@
<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
label=
"试验名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入试验名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
...
...
pages/soil-test-manage/test-input/SoilSampleManageHis.vue
View file @
f87c6d1b
...
...
@@ -171,15 +171,6 @@ export default {
}
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'
:
...
...
@@ -368,6 +359,7 @@ export default {
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
pageExpTestSampleHis
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
...
...
pages/soil-test-manage/test-input/TestInputHis.vue
View file @
f87c6d1b
...
...
@@ -65,10 +65,6 @@
<!-- eslint-disable-next-line vue/require-component-is -->
<component
ref=
"refModal"
:is=
"currentComponent"
@
on-result-change=
"_componentResult"
></component>
</keep-alive>
<!-- <UserInfo ref="userModal" @on-result-change="_userResult"></UserInfo>-->
<!-- <Operation ref="operation"></Operation>-->
<!-- <FileManage ref="FileManage"></FileManage>-->
<!-- <SoilSampleManageHis ref="sampleManageModal"></SoilSampleManageHis>-->
</div>
</template>
<
script
>
...
...
pages/soil-test-manage/test-input/sample-tabs/SampleRightList.vue
View file @
f87c6d1b
...
...
@@ -371,7 +371,9 @@ export default {
this
.
$message
.
warning
(
'请至少选择一条数据'
)
}
else
{
const
errorInfo
=
[]
const
clientInfo
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
clientInfo
.
push
(
this
.
selectData
[
i
].
client
)
console
.
log
(
this
.
selectData
[
i
].
recorded
)
if
(
this
.
selectData
[
i
].
recorded
===
'是'
)
{
errorInfo
.
push
(
this
.
selectData
[
i
].
index
+
1
)
...
...
@@ -381,7 +383,11 @@ export default {
this
.
$Message
.
warning
(
'所选数据中有已填写原始记录的'
)
}
else
{
console
.
log
(
'打开填写原始记录界面'
)
this
.
$refs
.
recordModal
.
_open
(
this
.
selectIds
,
this
.
entrustId
)
this
.
$refs
.
recordModal
.
_open
(
this
.
selectIds
,
this
.
entrustId
,
clientInfo
)
}
}
},
...
...
plugins/common.js
View file @
f87c6d1b
...
...
@@ -977,7 +977,7 @@ Vue.prototype.$optColWidth = function(list) {
Vue
.
prototype
.
$defRow
=
500
Vue
.
prototype
.
$setOptimization
=
function
(
msg
)
{
// 默认 数据超过200条,启用虚拟加载,每次加载50条
let
result
=
{
gt
:
200
,
oSize
:
20
,
rSize
:
5
0
}
let
result
=
{
gt
:
200
,
oSize
:
10
0
}
switch
(
msg
)
{
case
'modal-normal'
:
// 弹出框正常情况下-- 数据超过25条启用虚拟加载
...
...
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