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
24f05cf4
Commit
24f05cf4
authored
Dec 18, 2020
by
zhangmengqi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
32ed99c6
c3387262
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
3236 additions
and
303 deletions
+3236
-303
soil-aptitude.js
api/soil/soil-aptitude.js
+42
-1
soil-report.js
api/soil/soil-report.js
+10
-1
soil-sample.js
api/soil/soil-sample.js
+23
-1
soil-test.js
api/soil/soil-test.js
+5
-1
PTVXETable.vue
components/table/PTVXETable.vue
+5
-0
.env.zhyf
env/.env.zhyf
+7
-0
EntrustRegister.vue
pages/meter-entrust/entrust-register/EntrustRegister.vue
+1
-0
EntrustRegisterEdit.vue
pages/meter-entrust/entrust-register/EntrustRegisterEdit.vue
+3
-0
ConfigTemplate.vue
pages/soil-record-template-manage/ConfigTemplate.vue
+169
-0
ConfigTemplateEdit.vue
pages/soil-record-template-manage/ConfigTemplateEdit.vue
+271
-0
SoilRecordEdit.vue
pages/soil-record-template-manage/SoilRecordEdit.vue
+137
-18
SoilRecordTemplate.vue
pages/soil-record-template-manage/SoilRecordTemplate.vue
+18
-6
SoilRecordTemplateEdit.vue
pages/soil-record-template-manage/SoilRecordTemplateEdit.vue
+19
-25
historyTask.vue
pages/soil-report-manage/report-audit/tabs/historyTask.vue
+1
-1
OriginalRecordEdit.vue
pages/soil-report-manage/report-make/OriginalRecordEdit.vue
+4
-4
OriginalRecordView.vue
pages/soil-report-manage/report-make/OriginalRecordView.vue
+45
-8
SampleByMakeModal.vue
pages/soil-report-manage/report-make/SampleByMakeModal.vue
+1
-1
ReportInfoMake.vue
pages/soil-report-manage/report-make/tabs/ReportInfoMake.vue
+38
-147
ConfigTemplate.vue
...eport-manage/soil-item-report-template/ConfigTemplate.vue
+162
-0
ConfigTemplateEdit.vue
...t-manage/soil-item-report-template/ConfigTemplateEdit.vue
+335
-0
SoilItemReportTemplate.vue
...nage/soil-item-report-template/SoilItemReportTemplate.vue
+264
-0
SoilReportEdit.vue
...eport-manage/soil-item-report-template/SoilReportEdit.vue
+278
-0
SoilReportTemplateEdit.vue
...nage/soil-item-report-template/SoilReportTemplateEdit.vue
+177
-0
OriginalRecordEdit.vue
...le-manage/sample-preparation-check/OriginalRecordEdit.vue
+2
-2
OriginalRecordEdit.vue
...l-sample-manage/sample-preparation/OriginalRecordEdit.vue
+2
-2
SoilSampleManageHis.vue
...-sample-manage/sample-preparation/SoilSampleManageHis.vue
+0
-3
RecordRightList.vue
...preparation/sample-preparation-record/RecordRightList.vue
+80
-10
IndexManage.vue
pages/soil-test-manage/test-input/IndexManage.vue
+4
-4
ItemReportView.vue
pages/soil-test-manage/test-input/ItemReportView.vue
+271
-0
OriginalRecordEdit.vue
pages/soil-test-manage/test-input/OriginalRecordEdit.vue
+2
-2
OriginalRecordView.vue
pages/soil-test-manage/test-input/OriginalRecordView.vue
+38
-6
SampleManage.vue
pages/soil-test-manage/test-input/SampleManage.vue
+8
-1
CreateItemReport.vue
...oil-test-manage/test-input/item-tabs/CreateItemReport.vue
+159
-0
CreateReport.vue
pages/soil-test-manage/test-input/item-tabs/CreateReport.vue
+159
-0
ItemLeftList.vue
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
+101
-22
ItemReportTemplate.vue
...l-test-manage/test-input/item-tabs/ItemReportTemplate.vue
+107
-0
ItemRightList.vue
...s/soil-test-manage/test-input/item-tabs/ItemRightList.vue
+94
-18
ItemTabs.vue
pages/soil-test-manage/test-input/item-tabs/ItemTabs.vue
+0
-1
ReportTemplate.vue
.../soil-test-manage/test-input/item-tabs/ReportTemplate.vue
+107
-0
SampleRightList.vue
...il-test-manage/test-input/sample-tabs/SampleRightList.vue
+81
-18
soil-routes.js
router/soil-routes.js
+6
-0
No files found.
api/soil/soil-aptitude.js
View file @
24f05cf4
...
...
@@ -50,5 +50,46 @@ export default {
.
put
(
'soil/v1/original_template/'
+
data
.
id
,
data
.
formObj
)
.
then
(
res
=>
res
),
originalTemplateGetById
:
data
=>
http
.
get
(
'soil/v1/original_template/'
+
data
).
then
(
res
=>
res
)
http
.
get
(
'soil/v1/original_template/'
+
data
).
then
(
res
=>
res
),
// 试验项目分页列表
expReportTemplatePage
:
data
=>
http
.
post
(
'soil/v1/exp_report_template/page'
,
data
).
then
(
res
=>
res
),
// 试验项目根据id查询信息
expReportTemplateGetById
:
data
=>
http
.
get
(
'soil/v1/exp_report_template/'
+
data
).
then
(
res
=>
res
),
// 试验项目模板编辑
expReportTemplateEdit
:
data
=>
http
.
put
(
'soil/v1/exp_report_template/'
+
data
.
id
,
data
.
formObj
)
.
then
(
res
=>
res
),
expReportTemplateDelete
:
data
=>
http
.
delete
(
'soil/v1/exp_report_template/?ids='
+
data
).
then
(
res
=>
res
),
pageTemplateConfig
:
data
=>
http
.
post
(
'soil/v1/exp_report_template_config/page'
,
data
).
then
(
res
=>
res
),
saveReportTemplateConfig
:
data
=>
http
.
post
(
'soil/v1/exp_report_template_config/'
,
data
).
then
(
res
=>
res
),
expReportTemplateConfigEdit
:
data
=>
http
.
put
(
'soil/v1/exp_report_template_config/'
+
data
.
id
,
data
.
obj
)
.
then
(
res
=>
res
),
deleteReportTemplateConfig
:
data
=>
http
.
delete
(
'soil/v1/exp_report_template_config/?ids='
+
data
)
.
then
(
res
=>
res
),
originalTemplateConfig
:
data
=>
http
.
post
(
'soil/v1/original_template_config/page'
,
data
).
then
(
res
=>
res
),
saveOriginalTemplateConfig
:
data
=>
http
.
post
(
'soil/v1/original_template_config/'
,
data
).
then
(
res
=>
res
),
getOriginalTemplateConfig
:
data
=>
http
.
get
(
'soil/v1/original_template_config/'
+
data
).
then
(
res
=>
res
),
editOriginalTemplateConfig
:
data
=>
http
.
put
(
'soil/v1/original_template_config/'
+
data
.
id
,
data
.
obj
)
.
then
(
res
=>
res
),
deleteOriginalTemplateConfig
:
data
=>
http
.
delete
(
'soil/v1/original_template_config/?ids='
+
data
)
.
then
(
res
=>
res
),
expReportTemplateConfig
:
data
=>
http
.
get
(
'soil/v1/exp_report_template_config/'
+
data
).
then
(
res
=>
res
)
}
api/soil/soil-report.js
View file @
24f05cf4
...
...
@@ -14,5 +14,14 @@ export default {
http
.
post
(
'soil/v1/entrust/page_report_check_his'
,
data
).
then
(
res
=>
res
),
// 报告签发 历史任务分页列表
pageReportIssueHis
:
data
=>
http
.
post
(
'soil/v1/entrust/page_report_issue_his'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/entrust/page_report_issue_his'
,
data
).
then
(
res
=>
res
),
getExcelOriginalRecord
:
data
=>
http
.
post
(
'soil/v1/original_record/get_excel_original_record?expId='
+
data
)
.
then
(
res
=>
res
),
reportPage
:
data
=>
http
.
post
(
'soil/v1/report/page'
,
data
).
then
(
res
=>
res
),
originalRecordGetById
:
data
=>
http
.
get
(
'soil/v1/original_record/'
+
data
).
then
(
res
=>
res
),
expReportGetById
:
data
=>
http
.
get
(
'soil/v1/exp_report/'
+
data
).
then
(
res
=>
res
)
}
api/soil/soil-sample.js
View file @
24f05cf4
...
...
@@ -200,5 +200,27 @@ export default {
deleteBox
:
data
=>
http
.
delete
(
'soil/v1/box/?ids='
+
data
).
then
(
res
=>
res
),
editBox
:
data
=>
http
.
put
(
'soil/v1/box/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
getByIdBox
:
data
=>
http
.
get
(
'soil/v1/box/'
+
data
).
then
(
res
=>
res
)
getByIdBox
:
data
=>
http
.
get
(
'soil/v1/box/'
+
data
).
then
(
res
=>
res
),
saveExcelOriginalRecord
:
data
=>
http
.
post
(
'soil/v1/experiment/save_excel_original_record?ids='
+
data
.
ids
+
'&templateId='
+
data
.
id
)
.
then
(
res
=>
res
),
saveExcelExpReport
:
data
=>
http
.
post
(
'soil/v1/experiment/save_excel_exp_report?ids='
+
data
.
ids
+
'&templateId='
+
data
.
templateId
+
'&expName='
+
data
.
expName
+
'&entrustId='
+
data
.
entrustId
)
.
then
(
res
=>
res
)
}
api/soil/soil-test.js
View file @
24f05cf4
...
...
@@ -159,5 +159,9 @@ export default {
pageExpAuditHis
:
data
=>
http
.
post
(
'soil/v1/entrust/page_exp_audit_his'
,
data
).
then
(
res
=>
res
),
deleteRecord
:
data
=>
http
.
delete
(
'soil/v1/original_record/?ids='
+
data
).
then
(
res
=>
res
)
http
.
delete
(
'soil/v1/original_record/?ids='
+
data
).
then
(
res
=>
res
),
expReportPage
:
data
=>
http
.
post
(
'soil/v1/exp_report/page'
,
data
).
then
(
res
=>
res
),
deleteReport
:
data
=>
http
.
delete
(
'soil/v1/exp_report/?ids='
+
data
).
then
(
res
=>
res
)
}
components/table/PTVXETable.vue
View file @
24f05cf4
...
...
@@ -437,6 +437,11 @@ export default {
_radioChange
({
row
})
{
this
.
$emit
(
'on-result-change'
,
'singleSelect'
,
row
)
},
_radioChangeItem
(
row
)
{
this
.
$refs
.
xTable
.
setRadioRow
(
row
)
this
.
$refs
.
xTable
.
setCurrentRow
(
row
)
this
.
$emit
(
'on-result-change'
,
'singleSelect'
,
row
)
},
// 关闭loading
_hideLoading
()
{
this
.
loading
=
false
...
...
env/.env.zhyf
0 → 100644
View file @
24f05cf4
// 中海油服 私有部署 请求地址
WEB_URL=http://soil.lims.com
BASE_URL=http://api.lims.com
SSO_URL=http://sso.lims.com
STATIC_URL=http://static.lims.com
RECORD_URL=http://record.patzn.com
NC_URL=http://123.133.38.68:8088
pages/meter-entrust/entrust-register/EntrustRegister.vue
View file @
24f05cf4
...
...
@@ -143,6 +143,7 @@ export default {
{
title
:
'委托商'
,
key
:
'client'
,
width
:
230
},
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
120
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
120
,
date
:
true
},
{
title
:
'项目名称'
,
key
:
'projectName'
,
width
:
120
},
{
title
:
'钻孔位置'
,
key
:
'boreholeLocation'
,
width
:
120
},
{
title
:
'水深(米)'
,
key
:
'waterDepth'
,
width
:
120
},
{
title
:
'钻孔名称'
,
key
:
'boreholeName'
,
width
:
120
},
...
...
pages/meter-entrust/entrust-register/EntrustRegisterEdit.vue
View file @
24f05cf4
...
...
@@ -13,6 +13,9 @@
<Date-picker
v-model=
"formObj.entrustDate"
@
on-change=
"_ctimeChange"
type=
"date"
split-panels
style=
"width:100%;"
placeholder=
"请选择委托日期"
name=
"entrustDate"
></Date-picker>
</Form-item>
<Form-item
label=
"项目名称"
prop=
"projectName"
class=
"width-48"
>
<Input
v-model=
"formObj.projectName"
name=
"projectName"
placeholder=
"请输入项目名称"
/>
</Form-item>
<Form-item
label=
"钻孔名称"
prop=
"boreholeName"
class=
"width-48"
>
<Input
v-model=
"formObj.boreholeName"
name=
"boreholeName"
placeholder=
"请输入名称"
/>
</Form-item>
...
...
pages/soil-record-template-manage/ConfigTemplate.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"1000"
class=
"modal-footer-none"
>
<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.attributeName"
@
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-if=
"item.key==='itemed'"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</div>
</Modal>
<ConfigTemplateEdit
ref=
"indexEdit"
@
on-result-change=
"_page"
></ConfigTemplateEdit>
</div>
</template>
<
script
>
import
{
soilAptitude
}
from
'../../api'
import
ConfigTemplateEdit
from
'./ConfigTemplateEdit'
export
default
{
components
:
{
ConfigTemplateEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加配置'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
pageColumns
:
[
{
title
:
'属性名称'
,
key
:
'attributeName'
},
{
title
:
'属性'
,
key
:
'dataAttribute'
,
width
:
120
},
{
title
:
'公式配置'
,
key
:
'formula'
,
width
:
120
},
{
title
:
'是否是项目指标'
,
key
:
'itemed'
,
width
:
120
},
{
title
:
'列位置'
,
key
:
'columnPlace'
,
width
:
120
},
{
title
:
'合并开始列'
,
key
:
'mergeBegin'
,
width
:
120
},
{
title
:
'合并结束列'
,
key
:
'mergeEnd'
,
width
:
120
},
{
title
:
'合并行数'
,
key
:
'mergeRowNum'
,
width
:
120
},
{
title
:
'单位'
,
key
:
'unit'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
}],
selectIds
:
[],
formObj
:
{
attributeName
:
undefined
,
templateId
:
undefined
},
// 资质信息
aptitudeItemInfo
:
{}
}
},
methods
:
{
_open
(
data
)
{
console
.
log
(
data
)
this
.
aptitudeItemInfo
=
data
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
templateId
=
data
.
id
this
.
id
=
data
.
id
this
.
modalTitle
=
data
.
name
+
' 指标管理'
this
.
showModal
=
true
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
originalTemplateConfig
(
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
soilAptitude
.
getOriginalTemplateConfig
(
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
.
deleteOriginalTemplateConfig
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-record-template-manage/ConfigTemplateEdit.vue
0 → 100644
View file @
24f05cf4
<
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=
"attributeName"
class=
"width-48"
>
<Input
v-model=
"formObj.attributeName"
name=
"attributeName"
placeholder=
"请输入属性名称"
/>
</Form-item>
<Form-item
label=
"属性"
prop=
"dataAttribute"
class=
"width-48"
>
<Input
v-model=
"formObj.dataAttribute"
name=
"dataAttribute"
placeholder=
"请输入属性"
/>
</Form-item>
<Form-item
label=
"公式配置"
prop=
"formula"
class=
"width-48"
>
<Input
v-model=
"formObj.formula"
name=
"formula"
placeholder=
"请输入公式配置"
/>
</Form-item>
<Form-item
label=
"列位置"
prop=
"columnPlace"
class=
"width-48"
>
<Input
v-model=
"formObj.columnPlace"
@
keydown
.
native=
"channelInputLimit"
name=
"columnPlace"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入列位置"
></Input>
</Form-item>
<Form-item
label=
"合并开始列"
prop=
"mergeBegin"
class=
"width-48"
>
<Input
v-model=
"formObj.mergeBegin"
@
keydown
.
native=
"channelInputLimit"
name=
"mergeBegin"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入合并开始列"
/>
</Form-item>
<Form-item
label=
"合并结束列"
prop=
"mergeEnd"
class=
"width-48"
>
<Input
v-model=
"formObj.mergeEnd"
@
keydown
.
native=
"channelInputLimit"
name=
"mergeEnd"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入合并结束列"
/>
</Form-item>
<Form-item
label=
"合并行数"
prop=
"mergeRowNum"
class=
"width-48"
>
<Input
v-model=
"formObj.mergeRowNum"
@
keydown
.
native=
"channelInputLimit"
name=
"mergeRowNum"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入合并行数"
/>
</Form-item>
<Form-item
label=
"是否是项目指标"
prop=
"itemed"
class=
"width-48"
>
<el-select
v-model=
"formObj.itemed"
@
change=
"_optionChange"
placeholder=
"请选择"
>
<el-option
v-for=
"(item,index) in options"
:key=
"index"
:label=
"item.value"
:value=
"index"
/>
</el-select>
</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
{
soilAptitude
}
from
'../../api'
export
default
{
components
:
{},
data
()
{
return
{
activeName
:
''
,
hideUserSel
:
true
,
id
:
''
,
modalTitle
:
''
,
templateId
:
''
,
formObj
:
{
attributeName
:
undefined
,
formula
:
undefined
,
columnPlace
:
''
,
unit
:
undefined
,
status
:
undefined
,
mainType
:
undefined
,
smallType
:
undefined
,
testValue
:
undefined
,
mergeBegin
:
''
,
mergeRowNum
:
''
,
mergeEnd
:
''
,
itemed
:
undefined
},
options
:
[
{
label
:
'否'
,
value
:
'否'
},
{
label
:
'是'
,
value
:
'是'
}
],
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
:
{
channelInputLimit
(
e
)
{
const
key
=
e
.
key
// 不允许输入'e'和'.'
if
(
key
===
'e'
||
key
===
'.'
)
{
e
.
returnValue
=
false
return
false
}
return
true
},
inputChange
(
data
)
{
console
.
log
(
'data>>>'
,
data
)
console
.
log
(
'formObj>>>'
,
this
.
formObj
)
},
_selectJudgeType
(
data
)
{
this
.
formObj
.
microbed
=
data
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_open
(
id
,
formObj
)
{
this
.
formId
=
'edit-form-template-config'
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
id
=
''
this
.
templateId
=
id
this
.
modalTitle
=
'添加模板配置'
console
.
log
(
'formObj>>>'
,
this
.
formObj
)
}
else
{
this
.
hideUserSel
=
true
this
.
id
=
formObj
.
id
this
.
formObj
=
formObj
this
.
modalTitle
=
'编辑模板配置'
console
.
log
(
'formObj>>>'
,
this
.
formObj
)
}
this
.
showModal
=
true
},
// 获取表数据
_resultChange
(
msg
)
{
this
.
showModal
=
false
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_optionChange
(
data
)
{
this
.
formObj
.
itemed
=
data
console
.
log
(
this
.
formObj
.
itemed
)
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
'edit-form-template-config'
)
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
data
.
templateId
=
this
.
templateId
data
.
itemed
=
this
.
formObj
.
itemed
// 添加
this
.
_save
(
data
)
}
else
{
// 编辑
data
.
itemed
=
this
.
formObj
.
itemed
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
soilAptitude
.
saveOriginalTemplateConfig
(
data
)
console
.
log
(
result
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
editOriginalTemplateConfig
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'编辑成功!'
)
}
},
_cancel
()
{
this
.
showModal
=
false
this
.
_hideLoading
()
},
_visibleChange
(
data
)
{
if
(
!
data
&&
this
.
$showBtn
(
'food-aptitude-item-step-edit'
))
{
this
.
$emit
(
'on-result-change'
)
this
.
$refs
.
testStepByAptitude
.
_clear
()
}
}
}
}
</
script
>
pages/soil-record-template-manage/SoilRecordEdit.vue
View file @
24f05cf4
...
...
@@ -9,8 +9,8 @@
</Spin>
</div>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"
80
"
>
<Form-item
label=
"类别"
prop=
"classType"
>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"
95"
inline
class=
"inputBox
"
>
<Form-item
label=
"类别"
prop=
"classType"
style=
"width: 100%"
>
<!--
<Input
v-model=
"formObj.classType"
@
on-keyup=
"_onKeyUp"
name=
"classType"
placeholder=
"请选择类别"
icon=
"plus-circled"
--
>
<!-- >
</Input>
-->
<el-select
v-model=
"formObj.classType"
placeholder=
"请选择类别"
size=
"small"
clearable
>
...
...
@@ -18,11 +18,41 @@
:key=
"index"
></el-option>
</el-select>
</Form-item>
<Form-item
label=
"
别名"
prop=
"alias
"
>
<Input
v-model=
"formObj.alias"
name=
"alias"
placeholder=
"请输入
别名
"
></Input>
<Form-item
label=
"
原始记录名称"
prop=
"alias"
style=
"width: 100%
"
>
<Input
v-model=
"formObj.alias"
name=
"alias"
placeholder=
"请输入
原始记录名称
"
></Input>
</Form-item>
<Form-item
label=
"项目代号"
prop=
"remark"
>
<Input
v-model=
"formObj.remark"
name=
"remark"
placeholder=
"请输入项目代号"
></Input>
<Form-item
label=
"备注"
prop=
"remark"
style=
"width: 100%"
>
<Input
v-model=
"formObj.remark"
name=
"remark"
placeholder=
"请输入备注"
></Input>
</Form-item>
<Form-item
label=
"样品开始行"
prop=
"sampleBeginRow"
style=
"width: 100%"
>
<el-input
v-model=
"formObj.sampleBeginRow"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleBeginRow"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入样品开始行"
/>
</Form-item>
<Form-item
label=
"样品合并数"
prop=
"sampleMergerNum"
style=
"width: 100%"
>
<el-input
v-model=
"formObj.sampleMergerNum"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleMergerNum"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入样品合并数"
/>
</Form-item>
<Form-item
label=
"模板样品数"
prop=
"templateSampleNum"
style=
"width: 100%"
>
<el-input
v-model=
"formObj.templateSampleNum"
@
keydown
.
native=
"channelInputLimit"
name=
"templateSampleNum"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入模板样品数"
/>
</Form-item>
</Form>
</div>
...
...
@@ -62,19 +92,82 @@ const defVal = {
alias
:
''
,
classType
:
''
,
remark
:
''
,
sampleBeginRow
:
''
,
sampleBeginCol
:
''
,
sampleMergerNum
:
''
,
templateSampleNum
:
''
,
classifyId
:
0
}
export
default
{
// components: { LmsTemplateClassifyZTree },
data
()
{
const
validatesampleBeginRow
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleBeginRow
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
const
validatesampleMergerNum
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleMergerNum
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
const
validatetemplateSampleNum
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
templateSampleNum
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
const
validatesampleBeginCol
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleBeginCol
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
return
{
modalTitle
:
'
添加
'
,
modalTitle
:
'
编辑
'
,
formObj
:
defVal
,
ruleValidate
:
{
alias
:
[{
required
:
true
,
message
:
'别名不能为空'
,
trigger
:
'blur'
}],
remark
:
[
{
required
:
true
,
message
:
'项目代号不能为空'
,
trigger
:
'blur'
}
alias
:
[
{
required
:
true
,
message
:
'模板名称不能为空'
,
trigger
:
'blur'
}
],
sampleBeginRow
:
[
{
required
:
true
,
validator
:
validatesampleBeginRow
,
message
:
'样品开始行不能为空'
,
trigger
:
'blur'
}
],
sampleBeginCol
:
[
{
required
:
true
,
validator
:
validatesampleBeginCol
,
message
:
'样品开始列不能为空'
,
trigger
:
'blur'
}
],
sampleMergerNum
:
[
{
required
:
true
,
validator
:
validatesampleMergerNum
,
message
:
'样品合并数不能为空'
,
trigger
:
'blur'
}
],
templateSampleNum
:
[
{
required
:
true
,
validator
:
validatetemplateSampleNum
,
message
:
'模板样品数不能为空'
,
trigger
:
'blur'
}
],
classType
:
[
{
required
:
true
,
message
:
'类别不能为空'
,
trigger
:
'blur'
}
...
...
@@ -82,10 +175,10 @@ export default {
},
typeList
:
[
{
value
:
'
检定证书
'
value
:
'
力学
'
},
{
value
:
'
校准证书
'
value
:
'
物性
'
}
],
id
:
''
,
...
...
@@ -102,11 +195,7 @@ export default {
},
methods
:
{
_onKeyUp
()
{
if
(
this
.
formObj
.
alias
===
''
||
this
.
formObj
.
classType
===
''
||
this
.
formObj
.
remark
===
''
)
{
if
(
this
.
formObj
.
alias
===
''
||
this
.
formObj
.
classType
===
''
)
{
this
.
isDisable
=
true
}
else
{
this
.
isDisable
=
false
...
...
@@ -120,13 +209,32 @@ export default {
this
.
formObj
.
remark
}
},
channelInputLimit
(
e
)
{
const
key
=
e
.
key
// 不允许输入'e'和'.'
if
(
key
===
'e'
||
key
===
'.'
)
{
e
.
returnValue
=
false
return
false
}
return
true
},
_selectZtree
()
{
// this.$refs.ztreeModal._openZtree()
},
_cancel
()
{
this
.
showEditModal
=
false
},
_ok
:
async
function
()
{
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
console
.
log
(
'valid'
,
valid
)
if
(
valid
)
{
this
.
_editOk
()
}
else
{
this
.
$Message
.
error
(
'请输入必填值'
)
}
})
},
_editOk
:
async
function
()
{
const
result
=
await
soilAptitude
.
originalTemplateEdit
({
id
:
this
.
id
,
formObj
:
this
.
formObj
...
...
@@ -145,6 +253,10 @@ export default {
this
.
formObj
.
alias
=
data
.
alias
this
.
formObj
.
remark
=
data
.
remark
this
.
formObj
.
classType
=
data
.
classType
this
.
formObj
.
sampleBeginRow
=
data
.
sampleBeginRow
this
.
formObj
.
sampleBeginCol
=
data
.
sampleBeginCol
this
.
formObj
.
sampleMergerNum
=
data
.
sampleMergerNum
this
.
formObj
.
templateSampleNum
=
data
.
templateSampleNum
this
.
modalTitle
=
'编辑模板'
console
.
log
(
this
.
id
)
},
...
...
@@ -196,4 +308,11 @@ export default {
clear
:
both
;
display
:
block
;
}
.inputBox
>>>
input
::-webkit-outer-spin-button
,
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
!important
;
}
.inputBox
>>>
input
[
type
=
'number'
]
{
-moz-appearance
:
textfield
!important
;
}
</
style
>
pages/soil-record-template-manage/SoilRecordTemplate.vue
View file @
24f05cf4
...
...
@@ -46,6 +46,7 @@
<!-- 添加、编辑 -->
<SoilRecordTemplateEdit
ref=
"editModal"
@
on-result-change=
"_search"
></SoilRecordTemplateEdit>
<SoilRecordEdit
ref=
"reportEdit"
@
on-result-change=
"_search"
></SoilRecordEdit>
<ConfigTemplate
ref=
"configTemplateModal"
@
on-result-change=
"_page"
></ConfigTemplate>
</div>
</template>
<
script
>
...
...
@@ -53,14 +54,17 @@ import global from '../../api/config'
import
{
soilAptitude
}
from
'../../api'
import
SoilRecordTemplateEdit
from
'./SoilRecordTemplateEdit'
import
SoilRecordEdit
from
'./SoilRecordEdit'
import
ConfigTemplate
from
'./ConfigTemplate'
export
default
{
components
:
{
SoilRecordTemplateEdit
,
SoilRecordEdit
},
components
:
{
SoilRecordTemplateEdit
,
SoilRecordEdit
,
ConfigTemplate
},
data
()
{
return
{
pageColumns
:
[
{
title
:
'原始记录模板名称'
,
key
:
'name'
},
{
title
:
'模板类别'
,
key
:
'classType'
},
{
title
:
'别名'
,
key
:
'alias'
},
{
title
:
'类别'
,
key
:
'classType'
,
width
:
120
},
{
title
:
'样品开始行'
,
key
:
'sampleBeginRow'
,
width
:
120
},
{
title
:
'样品合并数'
,
key
:
'sampleMergerNum'
,
width
:
120
},
{
title
:
'模板样品数'
,
key
:
'templateSampleNum'
,
width
:
120
},
{
title
:
'备注'
,
key
:
'remark'
}
],
formObj
:
{
...
...
@@ -68,6 +72,7 @@ export default {
},
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-build-outline'
,
id
:
''
,
name
:
'配置'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览/编辑'
},
// { type: 'ios-download', id: '', name: '下载' },
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
...
...
@@ -144,12 +149,17 @@ export default {
case
'预览/编辑'
:
this
.
_lookReport
(
data
)
break
case
'配置'
:
this
.
_configData
(
data
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
},
_configData
(
data
)
{
this
.
$refs
.
configTemplateModal
.
_open
(
data
)
},
_lookReport
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
originalTemplateGetById
(
data
.
id
)
if
(
result
)
{
...
...
@@ -158,6 +168,7 @@ export default {
},
_viewReport
(
data
)
{
console
.
log
(
'getUserInfo'
,
global
.
getUserInfo
())
// window.open(global.baseURL + '/print/v1/oos?key=' + objectKey+'&edit=true', '', 'height=' + (screen.availHeight - 50) + ',' +
// 'width=' + (screen.availWidth - 10) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=auto,resizeable=no,' +
// 'location=no,status=no')
...
...
@@ -165,7 +176,7 @@ export default {
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
id
:
data
.
id
,
idType
:
1
1
,
idType
:
1
2
,
isReport
:
4
})
}
...
...
@@ -245,8 +256,9 @@ export default {
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
default
:
case
'changeSize'
:
this
.
_page
()
break
}
}
}
...
...
pages/soil-record-template-manage/SoilRecordTemplateEdit.vue
View file @
24f05cf4
...
...
@@ -9,20 +9,20 @@
</Spin>
</div>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"
80
"
>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"
95
"
>
<Form-item
label=
"类别"
prop=
"classType"
>
<!--
<Input
v-model=
"formObj.classType"
@
on-keyup=
"_onKeyUp"
name=
"classType"
placeholder=
"请选择类别"
icon=
"plus-circled"
--
>
<!-- >
</Input>
-->
<!--
<Input
v-model=
"formObj.classType"
@
on-keyup=
"_onKeyUp"
name=
"classType"
placeholder=
"请选择类别"
icon=
"plus-circled"
--
>
<!-- >
</Input>
-->
<el-select
v-model=
"formObj.classType"
placeholder=
"请选择类别"
size=
"small"
clearable
>
<el-option
:label=
"item.value"
:value=
"item.value"
v-for=
"(item,index) in typeList"
:key=
"index"
></el-option>
</el-select>
</Form-item>
<Form-item
label=
"
别名"
prop=
"alias
"
>
<Input
v-model=
"formObj.
alias"
@
on-keyup=
"_onKeyUp"
name=
"alias"
placeholder=
"请输入别名
"
></Input>
<Form-item
label=
"
原始记录名称"
prop=
"name
"
>
<Input
v-model=
"formObj.
name"
@
on-keyup=
"_onKeyUp"
name=
"name"
placeholder=
"请输入原始记录名称
"
></Input>
</Form-item>
<Form-item
label=
"
项目代号
"
prop=
"remark"
>
<Input
v-model=
"formObj.remark"
@
on-keyup=
"_onKeyUp"
name=
"remark"
placeholder=
"请输入
项目代号
"
></Input>
<Form-item
label=
"
备注
"
prop=
"remark"
>
<Input
v-model=
"formObj.remark"
@
on-keyup=
"_onKeyUp"
name=
"remark"
placeholder=
"请输入
备注
"
></Input>
</Form-item>
</Form>
</div>
...
...
@@ -57,9 +57,9 @@
import
global
from
'../../api/config'
const
defVal
=
{
alias
:
''
,
classType
:
''
,
name
:
''
,
remark
:
''
,
classType
:
''
,
classifyId
:
0
}
...
...
@@ -70,20 +70,17 @@ export default {
modalTitle
:
'添加'
,
formObj
:
defVal
,
ruleValidate
:
{
alias
:
[{
required
:
true
,
message
:
'别名不能为空'
,
trigger
:
'blur'
}],
remark
:
[
{
required
:
true
,
message
:
'项目代号不能为空'
,
trigger
:
'blur'
}
],
name
:
[{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}],
classType
:
[
{
required
:
true
,
message
:
'类别不能为空'
,
trigger
:
'blur'
}
]
},
typeList
:
[
{
value
:
'
检定证书
'
value
:
'
力学
'
},
{
value
:
'
校准证书
'
value
:
'
物性
'
}
],
showEditModal
:
false
,
...
...
@@ -99,22 +96,18 @@ export default {
},
methods
:
{
_onKeyUp
()
{
if
(
this
.
formObj
.
alias
===
''
||
this
.
formObj
.
classType
===
''
||
this
.
formObj
.
remark
===
''
)
{
if
(
this
.
formObj
.
name
===
''
||
this
.
formObj
.
classType
===
''
)
{
this
.
isDisable
=
true
}
else
{
this
.
isDisable
=
false
this
.
action
=
global
.
baseURL
+
'/soil/v1/original_template/upload_template/?classType='
+
this
.
formObj
.
classType
+
'&alias='
+
this
.
formObj
.
alias
+
'/soil/v1/original_template/upload_template/?name='
+
this
.
formObj
.
name
+
'&remark='
+
this
.
formObj
.
remark
this
.
formObj
.
remark
+
'&classType='
+
this
.
formObj
.
classType
}
},
_selectZtree
()
{
...
...
@@ -126,6 +119,7 @@ export default {
_open
()
{
this
.
showEditModal
=
true
this
.
isLoad
=
false
this
.
formObj
.
name
=
''
this
.
formObj
.
alias
=
''
this
.
formObj
.
remark
=
''
this
.
formObj
.
classType
=
''
...
...
pages/soil-report-manage/report-audit/tabs/historyTask.vue
View file @
24f05cf4
...
...
@@ -158,7 +158,7 @@ export default {
const
result
=
await
soilReport
.
pageReportCheckHis
(
data
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_
initTable
()
this
.
$refs
.
pageTable
.
_
hideLoading
()
}
},
_clearPage
()
{
...
...
pages/soil-report-manage/report-make/OriginalRecordEdit.vue
View file @
24f05cf4
...
...
@@ -46,14 +46,14 @@ export default {
let
url
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
url
=
'http://record.patzn.com/print/v1/eln/form_
YT
_'
+
'http://record.patzn.com/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
}
else
{
url
=
Global
.
recordURL
+
'/print/v1/eln/form_
YT
_'
+
'/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
...
...
@@ -73,7 +73,7 @@ export default {
let
url
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
url
=
'http://record.patzn.com/print/v1/eln/form_
YT
_'
+
'http://record.patzn.com/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
+
...
...
@@ -82,7 +82,7 @@ export default {
}
else
{
url
=
Global
.
recordURL
+
'/print/v1/eln/form_
YT
_'
+
'/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
+
...
...
pages/soil-report-manage/report-make/OriginalRecordView.vue
View file @
24f05cf4
...
...
@@ -181,9 +181,6 @@ export default {
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_componentResult
(
data
)
{
switch
(
this
.
currentComponent
)
{
...
...
@@ -243,6 +240,7 @@ export default {
content
:
'确定这'
+
this
.
selectIds
.
length
+
'条数据生成报告'
,
onOk
:
()
=>
{
this
.
openTooltip
()
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_reportMakeOk
()
}
})
...
...
@@ -256,7 +254,9 @@ export default {
if
(
result
)
{
this
.
$Message
.
success
(
'报告成功生成'
)
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
}
this
.
$refs
.
pageTable
.
_hideLoading
()
},
openTooltip
()
{
this
.
$notify
.
info
({
...
...
@@ -289,13 +289,15 @@ export default {
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
$refs
.
recordEditModal
.
_openWithType
(
data
.
originalRecordId
,
'ENVTESTMAKEEDIT'
)
// this.$refs.recordEditModal._openWithType(
// data.originalRecordId,
// 'ENVTESTMAKEEDIT'
// )
this
.
_recordEdit
(
data
)
break
case
'查看原始记录'
:
this
.
_recordView
(
data
.
originalRecordId
)
this
.
_recordLook
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
...
...
@@ -318,6 +320,41 @@ export default {
}
})
},
_recordLook
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_recordEdit
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
$refs
.
recordEditModal
.
_openWithType
(
data
.
originalRecordId
,
'ENVTESTMAKEEDIT'
)
}
},
_reportMakeLook
(
data
)
{
console
.
log
(
data
)
this
.
_viewReport
(
data
)
// const result = await soilReport.getExcelOriginalRecord(data.id)
// if (result) {
// this._viewReport(result)
// }
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看试验项目
_itemView
(
id
)
{
this
.
$refs
.
itemViewModal
.
_open
(
id
)
...
...
pages/soil-report-manage/report-make/SampleByMakeModal.vue
View file @
24f05cf4
...
...
@@ -87,7 +87,7 @@ export default {
})
},
_report
()
{
this
.
$refs
.
reportTabs
.
_open
(
this
.
contractId
,
this
.
personal
)
this
.
$refs
.
reportTabs
.
_open
(
this
.
entrustId
)
},
_sample
()
{
console
.
log
(
this
.
entrustId
)
...
...
pages/soil-report-manage/report-make/tabs/ReportInfoMake.vue
View file @
24f05cf4
...
...
@@ -82,7 +82,7 @@
<
script
>
import
global
from
'../../../../api/config'
import
http
from
'../../../../api/http'
import
{
soil
Tes
t
}
from
'../../../../api'
import
{
soil
Repor
t
}
from
'../../../../api'
/**
* 报告编制的-待办-报告台账
...
...
@@ -97,133 +97,44 @@ export default {
],
currentComponent
:
''
,
searchOpen
:
false
,
btn
:
[
{
type
:
'primary'
,
id
:
'food-report-make-submit-to-gc-platform-by-contract'
,
name
:
'推送至国抽平台'
},
{
type
:
'primary'
,
id
:
'food-report-make-submit'
,
name
:
'提交'
},
{
type
:
'primary'
,
id
:
'food-report-make-to-pdf'
,
name
:
'盖章'
,
componentName
:
'SignatureToPDF'
},
{
type
:
'primary'
,
id
:
'food-report-make-to-auditor'
,
name
:
'选择审核人'
,
componentName
:
'AssignPerson'
},
{
type
:
'primary'
,
id
:
'food-report-make-submit-to-issue'
,
name
:
'提交至报告签发'
},
{
type
:
'success'
,
id
:
'food-report-make-batch-create-report'
,
name
:
'重新生成'
,
componentName
:
'ReportTemplateModal'
},
{
type
:
'error'
,
id
:
'food-report-make-batch-del-report'
,
name
:
'删除'
},
{
id
:
'food-report-make-batch-down'
,
name
:
'下载'
},
{
id
:
'food-report-make-batch-achieve-by-contract'
,
name
:
'完成'
},
{
id
:
'food-report-make-batch-overdue-reason'
,
name
:
'记录报告超期原因'
,
componentName
:
'Reason'
},
{
id
:
'food-report-make-edit-report-aptitude'
,
name
:
'修改报告资质要求'
,
componentName
:
'EditReportAptitude'
}
],
btn
:
[{
id
:
'food-report-make-batch-down'
,
name
:
'下载'
}],
getPage
:
{},
pageColumns
:
[
{
title
:
'报告编号'
,
key
:
'reportSn'
,
width
:
180
,
fixed
:
'left'
},
{
title
:
'样品编号'
,
key
:
'sampleNum'
,
width
:
180
},
{
title
:
'样品名称'
,
key
:
'sampleName'
,
width
:
160
},
{
title
:
'是否合格'
,
key
:
'notOkCount'
,
width
:
120
,
notOkCount
:
true
},
{
title
:
'信息维护状态'
,
key
:
'infoMaintain'
,
width
:
130
},
{
title
:
'应出报告日期'
,
key
:
'reportDate'
,
width
:
120
,
date
:
true
},
{
title
:
'是否判定'
,
key
:
'judge'
,
width
:
100
,
judge
:
true
},
{
title
:
'已盖章'
,
key
:
'signStatus'
,
width
:
100
},
{
title
:
'盖章类型'
,
key
:
'signType'
,
width
:
180
},
{
title
:
'所需资质'
,
key
:
'aptitudeType'
,
width
:
180
},
{
title
:
'报告类别'
,
key
:
'reportClass'
,
width
:
120
},
{
title
:
'大类'
,
key
:
'firstClass'
,
width
:
130
},
{
title
:
'细类'
,
key
:
'detectType'
,
width
:
120
},
{
title
:
'任务来源'
,
key
:
'taskSource'
,
width
:
120
},
{
title
:
'已推国抽'
,
key
:
'dataPushed'
,
width
:
150
,
judge
:
true
},
{
title
:
'报告语言'
,
key
:
'reportType'
,
width
:
120
},
{
title
:
'报告要求'
,
key
:
'reportRequire'
,
width
:
120
},
{
title
:
'是否带照片'
,
key
:
'havePhoto'
,
width
:
120
,
judge
:
true
},
{
title
:
'编制人'
,
key
:
'maker'
,
width
:
100
},
{
title
:
'编制时间'
,
key
:
'makDate'
,
width
:
140
,
dateTime
:
true
},
{
title
:
'样品备注'
,
key
:
'sampleRemark'
},
{
title
:
'委托备注'
,
key
:
'contractRemark'
}
{
title
:
'创建人'
,
key
:
'uname'
,
width
:
180
,
fixed
:
'left'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
width
:
180
,
dateTime
:
true
}
],
selectIds
:
[],
selectData
:
[],
formObj
:
{
contractId
:
''
,
reportSn
:
''
,
sampleNum
:
''
,
sampleName
:
''
,
taskSource
:
''
,
detectType
:
''
,
reportDateBegin
:
''
,
reportDateEnd
:
''
,
notOkCount
:
''
,
personal
:
0
,
dataPushed
:
''
entrustId
:
''
},
dateList
:
[],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览/编辑报告'
}
,
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览/编辑报告'
}
// {
// type: '
loop
',
// type: '
ios-document
',
// id: '',
// name: '
重新生成
',
// componentName: '
ReportTemplateModal
'
// name: '
项目台账
',
// componentName: '
ItemModalByReportMake
'
// },
{
type
:
'ios-document'
,
id
:
''
,
name
:
'项目台账'
,
componentName
:
'ItemModalByReportMake'
},
{
type
:
'ios-cloud-upload'
,
id
:
''
,
name
:
'上传'
,
componentName
:
'UploadByReport'
},
// {
// type: 'i
nformation-circle
d',
// type: 'i
os-cloud-uploa
d',
// id: '',
// name: '
历史版本
',
// componentName: '
HisRevision
'
// name: '
上传
',
// componentName: '
UploadByReport
'
// },
{
type
:
'cloud'
,
id
:
''
,
name
:
'附件'
,
componentName
:
'ReportFileManage'
},
{
type
:
'ios-clock'
,
id
:
''
,
name
:
'操作记录'
,
componentName
:
'FoodReportRecord'
}
//
{
//
type: 'cloud',
//
id: '',
//
name: '附件',
//
componentName: 'ReportFileManage'
//
},
//
{
//
type: 'ios-clock',
//
id: '',
//
name: '操作记录',
//
componentName: 'FoodReportRecord'
//
}
],
// 签发日期
issueDateTemp
:
''
,
...
...
@@ -301,7 +212,7 @@ export default {
this
.
$refs
.
refModal
.
_open
(
data
)
break
case
'预览/编辑报告'
:
this
.
_viewReport
(
data
.
id
)
this
.
_viewReport
(
data
)
break
case
'操作记录'
:
this
.
_record
(
data
.
id
)
...
...
@@ -327,32 +238,15 @@ export default {
_upload
(
id
)
{
this
.
$refs
.
refModal
.
_open
(
id
)
},
_viewReport
(
id
)
{
this
.
$openWindowModeless
({
id
:
id
})
// this.$store.dispatch('FoodSampleReport/viewReport', id).then(() => {
// const data = this.$store.state.FoodSampleReport.page
// if (data !== undefined) {
// // 查询token,后台使用pageoffice调接口查询数据,需要token,否则提示未登录
// this.$store.dispatch('Redirect/getAccessToken').then(() => {
// const token = this.$store.state.Redirect.str
// if (token) {
// if (localStorage.getItem('reportReadOnly')) {
// // 只读
// this.$openWindowModeless({ objectKey: data.objectKey, id: id })
// } else {
// // 编辑
// this.$openWindowModeless({
// objectKey: data.objectKey,
// id: id,
// isReport: 1,
// token: token,
// reportStatus: this.reportStatus
// })
// }
// }
// })
// }
// })
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
...
...
@@ -373,6 +267,7 @@ export default {
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'table-col'
:
console
.
log
(
'table-col'
,
data
)
this
.
userColumns
=
data
break
case
'changeSize'
:
...
...
@@ -380,19 +275,15 @@ export default {
break
}
},
_open
(
contractId
,
personal
)
{
_open
(
entrustId
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
contractId
=
contractId
this
.
dateList
=
[]
this
.
formObj
.
personal
=
personal
this
.
formObj
.
entrustId
=
entrustId
this
.
showIssueModal
=
false
this
.
reportId
=
''
this
.
tempId
=
''
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soil
Test
.
pageExpTest
(
const
result
=
await
soil
Report
.
reportPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
...
...
pages/soil-report-manage/soil-item-report-template/ConfigTemplate.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"1000"
class=
"modal-footer-none"
>
<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.attributeName"
@
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>
<ConfigTemplateEdit
ref=
"indexEdit"
@
on-result-change=
"_page"
></ConfigTemplateEdit>
</div>
</template>
<
script
>
import
{
soilAptitude
}
from
'../../../api'
import
ConfigTemplateEdit
from
'./ConfigTemplateEdit'
export
default
{
components
:
{
ConfigTemplateEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加配置'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
pageColumns
:
[
{
title
:
'属性名称'
,
key
:
'attributeName'
},
{
title
:
'属性'
,
key
:
'dataAttribute'
,
width
:
120
},
{
title
:
'列位置'
,
key
:
'columnPlace'
,
width
:
120
},
{
title
:
'合并开始列'
,
key
:
'mergeBegin'
,
width
:
120
},
{
title
:
'合并结束列'
,
key
:
'mergeEnd'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
}],
selectIds
:
[],
formObj
:
{
attributeName
:
undefined
,
templateId
:
undefined
},
// 资质信息
aptitudeItemInfo
:
{}
}
},
methods
:
{
_open
(
data
)
{
console
.
log
(
data
)
this
.
aptitudeItemInfo
=
data
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
templateId
=
data
.
id
this
.
id
=
data
.
id
this
.
modalTitle
=
data
.
name
+
' 指标管理'
this
.
showModal
=
true
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
pageTemplateConfig
(
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
soilAptitude
.
expReportTemplateConfig
(
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
.
deleteReportTemplateConfig
(
ids
)
if
(
result
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-report-manage/soil-item-report-template/ConfigTemplateEdit.vue
0 → 100644
View file @
24f05cf4
<
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=
"attributeName"
class=
"width-48"
>
<Input
v-model=
"formObj.attributeName"
name=
"attributeName"
placeholder=
"请输入属性名称"
/>
</Form-item>
<Form-item
label=
"属性"
prop=
"dataAttribute"
class=
"width-48"
>
<Input
v-model=
"formObj.dataAttribute"
name=
"dataAttribute"
placeholder=
"请输入属性"
/>
</Form-item>
<Form-item
label=
"列位置"
prop=
"columnPlace"
class=
"width-48"
>
<Input
v-model=
"formObj.columnPlace"
@
keydown
.
native=
"channelInputLimit"
name=
"columnPlace"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入列位置"
/>
</Form-item>
<Form-item
label=
"合并开始列"
prop=
"mergeBegin"
class=
"width-48"
>
<Input
v-model=
"formObj.mergeBegin"
@
keydown
.
native=
"channelInputLimit"
name=
"mergeBegin"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入合并开始列"
/>
</Form-item>
<Form-item
label=
"合并结束列"
prop=
"mergeEnd"
class=
"width-48"
>
<Input
v-model=
"formObj.mergeEnd"
@
keydown
.
native=
"channelInputLimit"
name=
"mergeEnd"
type=
"number"
onmousewheel=
"return false"
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
{
soilAptitude
}
from
'../../../api'
export
default
{
components
:
{},
data
()
{
return
{
activeName
:
''
,
hideUserSel
:
true
,
id
:
''
,
modalTitle
:
''
,
templateId
:
''
,
formObj
:
{
attributeName
:
undefined
,
columnPlace
:
undefined
,
unit
:
undefined
,
status
:
undefined
,
mainType
:
undefined
,
smallType
:
undefined
,
testValue
:
undefined
,
mergeBegin
:
undefined
,
mergeEnd
:
undefined
},
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
:
''
}
})
},
channelInputLimit
(
e
)
{
const
key
=
e
.
key
// 不允许输入'e'和'.'
if
(
key
===
'e'
||
key
===
'.'
)
{
e
.
returnValue
=
false
return
false
}
return
true
},
_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-template-config'
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
id
=
''
this
.
templateId
=
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
=
[]
},
// 主检人&检测科室
_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
}
},
// 单位
_unitChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'select'
:
this
.
formObj
.
unit
=
data
break
case
'query'
:
this
.
_getUnitList
(
data
)
break
}
},
// 获取表数据
_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-template-config'
)
if
(
this
.
$string
(
this
.
id
).
isEmpty
())
{
data
.
templateId
=
this
.
templateId
// 添加
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
soilAptitude
.
saveReportTemplateConfig
(
data
)
console
.
log
(
result
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
expReportTemplateConfigEdit
(
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-report-manage/soil-item-report-template/SoilItemReportTemplate.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding marginLeft-10"
>
<div
class=
"layout-content-main tree-position"
>
<div
class=
"position-right"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-form"
v-show=
"searchOpen"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"模板名称:"
>
<Input
v-model=
"formObj.alias"
@
on-enter=
"_formSearch"
name=
"alias"
placeholder=
"请输入模板名称"
clearable
></Input>
<input
type=
"hidden"
name=
"classifyId"
>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:page-columns=
"pageColumns"
:get-page=
"getPage"
:opt-col-width=
"120"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
<!-- 添加、编辑 -->
<SoilRecordTemplateEdit
ref=
"editModal"
@
on-result-change=
"_search"
></SoilRecordTemplateEdit>
<SoilRecordEdit
ref=
"reportEdit"
@
on-result-change=
"_search"
></SoilRecordEdit>
<ConfigTemplate
ref=
"configTemplateModal"
@
on-result-change=
"_page"
></ConfigTemplate>
</div>
</template>
<
script
>
import
global
from
'../../../api/config'
import
{
soilAptitude
}
from
'../../../api'
import
SoilRecordTemplateEdit
from
'./SoilReportTemplateEdit'
import
SoilRecordEdit
from
'./SoilReportEdit'
import
ConfigTemplate
from
'./ConfigTemplate'
export
default
{
components
:
{
SoilRecordTemplateEdit
,
SoilRecordEdit
,
ConfigTemplate
},
data
()
{
return
{
pageColumns
:
[
{
title
:
'报告模板名称'
,
key
:
'alias'
},
{
title
:
'类别'
,
key
:
'classType'
},
{
title
:
'备注'
,
key
:
'remark'
}
],
formObj
:
{
name
:
undefined
},
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-build-outline'
,
id
:
''
,
name
:
'配置'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览/编辑'
},
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
],
getPage
:
{},
tableStyleObj
:
{},
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
searchOpen
:
true
,
selectIds
:
[]
}
},
computed
:
{
// tableHeight: function() {
// if (this.searchOpen) {
// return this.$newTableHeight('search')
// } else {
// return this.$newTableHeight('noSearch')
// }
// }
},
mounted
()
{
// this._contHide()
// this._classTree()
this
.
_page
()
},
methods
:
{
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
()
break
case
'删除'
:
this
.
_delAll
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_refresh
()
{
// 刷新
this
.
id
=
''
this
.
name
=
''
this
.
_search
()
this
.
_classTree
()
},
_classData
(
result
,
msg
)
{
$
(
'input[name=classifyId]'
).
val
(
result
)
this
.
_formSearch
()
},
_classTree
()
{
this
.
$refs
.
classTree
.
_Ztree
()
},
_treeHide
()
{
// 左侧树隐藏
this
.
isTree
=
false
this
.
tableStyleObj
.
marginLeft
=
'15px'
},
_treeShow
()
{
this
.
isTree
=
true
this
.
tableStyleObj
.
marginLeft
=
'215px'
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_reportEdit
(
data
)
break
case
'配置'
:
this
.
_configData
(
data
)
break
case
'下载'
:
this
.
_download
(
data
.
id
)
break
case
'预览/编辑'
:
this
.
_lookReport
(
data
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
},
_lookReport
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
expReportTemplateGetById
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
// window.open(global.baseURL + '/print/v1/oos?key=' + objectKey+'&edit=true', '', 'height=' + (screen.availHeight - 50) + ',' +
// 'width=' + (screen.availWidth - 10) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=auto,resizeable=no,' +
// 'location=no,status=no')
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
id
:
data
.
id
,
idType
:
11
,
isReport
:
4
})
}
},
_contHide
()
{
this
.
_page
()
},
_page
:
async
function
()
{
console
.
log
(
'page'
)
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
expReportTemplatePage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
// const result = await
// this.$refs.pageTable._page('search-form', 'SysFileTemplate/page')
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_editModal
()
{
this
.
$refs
.
editModal
.
_open
()
},
_reportEdit
(
data
)
{
this
.
$refs
.
reportEdit
.
_open
(
data
)
},
_configData
(
data
)
{
this
.
$refs
.
configTemplateModal
.
_open
(
data
)
},
// 批量删除
_delAll
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
)
}
},
// 删除
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
)
}
})
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
expReportTemplateDelete
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
},
_download
(
id
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要下载?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/base/v1/file_template/download/'
+
id
,
'_blank'
)
}
})
},
_search
()
{
this
.
_page
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
// this.getPage = this.$store.state.SysFileTemplate.page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
}
}
}
</
script
>
pages/soil-report-manage/soil-item-report-template/SoilReportEdit.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<Modal
v-model=
"showEditModal"
:mask-closable=
"false"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div
v-show=
"isLoad"
>
<Spin
fix
>
<Icon
type=
"load-c"
size=
18
class=
"file-spin-icon-load"
></Icon>
<div>
正在上传,请稍后...
</div>
</Spin>
</div>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"95"
inline
class=
"inputBox"
>
<Form-item
label=
"类别"
prop=
"classType"
style=
"width: 100%"
>
<el-select
v-model=
"formObj.classType"
placeholder=
"请选择类别"
size=
"small"
clearable
>
<el-option
:label=
"item.value"
:value=
"item.value"
v-for=
"(item,index) in typeList"
:key=
"index"
></el-option>
</el-select>
</Form-item>
<Form-item
label=
"报告模板名称"
prop=
"alias"
style=
"width: 100%"
>
<Input
v-model=
"formObj.alias"
name=
"alias"
placeholder=
"请输入报告模板名称"
></Input>
</Form-item>
<Form-item
label=
"备注"
prop=
"remark"
style=
"width: 100%"
>
<Input
v-model=
"formObj.remark"
name=
"remark"
placeholder=
"请输入备注"
></Input>
</Form-item>
<Form-item
label=
"样品开始行"
prop=
"sampleBeginRow"
class=
"width-48"
>
<el-input
v-model=
"formObj.sampleBeginRow"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleBeginRow"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入样品开始行"
/>
</Form-item>
<Form-item
label=
"数据占用行"
prop=
"dataTotalRow"
class=
"width-48"
>
<el-input
v-model=
"formObj.dataTotalRow"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleBeginCol"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入数据占用行"
/>
</Form-item>
<Form-item
label=
"总列数"
prop=
"totalColumn"
class=
"width-48"
>
<el-input
v-model=
"formObj.totalColumn"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleMergerNum"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入总列数"
/>
</Form-item>
<Form-item
label=
"模板样品数"
prop=
"templateSampleNum"
class=
"width-48"
>
<el-input
v-model=
"formObj.templateSampleNum"
@
keydown
.
native=
"channelInputLimit"
name=
"templateSampleNum"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入模板样品数"
/>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
class=
"btn-width clearfix"
>
<Button
@
click=
"_cancel"
style=
"margin-left: 8px;"
>
取消
</Button>
<Button
@
click=
"_ok"
type=
"primary"
style=
"margin-bottom: 0;float: right"
>
保存
</Button>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 添加编辑
*/
import
{
soilAptitude
}
from
'../../../api'
const
defVal
=
{
alias
:
undefined
,
classType
:
undefined
,
dataTotalRow
:
undefined
,
totalColumn
:
undefined
,
remark
:
undefined
,
sampleBeginRow
:
undefined
,
sampleBeginCol
:
undefined
,
sampleMergerNum
:
undefined
,
templateSampleNum
:
undefined
,
classifyId
:
0
}
export
default
{
data
()
{
const
validatesampleBeginRow
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleBeginRow
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
const
validatetemplateSampleNum
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
templateSampleNum
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
return
{
modalTitle
:
'编辑'
,
formObj
:
defVal
,
ruleValidate
:
{
alias
:
[
{
required
:
true
,
message
:
'模板名称不能为空'
,
trigger
:
'blur'
}
],
sampleBeginRow
:
[
{
required
:
true
,
validator
:
validatesampleBeginRow
,
message
:
'样品开始行不能为空'
,
trigger
:
'blur'
}
],
templateSampleNum
:
[
{
required
:
true
,
validator
:
validatetemplateSampleNum
,
message
:
'模板样品数不能为空'
,
trigger
:
'blur'
}
],
classType
:
[
{
required
:
true
,
message
:
'类别不能为空'
,
trigger
:
'blur'
}
]
},
typeList
:
[
{
value
:
'力学'
},
{
value
:
'物性'
}
],
id
:
''
,
showEditModal
:
false
,
dataObj
:
{
file
:
''
},
pname
:
''
,
action
:
''
,
isLoad
:
false
,
isDisable
:
true
,
format
:
[
'docx'
,
'xlsx'
,
'xls'
]
}
},
methods
:
{
_onKeyUp
()
{
if
(
this
.
formObj
.
alias
===
''
||
this
.
formObj
.
classType
===
''
)
{
this
.
isDisable
=
true
}
else
{
this
.
isDisable
=
false
this
.
action
=
global
.
baseURL
+
'/meter/v1/file_template/upload_template/?classType='
+
this
.
formObj
.
classType
+
'&alias='
+
this
.
formObj
.
alias
+
'&remark='
+
this
.
formObj
.
remark
}
},
channelInputLimit
(
e
)
{
const
key
=
e
.
key
// 不允许输入'e'和'.'
if
(
key
===
'e'
||
key
===
'.'
)
{
e
.
returnValue
=
false
return
false
}
return
true
},
_selectZtree
()
{
// this.$refs.ztreeModal._openZtree()
},
_cancel
()
{
this
.
showEditModal
=
false
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
console
.
log
(
'valid'
,
valid
)
if
(
valid
)
{
this
.
_editOk
()
}
else
{
this
.
$Message
.
error
(
'请输入必填值'
)
}
})
},
_editOk
:
async
function
()
{
const
result
=
await
soilAptitude
.
expReportTemplateEdit
({
id
:
this
.
id
,
formObj
:
this
.
formObj
})
if
(
result
)
{
this
.
$message
.
success
(
'编辑成功'
)
this
.
showEditModal
=
false
this
.
$emit
(
'on-result-change'
)
}
},
_open
(
data
)
{
console
.
log
(
data
)
this
.
showEditModal
=
true
this
.
isLoad
=
false
this
.
id
=
data
.
id
this
.
formObj
.
alias
=
data
.
alias
this
.
formObj
.
remark
=
data
.
remark
this
.
formObj
.
classType
=
data
.
classType
this
.
formObj
.
sampleBeginRow
=
data
.
sampleBeginRow
this
.
formObj
.
sampleBeginCol
=
data
.
sampleBeginCol
this
.
formObj
.
sampleMergerNum
=
data
.
sampleMergerNum
this
.
formObj
.
templateSampleNum
=
data
.
templateSampleNum
this
.
modalTitle
=
'编辑模板'
console
.
log
(
this
.
id
)
},
_beupload
(
file
)
{
this
.
dataObj
.
file
=
file
.
name
},
_handelprogress
(
event
,
file
,
fileList
)
{
this
.
isLoad
=
true
},
// _handelsuccess(response, file, fileList) {
// // 上传成功
// if (response.success) {
// this.isLoad = false
// this.$Message.success('上传成功!')
// this.$emit('on-result-change')
// this.showEditModal = false
// } else {
// this.isLoad = true
// this.$Message.error(response.msg)
// }
// },
_formatError
(
file
)
{
this
.
$Notice
.
error
({
title
:
'文件格式不正确'
,
duration
:
10
,
desc
:
'文件 '
+
file
.
name
+
' 格式不正确,请上传格式为 docx、xlsx、xls 的文件!'
})
},
_ztree
(
result
)
{
this
.
pname
=
''
if
(
result
===
undefined
)
{
this
.
formObj
.
classifyId
=
'0'
this
.
pname
=
''
}
else
{
this
.
formObj
.
classifyId
=
result
.
id
this
.
pname
=
result
.
name
}
// 判断必填项是否为空
}
}
}
</
script
>
<
style
scoped
>
.clearfix
:after
{
content
:
''
;
clear
:
both
;
display
:
block
;
}
.inputBox
>>>
input
::-webkit-outer-spin-button
,
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
!important
;
}
.inputBox
>>>
input
[
type
=
'number'
]
{
-moz-appearance
:
textfield
!important
;
}
</
style
>
pages/soil-report-manage/soil-item-report-template/SoilReportTemplateEdit.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<Modal
v-model=
"showEditModal"
:mask-closable=
"false"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div
v-show=
"isLoad"
>
<Spin
fix
>
<Icon
type=
"load-c"
size=
18
class=
"file-spin-icon-load"
></Icon>
<div>
正在上传,请稍后...
</div>
</Spin>
</div>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"95"
>
<Form-item
label=
"类别"
prop=
"classType"
>
<!--
<Input
v-model=
"formObj.classType"
@
on-keyup=
"_onKeyUp"
name=
"classType"
placeholder=
"请选择类别"
icon=
"plus-circled"
--
>
<!-- >
</Input>
-->
<el-select
v-model=
"formObj.classType"
placeholder=
"请选择类别"
size=
"small"
clearable
>
<el-option
:label=
"item.value"
:value=
"item.value"
v-for=
"(item,index) in typeList"
:key=
"index"
></el-option>
</el-select>
</Form-item>
<Form-item
label=
"报告模板名称"
prop=
"name"
>
<Input
v-model=
"formObj.name"
@
on-keyup=
"_onKeyUp"
name=
"name"
placeholder=
"请输入报告模板名称"
></Input>
</Form-item>
<Form-item
label=
"备注"
prop=
"remark"
>
<Input
v-model=
"formObj.remark"
@
on-keyup=
"_onKeyUp"
name=
"remark"
placeholder=
"请输入备注"
></Input>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
class=
"btn-width clearfix"
>
<Button
@
click=
"_cancel"
style=
"margin-left: 8px;"
>
取消
</Button>
<label
style=
"margin-bottom: 0;float: right"
>
<Upload
:action=
"action"
:on-success=
"_handelsuccess"
:before-upload=
"_beupload"
:on-progress=
"_handelprogress"
:on-format-error=
"_formatError"
:data=
"dataObj"
:with-credentials=
"true"
:show-upload-list=
"false"
:format=
"format"
>
<Button
:disabled=
"isDisable"
type=
"primary"
>
导入文件
</Button>
</Upload>
</label>
</div>
</Modal>
<!--类别弹出树-->
<!--
<LmsTemplateClassifyZTree
ref=
"ztreeModal"
@
on-result-change=
"_ztree"
></LmsTemplateClassifyZTree>
-->
</div>
</
template
>
<
script
>
/**
* 添加编辑
*/
// import LmsTemplateClassifyZTree from '../lms-template-classify/LmsTemplateClassifyZTree.vue'
import
global
from
'../../../api/config'
const
defVal
=
{
name
:
''
,
remark
:
''
,
classType
:
''
,
classifyId
:
0
}
export
default
{
// components: { LmsTemplateClassifyZTree },
data
()
{
return
{
modalTitle
:
'添加'
,
formObj
:
defVal
,
ruleValidate
:
{
name
:
[{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}],
classType
:
[
{
required
:
true
,
message
:
'类别不能为空'
,
trigger
:
'blur'
}
]
},
typeList
:
[
{
value
:
'力学'
},
{
value
:
'物性'
}
],
showEditModal
:
false
,
dataObj
:
{
file
:
''
},
pname
:
''
,
action
:
''
,
isLoad
:
false
,
isDisable
:
true
,
format
:
[
'docx'
,
'xlsx'
,
'xls'
]
}
},
methods
:
{
_onKeyUp
()
{
if
(
this
.
formObj
.
name
===
''
||
this
.
formObj
.
classType
===
''
)
{
this
.
isDisable
=
true
}
else
{
this
.
isDisable
=
false
this
.
action
=
global
.
baseURL
+
'/soil/v1/exp_report_template/upload_template/?name='
+
this
.
formObj
.
name
+
'&remark='
+
this
.
formObj
.
remark
+
'&classType='
+
this
.
formObj
.
classType
}
},
_selectZtree
()
{
// this.$refs.ztreeModal._openZtree()
},
_cancel
()
{
this
.
showEditModal
=
false
},
_open
()
{
this
.
showEditModal
=
true
this
.
isLoad
=
false
this
.
formObj
.
name
=
''
this
.
formObj
.
alias
=
''
this
.
formObj
.
remark
=
''
this
.
formObj
.
classType
=
''
this
.
modalTitle
=
'添加模板'
},
_beupload
(
file
)
{
this
.
dataObj
.
file
=
file
.
name
},
_handelprogress
(
event
,
file
,
fileList
)
{
this
.
isLoad
=
true
},
_handelsuccess
(
response
,
file
,
fileList
)
{
// 上传成功
if
(
response
.
success
)
{
this
.
isLoad
=
false
this
.
$Message
.
success
(
'上传成功!'
)
this
.
$emit
(
'on-result-change'
)
this
.
showEditModal
=
false
}
else
{
this
.
isLoad
=
true
this
.
$Message
.
error
(
response
.
msg
)
}
},
_formatError
(
file
)
{
this
.
$Notice
.
error
({
title
:
'文件格式不正确'
,
duration
:
10
,
desc
:
'文件 '
+
file
.
name
+
' 格式不正确,请上传格式为 docx、xlsx、xls 的文件!'
})
},
_ztree
(
result
)
{
this
.
pname
=
''
if
(
result
===
undefined
)
{
this
.
formObj
.
classifyId
=
'0'
this
.
pname
=
''
}
else
{
this
.
formObj
.
classifyId
=
result
.
id
this
.
pname
=
result
.
name
}
// 判断必填项是否为空
this
.
_onKeyUp
()
}
}
}
</
script
>
<
style
scoped
>
.clearfix
:after
{
content
:
''
;
clear
:
both
;
display
:
block
;
}
</
style
>
pages/soil-sample-manage/sample-preparation-check/OriginalRecordEdit.vue
View file @
24f05cf4
...
...
@@ -50,7 +50,7 @@ export default {
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_
YT
_'
+
'/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
...
...
@@ -73,7 +73,7 @@ export default {
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_
YT
_'
+
'/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
+
...
...
pages/soil-sample-manage/sample-preparation/OriginalRecordEdit.vue
View file @
24f05cf4
...
...
@@ -50,7 +50,7 @@ export default {
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_
YT
_'
+
'/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
...
...
@@ -73,7 +73,7 @@ export default {
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_
YT
_'
+
'/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
+
...
...
pages/soil-sample-manage/sample-preparation/SoilSampleManageHis.vue
View file @
24f05cf4
...
...
@@ -56,9 +56,6 @@
</Col>
</Row>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
/>
</div>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
<DescribeDetailModal
ref=
"writeDetailModal"
@
on-result-change=
"_page"
></DescribeDetailModal>
<PreparationHis
ref=
"preHisModal"
@
on-result-change=
"_page"
></PreparationHis>
...
...
pages/soil-sample-manage/sample-preparation/sample-preparation-record/RecordRightList.vue
View file @
24f05cf4
...
...
@@ -55,11 +55,12 @@
<CollectManage
ref=
"collectModal"
@
on-result-change=
"_page"
></CollectManage>
<CollectFileManage
ref=
"collectFileModal"
@
on-result-change=
"_page"
></CollectFileManage>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
<CreateReport
ref=
"createModal"
@
on-result-change=
"_certificateSelectExcelBack"
></CreateReport>
</div>
</template>
<
script
>
import
Global
from
'../../../../api/config'
import
{
soilTest
}
from
'../../../../api'
import
{
soil
Report
,
soilSample
,
soil
Test
}
from
'../../../../api'
import
AssignPerson
from
'../../../../components/user-info-single/assignPerson'
import
SelectOriTempRecord
from
'../SelectOriTempRecord'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
...
...
@@ -68,6 +69,7 @@ import SelEquip from '../../../../components/select-equip/SelEquip'
import
EquipManage
from
'../EquipManage'
import
CollectManage
from
'../CollectManage'
import
CollectFileManage
from
'../CollectFileManage'
import
CreateReport
from
'../../../soil-test-manage/test-input/item-tabs/CreateReport'
export
default
{
components
:
{
AssignPerson
,
...
...
@@ -77,7 +79,8 @@ export default {
SelEquip
,
EquipManage
,
CollectManage
,
CollectFileManage
CollectFileManage
,
CreateReport
},
data
()
{
return
{
...
...
@@ -117,6 +120,7 @@ export default {
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'原始记录填写'
},
{
type
:
'success'
,
id
:
''
,
name
:
'完成提交'
},
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
}
],
...
...
@@ -182,14 +186,15 @@ export default {
switch
(
res
)
{
case
'查看原始记录'
:
console
.
log
(
data
)
if
(
data
.
recordId
)
{
this
.
$refs
.
editModal
.
_openWithType
(
data
.
recordId
,
'ENVTESTMAKEEDIT'
)
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
this
.
_reportView
(
data
)
// if (data.recordId) {
// this.$refs.editModal._openWithType(
// data.recordId,
// 'ENVTESTMAKEEDIT'
// )
// } else {
// this.$Message.warning('未填写原始记录')
// }
break
case
'查看指标'
:
this
.
_indexManage
(
data
)
...
...
@@ -206,6 +211,17 @@ export default {
}
})
},
_reportView
(
data
)
{
if
(
data
.
recorded
===
'是'
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
$refs
.
editModal
.
_openWithType
(
data
.
recordId
,
'ENVTESTMAKEEDIT'
)
}
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
},
_collectManage
(
data
)
{
this
.
$refs
.
collectModal
.
_open
(
data
)
},
...
...
@@ -401,6 +417,9 @@ export default {
case
'填写原始记录'
:
this
.
_addRecord
()
break
case
'原始记录填写'
:
this
.
_makeCertificateExcelByTemp
()
break
case
'完成提交'
:
this
.
_submitItem
(
this
.
selectData
)
break
...
...
@@ -432,6 +451,57 @@ export default {
break
}
},
_makeCertificateExcelByTemp
(
data
)
{
// this.$refs.SelectOriTempRecordExcel._open(data.id, data)
this
.
$refs
.
createModal
.
_open
()
},
_certificateSelectExcelBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_makeCodeExcel
(
data
)
}
else
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
// this._appendOriginalRecord()
}
}
},
_makeCodeExcel
:
async
function
(
data
)
{
console
.
log
(
this
.
selectIds
)
console
.
log
(
'----dddd---'
,
data
)
this
.
$refs
.
pageTable
.
_hideLoading
()
const
result
=
await
soilSample
.
generateExcelReport
(
data
)
if
(
result
)
{
await
this
.
_page
()
if
(
result
===
null
||
result
===
undefined
)
{
this
.
$Message
.
warning
(
'证书编制失败,请联系管理员!'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
return
false
}
else
{
this
.
$emit
(
'on-result-change'
)
this
.
_viewReport
(
result
)
}
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
getExcelOriginalRecord
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
_selectEquipment
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
...
...
pages/soil-test-manage/test-input/IndexManage.vue
View file @
24f05cf4
<
template
>
<div>
<Modal
v-model=
"showModal"
v-drag
width=
"
100"
class=
"modal-footer-none full-screen
"
>
<Modal
v-model=
"showModal"
v-drag
width=
"
900"
class=
"modal-footer-none
"
>
<div
slot=
"header"
>
{{
modalTitle
}}
</div>
<div>
<Form
id=
"index-right-form"
:label-width=
"80"
inline
onsubmit=
"return false"
>
...
...
@@ -51,9 +51,9 @@ export default {
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: 'mainType', width: 120 },
//
{ title: '试验指标小类', key: 'smallType', width: 120 },
//
{ title: '状态', key: 'status', width: 120 },
{
title
:
'检测值'
,
key
:
'testValue'
,
width
:
120
},
{
title
:
'单位'
,
key
:
'unit'
,
width
:
120
}
],
...
...
pages/soil-test-manage/test-input/ItemReportView.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
:label-width=
"80"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"模板名称:"
>
<Input
v-model=
"formObj.title"
@
on-enter=
"_formSearch"
placeholder=
"请输入模板名称"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
v-model=
"formObj.entrustCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入委托编号"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:icon-msg=
"iconMsg"
:getPage=
"getPage"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
<ItemOriginalRecordEdit
ref=
"recordEditModal"
></ItemOriginalRecordEdit>
<ItemView
ref=
"itemViewModal"
></ItemView>
</div>
</template>
<
script
>
/**
* 原始记录查看
*/
import
Global
from
'../../../api/config'
import
{
soilReport
,
soilTest
}
from
'../../../api'
import
ItemOriginalRecordEdit
from
'./OriginalRecordEdit'
import
ItemView
from
'./ItemView'
export
default
{
components
:
{
ItemOriginalRecordEdit
,
ItemView
},
data
()
{
return
{
currentComponent
:
''
,
getPage
:
{},
btn
:
[],
selectIds
:
[],
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看项目报告'
},
{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}
],
pageColumns
:
[
{
title
:
'项目名称'
,
key
:
'expName'
},
{
title
:
'备注'
,
key
:
'remark'
},
{
title
:
'创建人'
,
key
:
'uname'
},
{
title
:
'创建时间'
,
key
:
'ctime'
,
dateTime
:
true
}
],
formObj
:
{
entrustId
:
''
},
searchOpen
:
false
}
},
computed
:
{
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
''
,
340
)
}
else
{
return
this
.
$tableHeight
(
'tabNoSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
_componentResult
(
data
)
{
switch
(
this
.
currentComponent
)
{
case
'EditDateModal'
:
this
.
_updateDate
(
data
)
break
default
:
this
.
_page
()
}
},
_updateDate
(
date
)
{
this
.
$store
.
dispatch
(
'PrintForm/updateTimeBatch'
,
{
ids
:
this
.
selectIds
.
join
(
','
),
fillInTime
:
date
})
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
PrintForm
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
'更新成功!'
)
}
})
},
_btnClick
(
msg
,
componentName
)
{
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
msg
)
{
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
})
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
// this.$refs.recordEditModal._openWithType(
// data.originalRecordId,
// 'ENVTESTMAKEEDIT'
// )
this
.
_reportMakeLook
(
data
)
break
case
'查看项目报告'
:
this
.
_reportView
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
})
},
// 查看试验项目
_itemView
(
id
)
{
this
.
$refs
.
itemViewModal
.
_open
(
id
)
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
expReportGetById
(
data
.
id
)
// this._viewReport(data)
// const result = await soilReport.getExcelOriginalRecord(data.id)
if
(
result
)
{
console
.
log
(
'result'
)
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
11
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
let
recordUrl
=
''
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
recordUrl
=
'http://record.patzn.com'
}
else
{
recordUrl
=
Global
.
recordURL
}
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
recordUrl
+
'/print/v1/form/'
+
originalRecordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
_open
(
entrustId
)
{
this
.
formObj
.
entrustId
=
entrustId
this
.
_page
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
EnvItem
.
page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilTest
.
expReportPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
// 删除原始记录
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_deleteOk
(
ids
)
}
})
},
_deleteOk
:
async
function
(
ids
)
{
const
result
=
await
soilTest
.
deleteReport
(
ids
)
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-input/OriginalRecordEdit.vue
View file @
24f05cf4
...
...
@@ -50,7 +50,7 @@ export default {
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_
YT
_'
+
'/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
...
...
@@ -73,7 +73,7 @@ export default {
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
recordUrl
+
'/print/v1/eln/form_
YT
_'
+
'/print/v1/eln/form_
soil
_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
+
...
...
pages/soil-test-manage/test-input/OriginalRecordView.vue
View file @
24f05cf4
...
...
@@ -51,7 +51,7 @@
* 原始记录查看
*/
import
Global
from
'../../../api/config'
import
{
soilTest
}
from
'../../../api'
import
{
soil
Report
,
soil
Test
}
from
'../../../api'
import
ItemOriginalRecordEdit
from
'./OriginalRecordEdit'
import
ItemView
from
'./ItemView'
...
...
@@ -146,13 +146,11 @@ export default {
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
$refs
.
recordEditModal
.
_openWithType
(
data
.
originalRecordId
,
'ENVTESTMAKEEDIT'
)
this
.
_reportEdit
(
data
)
break
case
'查看原始记录'
:
this
.
_recordView
(
data
.
originalRecordId
)
this
.
_reportView
(
data
)
// this._recordView(data.originalRecordId)
break
case
'查看试验项目'
:
this
.
_itemView
(
data
.
id
)
...
...
@@ -167,6 +165,40 @@ export default {
_itemView
(
id
)
{
this
.
$refs
.
itemViewModal
.
_open
(
id
)
},
_reportView
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
_recordView
(
data
.
originalRecordId
)
}
},
_reportEdit
(
data
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
$refs
.
recordEditModal
.
_openWithType
(
data
.
originalRecordId
,
'ENVTESTMAKEEDIT'
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
originalRecordGetById
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
// 查看原始记录
_recordView
(
originalRecordId
)
{
let
recordUrl
=
''
...
...
pages/soil-test-manage/test-input/SampleManage.vue
View file @
24f05cf4
...
...
@@ -11,6 +11,9 @@
<el-tab-pane
label=
"按样品录入"
name=
"waitScan"
>
<WaitScan
ref=
"waitScanModal"
></WaitScan>
</el-tab-pane>
<el-tab-pane
label=
"查看项目报告"
name=
"viewReport"
>
<ItemReportView
ref=
"reportModal"
></ItemReportView>
</el-tab-pane>
<el-tab-pane
label=
"查看原始记录"
name=
"viewRecord"
>
<OriginalRecordView
ref=
"recordModal"
></OriginalRecordView>
</el-tab-pane>
...
...
@@ -27,12 +30,14 @@
import
WaitReceive
from
'./item-tabs/ItemTabs'
import
WaitScan
from
'./sample-tabs/SampleTabs'
import
OriginalRecordView
from
'./OriginalRecordView'
import
ItemReportView
from
'./ItemReportView'
export
default
{
components
:
{
WaitReceive
,
WaitScan
,
OriginalRecordView
OriginalRecordView
,
ItemReportView
},
data
()
{
return
{
...
...
@@ -85,6 +90,8 @@ export default {
this
.
$refs
.
waitReceiveModal
.
_clearTable
()
this
.
$refs
.
waitScanModal
.
_open
(
this
.
entrustId
)
// this._waitSend()
}
else
{
this
.
$refs
.
reportModal
.
_open
(
this
.
entrustId
)
}
},
_search
()
{
...
...
pages/soil-test-manage/test-input/item-tabs/CreateItemReport.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<Modal
v-model=
"showBatchModal"
v-drag
width=
"900"
>
<p
slot=
"header"
>
原始记录填写
</p>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--样品信息-->
<!--报告模板-->
<Col
span=
"24"
>
<ItemReportTemplate
ref=
"reportTemplate"
@
on-result-change=
"_templateResultChange"
></ItemReportTemplate>
</Col>
</Row>
</div>
</div>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerBtn"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
<!--生成报告的进度条-->
</div>
</
template
>
<
script
>
import
ItemReportTemplate
from
'./ItemReportTemplate'
/**
* 样品列表--生成报告或者选择模板生成报告
*/
export
default
{
components
:
{
ItemReportTemplate
},
data
()
{
return
{
selectIds
:
[],
getPage
:
{
records
:
[]
},
showBatchModal
:
false
,
isLoading
:
false
,
footerBtn
:
[
{
type
:
''
,
id
:
''
,
name
:
'取消'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'确定'
}
],
pageColumns
:
[
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
150
},
{
title
:
'证书编号'
,
key
:
'certificate'
,
width
:
150
}
],
reportModelId
:
''
,
backData
:
{},
// 样品数据
tableData
:
[],
// 签发日期
issueDateTemp
:
''
,
issueDate
:
''
,
showIssueModal
:
false
}
},
methods
:
{
_open
()
{
this
.
getPage
.
records
=
[]
this
.
backData
=
{}
this
.
showBatchModal
=
true
this
.
_reportTemplate
()
this
.
reportModelId
=
''
this
.
isLoading
=
false
},
// 报告模板
_reportTemplate
()
{
this
.
$refs
.
reportTemplate
.
_open
()
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'确定'
:
this
.
_ok
()
break
case
'取消'
:
this
.
showBatchModal
=
false
break
}
},
_templateResultChange
(
selectData
)
{
this
.
backData
=
selectData
[
0
]
},
_issueChange
(
data
)
{
if
(
data
)
{
this
.
issueDate
=
data
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
if
(
!
this
.
backData
.
name
)
{
this
.
$Message
.
warning
(
'请选择一个原始记录模板!'
)
// this._hideLoading()
}
else
{
this
.
$emit
(
'on-result-change'
,
this
.
backData
)
this
.
showBatchModal
=
false
}
},
_issueCancel
()
{
this
.
showIssueModal
=
false
},
// 选择时间ok
_issueOk
()
{
this
.
isLoading
=
true
this
.
showIssueModal
=
false
this
.
_createOk
()
},
// 生成报告
_createOk
()
{
const
obj
=
[]
for
(
let
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
)
{
obj
.
push
({
sampleId
:
this
.
tableData
[
i
].
id
,
reportSn
:
this
.
tableData
[
i
].
reportSn
,
issueDate
:
this
.
issueDate
})
}
this
.
$layxLoading
(
true
,
'数据验证中'
)
const
validateObj
=
{
sampleReports
:
obj
,
reportModelId
:
this
.
reportModelId
}
// 先进行验证
this
.
$store
.
dispatch
(
'FoodSampleReport/createReportValidate'
,
validateObj
)
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSampleReport
.
success
)
{
// 验证成功之后再建立连接,然后进行生成报告操作
// 建立websocket连接
const
currentTime
=
new
Date
().
getTime
()
this
.
$refs
.
progressModal
.
_open
(
this
.
tableData
.
length
,
currentTime
)
validateObj
.
seriesNo
=
currentTime
console
.
log
(
'生成报告的当前序列号,'
,
validateObj
.
seriesNo
)
this
.
$store
.
dispatch
(
'FoodSampleReport/createReport'
,
validateObj
)
.
then
(()
=>
{})
}
this
.
_hideLoading
()
this
.
isLoading
=
false
this
.
$layxLoading
(
false
)
})
},
_closeResult
()
{
this
.
showBatchModal
=
false
this
.
$emit
(
'on-result-change'
)
}
}
}
</
script
>
pages/soil-test-manage/test-input/item-tabs/CreateReport.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<Modal
v-model=
"showBatchModal"
v-drag
:mask-closable=
"false"
width=
"900"
>
<p
slot=
"header"
>
原始记录填写
</p>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--样品信息-->
<!--报告模板-->
<Col
span=
"24"
>
<ReportTemplate
ref=
"reportTemplate"
@
on-result-change=
"_templateResultChange"
></ReportTemplate>
</Col>
</Row>
</div>
</div>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerBtn"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
<!--生成报告的进度条-->
</div>
</
template
>
<
script
>
import
ReportTemplate
from
'./ReportTemplate'
/**
* 样品列表--生成报告或者选择模板生成报告
*/
export
default
{
components
:
{
ReportTemplate
},
data
()
{
return
{
selectIds
:
[],
getPage
:
{
records
:
[]
},
showBatchModal
:
false
,
isLoading
:
false
,
footerBtn
:
[
{
type
:
''
,
id
:
''
,
name
:
'取消'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'确定'
}
],
pageColumns
:
[
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
150
},
{
title
:
'证书编号'
,
key
:
'certificate'
,
width
:
150
}
],
reportModelId
:
''
,
backData
:
{},
// 样品数据
tableData
:
[],
// 签发日期
issueDateTemp
:
''
,
issueDate
:
''
,
showIssueModal
:
false
}
},
methods
:
{
_open
()
{
this
.
getPage
.
records
=
[]
this
.
backData
=
{}
this
.
showBatchModal
=
true
this
.
_reportTemplate
()
this
.
reportModelId
=
''
this
.
isLoading
=
false
},
// 报告模板
_reportTemplate
()
{
this
.
$refs
.
reportTemplate
.
_open
()
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'确定'
:
this
.
_ok
()
break
case
'取消'
:
this
.
showBatchModal
=
false
break
}
},
_templateResultChange
(
selectData
)
{
this
.
backData
=
selectData
[
0
]
},
_issueChange
(
data
)
{
if
(
data
)
{
this
.
issueDate
=
data
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
if
(
!
this
.
backData
.
name
)
{
this
.
$Message
.
warning
(
'请选择一个原始记录模板!'
)
// this._hideLoading()
}
else
{
this
.
$emit
(
'on-result-change'
,
this
.
backData
)
this
.
showBatchModal
=
false
}
},
_issueCancel
()
{
this
.
showIssueModal
=
false
},
// 选择时间ok
_issueOk
()
{
this
.
isLoading
=
true
this
.
showIssueModal
=
false
this
.
_createOk
()
},
// 生成报告
_createOk
()
{
const
obj
=
[]
for
(
let
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
)
{
obj
.
push
({
sampleId
:
this
.
tableData
[
i
].
id
,
reportSn
:
this
.
tableData
[
i
].
reportSn
,
issueDate
:
this
.
issueDate
})
}
this
.
$layxLoading
(
true
,
'数据验证中'
)
const
validateObj
=
{
sampleReports
:
obj
,
reportModelId
:
this
.
reportModelId
}
// 先进行验证
this
.
$store
.
dispatch
(
'FoodSampleReport/createReportValidate'
,
validateObj
)
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSampleReport
.
success
)
{
// 验证成功之后再建立连接,然后进行生成报告操作
// 建立websocket连接
const
currentTime
=
new
Date
().
getTime
()
this
.
$refs
.
progressModal
.
_open
(
this
.
tableData
.
length
,
currentTime
)
validateObj
.
seriesNo
=
currentTime
console
.
log
(
'生成报告的当前序列号,'
,
validateObj
.
seriesNo
)
this
.
$store
.
dispatch
(
'FoodSampleReport/createReport'
,
validateObj
)
.
then
(()
=>
{})
}
this
.
_hideLoading
()
this
.
isLoading
=
false
this
.
$layxLoading
(
false
)
})
},
_closeResult
()
{
this
.
showBatchModal
=
false
this
.
$emit
(
'on-result-change'
)
}
}
}
</
script
>
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
View file @
24f05cf4
...
...
@@ -6,21 +6,21 @@
<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>
<Input
v-model=
"formObj.name"
placeholder=
"请输入检测项目"
clearable
@
on-enter=
"_formSearch"
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 6px;
"
></btn-list>
<btn-list
class=
"contHide"
style=
"margin-bottom: 6px;"
@
on-result-change=
"_btnClick
"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:is
Radio=
"true"
:pageC
olumns=
"pageColumns"
:table-name=
"tableName"
:table
H
eight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:hide-checkbox=
"true"
select-data
>
<PTVXETable
ref=
"pageTable"
:is
-radio=
"true"
:page-c
olumns=
"pageColumns"
:table-name=
"tableName"
:table
-h
eight=
"tableHeight"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
:hide-checkbox=
"true"
select-data
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
...
...
@@ -35,23 +35,31 @@
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
<VXESettingCol
slot=
"setting"
:page
Columns=
"pageColumns"
:userC
olumns=
"userColumns"
@
on-result-change=
"_resetColumn"
:table-name=
"tableName
"
></VXESettingCol>
<VXESettingCol
slot=
"setting"
:page
-columns=
"pageColumns"
:user-c
olumns=
"userColumns"
:table-name=
"tableName"
@
on-result-change=
"_resetColumn
"
></VXESettingCol>
</PTVXETable>
</Col>
</Row>
<CreateItemReport
ref=
"createModal"
@
on-result-change=
"_certificateSelectExcelBack"
></CreateItemReport>
</div>
</template>
<
script
>
import
{
soilTest
}
from
'../../../../api'
import
{
soilSample
,
soilTest
}
from
'../../../../api'
import
CreateItemReport
from
'./CreateItemReport'
export
default
{
components
:
{},
components
:
{
CreateItemReport
},
data
()
{
return
{
currentComponent
:
''
,
formObj
:
{
name
:
undefined
},
formObjSample
:
{
name
:
undefined
,
entrustId
:
undefined
},
sampleIds
:
[],
itemName
:
''
,
tableName
:
'food-task-assign-item-left'
,
// 用户自己选中的列
userColumns
:
[],
...
...
@@ -60,7 +68,9 @@ export default {
{
key
:
'testBasis'
,
name
:
'检测依据'
,
placeholder
:
'请输入检测依据'
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'ios-book'
,
id
:
''
,
name
:
'生成项目报告'
}],
id
:
''
,
selectId
:
''
,
pageColumns
:
[
{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
},
{
title
:
'检测方法'
,
key
:
'testMethod'
,
width
:
140
},
...
...
@@ -93,6 +103,7 @@ export default {
},
_open
(
id
)
{
this
.
id
=
id
this
.
selectId
=
''
this
.
_page
()
},
_searchParams
()
{
...
...
@@ -116,21 +127,22 @@ export default {
console
.
log
(
msg
,
data
)
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodItem
.
page
this
.
_page
()
break
case
'selectData'
:
this
.
$emit
(
'on-result-change'
,
data
)
break
case
'singleSelect'
:
console
.
log
(
'data-----------------'
,
data
)
this
.
$emit
(
'on-result-change'
,
data
)
break
case
'iconClick'
:
this
.
$refs
.
pageTable
.
_radioChangeItem
(
data
.
rowData
)
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
case
'table-col'
:
// 用户选中的表格列
this
.
userColumns
=
data
break
}
},
_formSearch
()
{
...
...
@@ -143,15 +155,82 @@ export default {
break
}
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'生成项目报告'
:
// this.$emit('on-result-change', data)
this
.
_itemReportMake
(
data
)
break
}
})
},
_itemReportMake
(
data
)
{
this
.
itemName
=
data
.
name
this
.
_searchSampleId
(
this
.
id
,
data
.
name
)
// this.selectId = data.id
this
.
$refs
.
createModal
.
_open
()
},
_searchSampleId
:
async
function
(
id
,
name
)
{
Object
.
assign
(
this
.
formObjSample
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObjSample
.
entrustId
=
id
this
.
formObjSample
.
name
=
name
this
.
$refs
.
pageTable
.
_hideLoading
()
const
result
=
await
soilTest
.
pageExperimentTest
(
this
.
$serializeForm
(
this
.
formObjSample
)
)
if
(
result
)
{
console
.
log
(
result
)
this
.
sampleIds
=
[]
for
(
let
i
=
0
;
i
<
result
.
records
.
length
;
i
++
)
{
this
.
sampleIds
.
push
(
result
.
records
[
i
].
id
)
}
console
.
log
(
'右侧样品id'
,
this
.
sampleIds
)
}
},
_certificateSelectExcelBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_makeCodeExcel
(
data
)
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_makeCodeExcel
:
async
function
(
data
)
{
console
.
log
(
'左侧项目名称'
,
this
.
itemName
)
console
.
log
(
'右侧样品Id'
,
this
.
sampleIds
)
console
.
log
(
'报告信息'
,
data
)
console
.
log
(
'this.entrustId'
,
this
.
id
)
this
.
$refs
.
pageTable
.
_hideLoading
()
const
result
=
await
soilSample
.
saveExcelExpReport
({
entrustId
:
this
.
id
,
expName
:
encodeURI
(
this
.
itemName
),
ids
:
this
.
sampleIds
,
templateId
:
data
.
id
})
if
(
result
)
{
// await this._page()
if
(
result
===
null
||
result
===
undefined
)
{
this
.
$Message
.
warning
(
'证书编制失败,请联系管理员!'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
return
false
}
else
{
this
.
_viewReport
(
result
)
}
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
_autoAssign
()
{
console
.
log
(
'自动分配'
)
// this.$refs.autoAssignModal._open()
// this.$store.dispatch('FoodItem/autoAllotNum').then(() => {
// const num = this.$store.state.FoodItem.count
// if (num !== undefined) {
// this.$refs.refModal._open(num)
// }
// })
}
}
}
...
...
pages/soil-test-manage/test-input/item-tabs/ItemReportTemplate.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<Row>
<Col
span=
"24"
>
<Form
id=
"formId"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"模板名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.alias"
@
on-enter=
"_formSearch"
placeholder=
"请输入模板名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
style=
"margin-left: -10px"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<PTVXETableHeight
ref=
"pageTable"
:table-height=
"300"
:get-page=
"getPage"
:is-radio=
"true"
@
on-result-change=
"_tableResultChange"
select-data=
"true"
hide-checkbox
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</span>
<span
v-else-if=
"item.judged"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETableHeight>
</Col>
</Row>
</div>
</template>
<
script
>
import
{
soilAptitude
}
from
'../../../../api'
export
default
{
components
:
{},
data
()
{
return
{
tableHeight
:
'400'
,
pageColumns
:
[
{
title
:
'模板名称'
,
key
:
'alias'
,
width
:
220
},
{
title
:
'类别'
,
key
:
'classType'
,
width
:
140
},
{
title
:
'备注'
,
key
:
'remark'
}
],
getPage
:
{},
modalTitle
:
'报告模板'
,
sampleId
:
''
,
formObj
:
{
name
:
undefined
},
selectData
:
[]
}
},
methods
:
{
_tableResultChange
(
msg
,
data
)
{
console
.
log
(
msg
)
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'changeSize'
:
this
.
_page
()
break
case
'selectData'
:
this
.
selectData
=
data
break
case
'singleSelect'
:
this
.
selectData
=
[
data
]
this
.
$emit
(
'on-result-change'
,
this
.
selectData
)
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
}
},
_open
(
sampleId
)
{
this
.
sampleId
=
sampleId
||
''
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
expReportTemplatePage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-input/item-tabs/ItemRightList.vue
View file @
24f05cf4
...
...
@@ -6,21 +6,21 @@
<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"
v-model=
"formObj.sampleCode"
name=
"sampleCode"
placeholder=
"请输入试样编号"
clearable
></Input>
<Input
v-model=
"formObj.sampleCode"
name=
"sampleCode"
placeholder=
"请输入试样编号"
clearable
@
on-enter=
"_formSearch"
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"envPro?btnPro:btn"
@
on-result-change=
"_btnClick"
class=
"contHide
"
></btn-list>
<btn-list
:msg=
"envPro?btnPro:btn"
class=
"contHide"
@
on-result-change=
"_btnClick
"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:page
Columns=
"pageColumns"
:tableH
eight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:icon-msg=
"iconMsg"
:table-name=
"tableName"
is-task
select-data
>
<PTVXETable
ref=
"pageTable"
:page
-columns=
"pageColumns"
:table-h
eight=
"tableHeight"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
:table-name=
"tableName"
is-task
select-data
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
...
...
@@ -42,8 +42,8 @@
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
<VXESettingCol
slot=
"setting"
:page
Columns=
"pageColumns"
:userC
olumns=
"userColumns"
@
on-result-change=
"_resetColumn"
:table-name=
"tableName
"
></VXESettingCol>
<VXESettingCol
slot=
"setting"
:page
-columns=
"pageColumns"
:user-c
olumns=
"userColumns"
:table-name=
"tableName"
@
on-result-change=
"_resetColumn
"
></VXESettingCol>
</PTVXETable>
</Col>
</Row>
...
...
@@ -55,11 +55,12 @@
<CollectManage
ref=
"collectModal"
@
on-result-change=
"_page"
></CollectManage>
<CollectFileManage
ref=
"collectFileModal"
@
on-result-change=
"_page"
></CollectFileManage>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
<CreateReport
ref=
"createModal"
@
on-result-change=
"_certificateSelectExcelBack"
></CreateReport>
</div>
</template>
<
script
>
import
Global
from
'../../../../api/config'
import
{
soilTest
}
from
'../../../../api'
import
{
soil
Report
,
soilSample
,
soil
Test
}
from
'../../../../api'
import
AssignPerson
from
'../../../../components/user-info-single/assignPerson'
import
SelectOriTempRecord
from
'../SelectOriTempRecord'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
...
...
@@ -68,6 +69,7 @@ import SelEquip from '../../../../components/select-equip/SelEquip'
import
EquipManage
from
'../EquipManage'
import
CollectManage
from
'../CollectManage'
import
CollectFileManage
from
'../CollectFileManage'
import
CreateReport
from
'./CreateReport'
export
default
{
components
:
{
AssignPerson
,
...
...
@@ -77,7 +79,8 @@ export default {
SelEquip
,
EquipManage
,
CollectManage
,
CollectFileManage
CollectFileManage
,
CreateReport
},
data
()
{
return
{
...
...
@@ -117,6 +120,7 @@ export default {
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'原始记录填写'
},
{
type
:
'success'
,
id
:
''
,
name
:
'完成提交'
},
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
}
],
...
...
@@ -127,6 +131,7 @@ export default {
],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
// { type: 'md-eye', id: '', name: '原始记录查看/编辑' },
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
},
{
type
:
'ios-bookmarks'
,
id
:
''
,
name
:
'查看采集数据'
},
{
type
:
'ios-browsers'
,
id
:
''
,
name
:
'查看采集文件'
},
...
...
@@ -181,19 +186,23 @@ export default {
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'查看原始记录'
:
console
.
log
(
data
)
if
(
data
.
recordId
)
{
this
.
$refs
.
editModal
.
_openWithType
(
data
.
recordId
,
'ENVTESTMAKEEDIT'
)
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
this
.
_reportView
(
data
)
// console.log(data)
// if (data.recorded === '是') {
// this.$refs.editModal._openWithType(
// data.recordId,
// 'ENVTESTMAKEEDIT'
// )
// } else {
// this.$Message.warning('未填写原始记录')
// }
break
case
'查看指标'
:
this
.
_indexManage
(
data
)
break
case
'原始记录查看/编辑'
:
this
.
_reportMakeLook
(
data
)
break
case
'查看采集数据'
:
this
.
_collectManage
(
data
)
break
...
...
@@ -206,6 +215,70 @@ export default {
}
})
},
_reportView
(
data
)
{
if
(
data
.
recorded
===
'是'
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
$refs
.
editModal
.
_openWithType
(
data
.
recordId
,
'ENVTESTMAKEEDIT'
)
}
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
getExcelOriginalRecord
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_certificateSelectExcelBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_makeCodeExcel
(
data
)
}
else
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
// this._appendOriginalRecord()
}
}
},
_makeCertificateExcelByTemp
(
data
)
{
// this.$refs.SelectOriTempRecordExcel._open(data.id, data)
this
.
$refs
.
createModal
.
_open
()
},
_makeCodeExcel
:
async
function
(
data
)
{
console
.
log
(
this
.
selectIds
)
this
.
$refs
.
pageTable
.
_hideLoading
()
const
result
=
await
soilSample
.
saveExcelOriginalRecord
({
ids
:
this
.
selectIds
,
id
:
data
.
id
})
if
(
result
)
{
await
this
.
_page
()
if
(
result
===
null
||
result
===
undefined
)
{
this
.
$Message
.
warning
(
'证书编制失败,请联系管理员!'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
return
false
}
else
{
this
.
$emit
(
'on-result-change'
)
this
.
_viewReport
(
result
)
}
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
_collectManage
(
data
)
{
this
.
$refs
.
collectModal
.
_open
(
data
)
},
...
...
@@ -401,6 +474,9 @@ export default {
case
'填写原始记录'
:
this
.
_addRecord
()
break
case
'原始记录填写'
:
this
.
_makeCertificateExcelByTemp
()
break
case
'完成提交'
:
this
.
_submitItem
(
this
.
selectData
)
break
...
...
pages/soil-test-manage/test-input/item-tabs/ItemTabs.vue
View file @
24f05cf4
...
...
@@ -37,7 +37,6 @@ export default {
},
_open
(
id
)
{
this
.
id
=
id
console
.
log
(
id
)
this
.
$refs
.
leftModal
.
_open
(
this
.
id
)
// this.$refs.rightModal._getColumn()
},
...
...
pages/soil-test-manage/test-input/item-tabs/ReportTemplate.vue
0 → 100644
View file @
24f05cf4
<
template
>
<div>
<Row>
<Col
span=
"24"
>
<Form
id=
"formId"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"模板名称:"
class=
"search-item"
>
<Input
v-model=
"formObj.alias"
@
on-enter=
"_formSearch"
placeholder=
"请输入模板名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
style=
"margin-left: -10px"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<PTVXETableHeight
ref=
"pageTable"
:table-height=
"300"
:get-page=
"getPage"
:is-radio=
"true"
@
on-result-change=
"_tableResultChange"
select-data=
"true"
hide-checkbox
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.dateTime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</span>
<span
v-else-if=
"item.judged"
>
{{
scope
.
row
[
item
.
key
]
===
1
?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETableHeight>
</Col>
</Row>
</div>
</template>
<
script
>
import
{
soilAptitude
}
from
'../../../../api'
export
default
{
components
:
{},
data
()
{
return
{
tableHeight
:
'400'
,
pageColumns
:
[
{
title
:
'模板名称'
,
key
:
'alias'
,
width
:
220
},
{
title
:
'类别'
,
key
:
'classType'
,
width
:
140
},
{
title
:
'备注'
,
key
:
'remark'
}
],
getPage
:
{},
modalTitle
:
'报告模板'
,
sampleId
:
''
,
formObj
:
{
name
:
undefined
},
selectData
:
[]
}
},
methods
:
{
_tableResultChange
(
msg
,
data
)
{
console
.
log
(
msg
)
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'changeSize'
:
this
.
_page
()
break
case
'selectData'
:
this
.
selectData
=
data
break
case
'singleSelect'
:
this
.
selectData
=
[
data
]
this
.
$emit
(
'on-result-change'
,
this
.
selectData
)
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
}
},
_open
(
sampleId
)
{
this
.
sampleId
=
sampleId
||
''
this
.
_page
()
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
originalTemplatePage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-input/sample-tabs/SampleRightList.vue
View file @
24f05cf4
...
...
@@ -56,17 +56,19 @@
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
<EquipManage
ref=
"equipModal"
@
on-result-change=
"_page"
></EquipManage>
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<CreateReport
ref=
"createModal"
@
on-result-change=
"_certificateSelectExcelBack"
></CreateReport>
</div>
</template>
<
script
>
import
Global
from
'../../../../api/config'
import
{
soilTest
}
from
'../../../../api'
import
{
soil
Report
,
soilSample
,
soil
Test
}
from
'../../../../api'
import
AssignPerson
from
'../../../../components/user-info-single/assignPerson'
import
SelectOriTempRecord
from
'../SelectOriTempRecord'
import
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
IndexManage
from
'../IndexManage'
import
EquipManage
from
'../EquipManage'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
import
CreateReport
from
'../item-tabs/CreateReport'
export
default
{
components
:
{
AssignPerson
,
...
...
@@ -74,7 +76,8 @@ export default {
SelEquip
,
IndexManage
,
EquipManage
,
OriginalRecordEdit
OriginalRecordEdit
,
CreateReport
},
data
()
{
return
{
...
...
@@ -107,15 +110,9 @@ export default {
],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'原始记录填写'
},
{
type
:
'success'
,
id
:
''
,
name
:
'完成提交'
},
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
},
{
type
:
''
,
id
:
'food-task-assign-adjust-group'
,
name
:
'调整分组'
},
{
type
:
''
,
id
:
'food-task-assign-plan-date'
,
name
:
'设置计划完成时间'
},
{
type
:
''
,
id
:
'food-task-assign-maintain-info'
,
name
:
'信息维护'
}
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
}
],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
...
...
@@ -318,6 +315,9 @@ export default {
case
'填写原始记录'
:
this
.
_addRecord
()
break
case
'原始记录填写'
:
this
.
_makeCertificateExcelByTemp
()
break
case
'完成提交'
:
this
.
_submitItem
(
this
.
selectData
)
break
...
...
@@ -349,6 +349,40 @@ export default {
break
}
},
_makeCertificateExcelByTemp
(
data
)
{
// this.$refs.SelectOriTempRecordExcel._open(data.id, data)
this
.
$refs
.
createModal
.
_open
()
},
_certificateSelectExcelBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_makeCodeExcel
(
data
)
}
else
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
// this._appendOriginalRecord()
}
}
},
_makeCodeExcel
:
async
function
(
data
)
{
console
.
log
(
this
.
selectIds
)
console
.
log
(
'----dddd---'
,
data
)
this
.
$refs
.
pageTable
.
_hideLoading
()
const
result
=
await
soilSample
.
generateExcelReport
(
data
)
if
(
result
)
{
await
this
.
_page
()
if
(
result
===
null
||
result
===
undefined
)
{
this
.
$Message
.
warning
(
'证书编制失败,请联系管理员!'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
return
false
}
else
{
this
.
$emit
(
'on-result-change'
)
this
.
_viewReport
(
result
)
}
}
},
_selectEquipment
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
...
...
@@ -488,14 +522,15 @@ export default {
switch
(
res
)
{
case
'查看原始记录'
:
console
.
log
(
data
)
if
(
data
.
recordId
)
{
this
.
$refs
.
editModal
.
_openWithType
(
data
.
recordId
,
'ENVTESTMAKEEDIT'
)
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
this
.
_reportView
(
data
)
// if (data.recordId) {
// this.$refs.editModal._openWithType(
// data.recordId,
// 'ENVTESTMAKEEDIT'
// )
// } else {
// this.$Message.warning('未填写原始记录')
// }
break
case
'查看指标'
:
this
.
_indexManage
(
data
)
...
...
@@ -506,6 +541,34 @@ export default {
}
})
},
_reportView
(
data
)
{
if
(
data
.
recorded
===
'是'
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
$refs
.
editModal
.
_openWithType
(
data
.
recordId
,
'ENVTESTMAKEEDIT'
)
}
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
getExcelOriginalRecord
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
_indexManage
(
data
)
{
this
.
$refs
.
indexModal
.
_open
(
data
)
},
...
...
router/soil-routes.js
View file @
24f05cf4
...
...
@@ -35,6 +35,7 @@ import ClientLocationSearch from '../pages/soil-statistics/client_location/Clien
import
FoodReportManageIndex
from
'../pages/soil-report-manage/report-manage/FoodReportManageIndex'
import
DataConsult
from
'../pages/soil-test-manage/test-data-consult/DataConsult'
import
SoilRecordTemplate
from
'../pages/soil-record-template-manage/SoilRecordTemplate'
import
SoilItemReportTemplate
from
'../pages/soil-report-manage/soil-item-report-template/SoilItemReportTemplate'
import
Blank
from
'~/pages/blank'
export
default
[
{
...
...
@@ -182,6 +183,11 @@ export default [
path
:
'report_manage'
,
component
:
FoodReportManageIndex
,
meta
:
{
title
:
'报告档案'
}
},
{
path
:
'item_report'
,
component
:
SoilItemReportTemplate
,
meta
:
{
title
:
'试验项目报告模板'
}
}
]
},
...
...
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