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
bcb45755
Commit
bcb45755
authored
Jan 19, 2021
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
土工试验Lims
parent
12001bd8
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1813 additions
and
298 deletions
+1813
-298
soil-aptitude.js
api/soil/soil-aptitude.js
+8
-0
soil-sample.js
api/soil/soil-sample.js
+4
-0
EntrustRegisterEdit.vue
pages/meter-entrust/entrust-register/EntrustRegisterEdit.vue
+26
-35
ConfigTemplate.vue
...ample-manage/open-soil-template-manage/ConfigTemplate.vue
+169
-0
ConfigTemplateEdit.vue
...e-manage/open-soil-template-manage/ConfigTemplateEdit.vue
+271
-0
OpenSoilTemplate.vue
...ple-manage/open-soil-template-manage/OpenSoilTemplate.vue
+262
-0
OpenSoilTemplateEdit.vue
...manage/open-soil-template-manage/OpenSoilTemplateEdit.vue
+169
-0
SoilRecordEdit.vue
...ample-manage/open-soil-template-manage/SoilRecordEdit.vue
+310
-0
SeniorSampleEdit.vue
...ple-alone-keep/entrust-sample-manage/SeniorSampleEdit.vue
+212
-0
WaitReceive.vue
...e/sample-alone-keep/entrust-sample-manage/WaitReceive.vue
+34
-241
CreateReport.vue
pages/soil-sample-manage/sample-preparation/CreateReport.vue
+162
-0
ReportTemplate.vue
.../soil-sample-manage/sample-preparation/ReportTemplate.vue
+107
-0
SamplePreparation.vue
...il-sample-manage/sample-preparation/SamplePreparation.vue
+73
-21
soil-routes.js
router/soil-routes.js
+6
-1
No files found.
api/soil/soil-aptitude.js
View file @
bcb45755
...
@@ -24,6 +24,10 @@ export default {
...
@@ -24,6 +24,10 @@ export default {
http
.
delete
(
'soil/v1/aptitude_exp/?ids='
+
data
).
then
(
res
=>
res
),
http
.
delete
(
'soil/v1/aptitude_exp/?ids='
+
data
).
then
(
res
=>
res
),
// 保存
// 保存
save
:
data
=>
http
.
post
(
'soil/v1/aptitude_exp/'
,
data
).
then
(
res
=>
res
),
save
:
data
=>
http
.
post
(
'soil/v1/aptitude_exp/'
,
data
).
then
(
res
=>
res
),
editSeniorSample
:
data
=>
http
.
post
(
'soil/v1/sample/edit_senior_sample?ids='
+
data
.
ids
,
data
.
obj
)
.
then
(
res
=>
res
),
edit
:
data
=>
edit
:
data
=>
http
.
put
(
'soil/v1/aptitude_exp/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
http
.
put
(
'soil/v1/aptitude_exp/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
// 指标页面
// 指标页面
...
@@ -43,6 +47,10 @@ export default {
...
@@ -43,6 +47,10 @@ export default {
http
.
post
(
'soil/v1/standard/list'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/standard/list'
,
data
).
then
(
res
=>
res
),
originalTemplatePage
:
data
=>
originalTemplatePage
:
data
=>
http
.
post
(
'soil/v1/original_template/page'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/original_template/page'
,
data
).
then
(
res
=>
res
),
pageOpenSoil
:
data
=>
http
.
post
(
'soil/v1/original_template/page_open_soil'
,
data
)
.
then
(
res
=>
res
),
originalTemplateDeleteById
:
data
=>
originalTemplateDeleteById
:
data
=>
http
.
delete
(
'soil/v1/original_template/?ids='
+
data
).
then
(
res
=>
res
),
http
.
delete
(
'soil/v1/original_template/?ids='
+
data
).
then
(
res
=>
res
),
originalTemplateEdit
:
data
=>
originalTemplateEdit
:
data
=>
...
...
api/soil/soil-sample.js
View file @
bcb45755
...
@@ -208,6 +208,10 @@ export default {
...
@@ -208,6 +208,10 @@ export default {
http
http
.
post
(
'soil/v1/experiment/save_excel_original_record'
,
data
)
.
post
(
'soil/v1/experiment/save_excel_original_record'
,
data
)
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
saveExcelOpenSoilRecord
:
data
=>
http
.
post
(
'soil/v1/experiment/save_excel_open_soil_record'
,
data
)
.
then
(
res
=>
res
),
// saveExcelExpReport: data =>
// saveExcelExpReport: data =>
// http
// http
// .post(
// .post(
...
...
pages/meter-entrust/entrust-register/EntrustRegisterEdit.vue
View file @
bcb45755
...
@@ -6,23 +6,22 @@
...
@@ -6,23 +6,22 @@
<Form
id=
"MeterSendTestEdit"
ref=
"formObj"
:model=
"formObj"
:label-width=
"90"
inline
>
<Form
id=
"MeterSendTestEdit"
ref=
"formObj"
:model=
"formObj"
:label-width=
"90"
inline
>
<Form-item
label=
"委托商"
prop=
"client"
class=
"width-48"
>
<Form-item
label=
"委托商"
prop=
"client"
class=
"width-48"
>
<AutoComplete
ref=
"autoInput"
v-model=
"formObj.client"
:down-data=
"customerData"
<AutoComplete
ref=
"autoInput"
v-model=
"formObj.client"
:down-data=
"customerData"
@
on-result-change=
"_cusNameChange"
name=
"client"
placeholder=
"请输入或选择委托单位
"
name=
"client"
placeholder=
"请输入或选择委托单位"
@
on-result-change=
"_cusNameChange
"
></AutoComplete>
></AutoComplete>
</Form-item>
</Form-item>
<Form-item
label=
"委托日期:"
prop=
"entrustDate"
class=
"width-48"
>
<Form-item
label=
"委托日期:"
prop=
"entrustDate"
class=
"width-48"
>
<Date-picker
v-model=
"formObj.entrustDate"
@
on-change=
"_ctimeChange"
type=
"date"
split-panels
style=
"width:100%;
"
<Date-picker
v-model=
"formObj.entrustDate"
type=
"date"
split-panels
style=
"width:100%;"
placeholder=
"请选择委托日期
"
placeholder=
"请选择委托日期"
name=
"entrustDat
e"
></Date-picker>
name=
"entrustDate"
@
on-change=
"_ctimeChang
e"
></Date-picker>
</Form-item>
</Form-item>
<Form-item
label=
"项目名称"
prop=
"projectName"
class=
"width-48"
>
<Form-item
label=
"项目名称"
prop=
"projectName"
class=
"width-48"
>
<AutoComplete
ref=
"autoInput"
v-model=
"formObj.projectName"
:down-data=
"projectData"
<AutoComplete
ref=
"autoInput"
v-model=
"formObj.projectName"
:down-data=
"projectData"
@
on-result-change=
"_projectChange"
name=
"projectName"
placeholder=
"请输入或选择项目名称
"
name=
"projectName"
placeholder=
"请输入或选择项目名称"
@
on-result-change=
"_projectChange
"
></AutoComplete>
></AutoComplete>
</Form-item>
</Form-item>
<Form-item
label=
"项目负责人"
prop=
"projectLeader"
class=
"width-48"
>
<Form-item
label=
"项目负责人"
prop=
"projectLeader"
class=
"width-48"
>
<AutoComplete
ref=
"autoInput"
v-model=
"formObj.projectLeader"
:down-data=
"projectLeaderData"
<AutoComplete
ref=
"autoInput"
v-model=
"formObj.projectLeader"
:down-data=
"projectLeaderData"
@
on-result-change=
"_projectLeaderChange"
show-key=
"realname"
name=
"projectLeader"
placeholder=
"请输入或选择项目负责人
"
show-key=
"realname"
name=
"projectLeader"
placeholder=
"请输入或选择项目负责人"
@
on-result-change=
"_projectLeaderChange
"
></AutoComplete>
></AutoComplete>
<!--
<Input
v-model=
"formObj.projectLeader"
name=
"projectLeader"
placeholder=
"请输入项目负责人"
/>
-->
</Form-item>
</Form-item>
<Form-item
label=
"钻孔位置"
prop=
"boreholeLocation"
class=
"width-48"
>
<Form-item
label=
"钻孔位置"
prop=
"boreholeLocation"
class=
"width-48"
>
<Input
v-model=
"formObj.boreholeLocation"
name=
"boreholeLocation"
placeholder=
"请输入钻孔位置"
/>
<Input
v-model=
"formObj.boreholeLocation"
name=
"boreholeLocation"
placeholder=
"请输入钻孔位置"
/>
...
@@ -37,23 +36,23 @@
...
@@ -37,23 +36,23 @@
<Input
v-model=
"formObj.latitude"
name=
"latitude"
placeholder=
"请输入纬度"
/>
<Input
v-model=
"formObj.latitude"
name=
"latitude"
placeholder=
"请输入纬度"
/>
</Form-item>
</Form-item>
<Form-item
label=
"水深(米)"
prop=
"waterDepth"
class=
"width-48"
>
<Form-item
label=
"水深(米)"
prop=
"waterDepth"
class=
"width-48"
>
<Input
v-model=
"formObj.waterDepth"
@
keydown
.
native=
"channelInputLimit"
type=
"number"
name=
"waterDepth"
placeholder=
"请输入深度
"
/>
<Input
v-model=
"formObj.waterDepth"
type=
"number"
name=
"waterDepth"
placeholder=
"请输入深度"
@
keydown
.
native=
"channelInputLimit
"
/>
</Form-item>
</Form-item>
<Form-item
label=
"平均容重"
prop=
"projectNo"
class=
"width-48"
>
<Form-item
label=
"平均容重"
prop=
"projectNo"
class=
"width-48"
>
<Input
v-model=
"formObj.projectNo"
name=
"projectNo"
placeholder=
"请输入平均容重"
/>
<Input
v-model=
"formObj.projectNo"
name=
"projectNo"
placeholder=
"请输入平均容重"
/>
</Form-item>
</Form-item>
<Form-item
@
click
.
native=
"_selectPerson"
label=
"制表人"
prop=
"tabulater"
class=
"width-48
"
>
<Form-item
label=
"制表人"
prop=
"tabulater"
class=
"width-48"
@
click
.
native=
"_selectPerson
"
>
<Input
v-model=
"formObj.tabulater"
name=
"tabulater"
placeholder=
"请输入名称"
/>
<Input
v-model=
"formObj.tabulater"
name=
"tabulater"
placeholder=
"请输入名称"
/>
</Form-item>
</Form-item>
<Form-item
label=
"制单日期:"
prop=
"tabulateDate"
class=
"width-48"
>
<Form-item
label=
"制单日期:"
prop=
"tabulateDate"
class=
"width-48"
>
<Date-picker
v-model=
"formObj.tabulateDate"
@
on-change=
"_tabulateChange"
name=
"tabulateDate"
type=
"date"
split-panels
style=
"width:100%;
"
<Date-picker
v-model=
"formObj.tabulateDate"
name=
"tabulateDate"
type=
"date"
split-panels
style=
"width:100%;"
placeholder=
"请选择委托日期
"
placeholder=
"请选择委托日期
"
></Date-picker>
@
on-change=
"_tabulateChange
"
></Date-picker>
</Form-item>
</Form-item>
<Form-item
label=
"检验类别:"
prop=
"testType"
class=
"width-48"
>
<Form-item
label=
"检验类别:"
prop=
"testType"
class=
"width-48"
>
<el-select
@
change=
"typeChange"
v-model=
"formObj.testType"
name=
"testType"
placeholder=
"请选择"
<el-select
v-model=
"formObj.testType"
name=
"testType"
placeholder=
"请选择"
size=
"small"
size=
"small"
style=
"width:100%"
style=
"width:100%"
clearable
>
clearable
@
change=
"typeChange"
>
<el-option
<el-option
v-for=
"item in typeoptions"
v-for=
"item in typeoptions"
:key=
"item.name"
:key=
"item.name"
...
@@ -65,8 +64,8 @@
...
@@ -65,8 +64,8 @@
</Form>
</Form>
</div>
</div>
<div
style=
"margin-bottom: 10px;"
>
<div
style=
"margin-bottom: 10px;"
>
<btn-list
:msg=
"edit?btnEdit:btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick
"
<btn-list
:msg=
"edit?btnEdit:btn"
:open=
"searchOpen"
class=
"contHide
"
class=
"contHide
"
></btn-list>
@
on-result-change=
"_btnClick
"
></btn-list>
</div>
</div>
<div>
<div>
<PTVXETable
<PTVXETable
...
@@ -75,7 +74,7 @@
...
@@ -75,7 +74,7 @@
:table-height=
"500"
:table-height=
"500"
:get-page=
"getPage"
:get-page=
"getPage"
:icon-msg=
"iconMsg"
:icon-msg=
"iconMsg"
:hide
P
age =
true
:hide
-p
age =
true
@
on-result-change=
"_tableResultChange"
>
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
<vxe-table-column
v-for=
"item in pageColumns"
v-for=
"item in pageColumns"
...
@@ -97,13 +96,13 @@
...
@@ -97,13 +96,13 @@
></el-input>
></el-input>
</div>
</div>
<div
v-if=
"item.key==='samplePack'"
@
click
.
stop=
"_handleRow(scope)"
>
<div
v-if=
"item.key==='samplePack'"
@
click
.
stop=
"_handleRow(scope)"
>
<AutoComplete
v-model=
"scope.row.samplePack"
:down
D
ata=
"packList"
<AutoComplete
v-model=
"scope.row.samplePack"
:down
-d
ata=
"packList"
@
on-result-change=
"_packChange"
name=
"samplePack"
placeholder=
"请输入或选择包装类型
"
name=
"samplePack"
placeholder=
"请输入或选择包装类型"
@
on-result-change=
"_packChange
"
></AutoComplete>
></AutoComplete>
</div>
</div>
<div
v-if=
"item.key==='sampleDescribe'"
@
click
.
stop=
"_handleRow(scope)"
>
<div
v-if=
"item.key==='sampleDescribe'"
@
click
.
stop=
"_handleRow(scope)"
>
<AutoComplete
v-model=
"scope.row.sampleDescribe"
:down
D
ata=
"soilList"
<AutoComplete
v-model=
"scope.row.sampleDescribe"
:down
-d
ata=
"soilList"
@
on-result-change=
"_soilChange"
name=
"sampleDescribe"
placeholder=
"请输入或选择土质描述
"
name=
"sampleDescribe"
placeholder=
"请输入或选择土质描述"
@
on-result-change=
"_soilChange
"
></AutoComplete>
></AutoComplete>
</div>
</div>
<div
v-else-if=
"item.key==='experiments'"
@
click
.
stop=
"_handleRow(scope)"
>
<div
v-else-if=
"item.key==='experiments'"
@
click
.
stop=
"_handleRow(scope)"
>
...
@@ -118,8 +117,8 @@
...
@@ -118,8 +117,8 @@
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</div>
</Modal>
</Modal>
<importModal
ref=
"importModal"
@
on-result-change=
"_inputBack"
aptitude-item
></importModal>
<importModal
ref=
"importModal"
aptitude-item
@
on-result-change=
"_inputBack"
></importModal>
<SampleItemSelect
ref=
"sampleItemSelectModal"
@
on-result-change=
"_itemImportBack"
is-change
/>
<SampleItemSelect
ref=
"sampleItemSelectModal"
is-change
@
on-result-change=
"_itemImportBack"
/>
<assignPerson
ref=
"userModal"
@
on-result-change=
"_userResult"
></assignPerson>
<assignPerson
ref=
"userModal"
@
on-result-change=
"_userResult"
></assignPerson>
<SampleItemRemove
ref=
"sampleItemRemove"
@
on-result-change =
'_removeItemBack'
></SampleItemRemove>
<SampleItemRemove
ref=
"sampleItemRemove"
@
on-result-change =
'_removeItemBack'
></SampleItemRemove>
<SampleItemEdit
ref=
"sampleItemEdit"
@
on-result-change =
'_removeItemBack'
></SampleItemEdit>
<SampleItemEdit
ref=
"sampleItemEdit"
@
on-result-change =
'_removeItemBack'
></SampleItemEdit>
...
@@ -315,10 +314,14 @@ export default {
...
@@ -315,10 +314,14 @@ export default {
_getLeaderList
:
async
function
()
{
_getLeaderList
:
async
function
()
{
const
result
=
await
soilSample
.
getUserList
()
const
result
=
await
soilSample
.
getUserList
()
if
(
result
)
{
if
(
result
)
{
this
.
projectLeaderData
=
result
.
records
for
(
let
i
=
0
;
i
<
result
.
records
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
result
.
records
.
length
;
i
++
)
{
console
.
log
(
'---records---'
,
result
.
records
[
i
])
result
.
records
[
i
].
realname
=
result
.
records
[
i
].
realname
+
result
.
records
[
i
].
mobile
this
.
projectLeaderName
.
push
(
result
.
records
[
i
].
realname
)
this
.
projectLeaderName
.
push
(
result
.
records
[
i
].
realname
)
console
.
log
(
'---this.projectLeaderName--'
,
this
.
projectLeaderName
)
}
}
this
.
projectLeaderData
=
result
.
records
}
}
},
},
_projectLeaderChange
(
msg
,
data
)
{
_projectLeaderChange
(
msg
,
data
)
{
...
@@ -850,18 +853,6 @@ export default {
...
@@ -850,18 +853,6 @@ export default {
this
.
formObj
.
tabulateDate
=
new
Date
(
formObj
.
tabulateDate
)
this
.
formObj
.
tabulateDate
=
new
Date
(
formObj
.
tabulateDate
)
}
}
},
},
_showAddress
(
formObj
)
{
this
.
testedCityData
=
[]
if
(
formObj
.
province
!==
undefined
&&
formObj
.
city
!==
undefined
&&
formObj
.
county
!==
undefined
)
{
this
.
testedCityData
.
push
(
formObj
.
province
)
this
.
testedCityData
.
push
(
formObj
.
city
)
this
.
testedCityData
.
push
(
formObj
.
county
)
}
},
_getList
:
async
function
()
{
_getList
:
async
function
()
{
const
result
=
await
meterEntrust
.
pageList
()
const
result
=
await
meterEntrust
.
pageList
()
const
list
=
[]
const
list
=
[]
...
...
pages/soil-sample-manage/open-soil-template-manage/ConfigTemplate.vue
0 → 100644
View file @
bcb45755
<
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-sample-manage/open-soil-template-manage/ConfigTemplateEdit.vue
0 → 100644
View file @
bcb45755
<
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"
>
<Select
v-model=
"formObj.itemed"
@
change=
"_optionChange"
placeholder=
"请选择"
>
<Option
v-for=
"(item,index) in options"
:key=
"index"
:label=
"item.value"
:value=
"index"
/>
</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-sample-manage/open-soil-template-manage/OpenSoilTemplate.vue
0 → 100644
View file @
bcb45755
<
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.name"
@
on-enter=
"_formSearch"
name=
"name"
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
'./OpenSoilTemplateEdit'
import
SoilRecordEdit
from
'./SoilRecordEdit'
import
ConfigTemplate
from
'./ConfigTemplate'
export
default
{
components
:
{
SoilRecordTemplateEdit
,
SoilRecordEdit
,
ConfigTemplate
},
data
()
{
return
{
pageColumns
:
[
{
title
:
'开土记录模板名称'
,
key
:
'name'
},
{
title
:
'类别'
,
key
:
'classType'
,
width
:
120
},
{
title
:
'样品开始行'
,
key
:
'sampleBeginRow'
,
width
:
120
},
{
title
:
'样品合并数'
,
key
:
'sampleMergerNum'
,
width
:
120
},
{
title
:
'模板样品数'
,
key
:
'templateSampleNum'
,
width
:
120
},
{
title
:
'备注'
,
key
:
'remark'
}
],
formObj
:
{
name
:
undefined
},
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
:
'删除'
}
],
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
.
_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
.
_download
(
data
.
id
)
break
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
)
{
this
.
_viewReport
(
result
)
}
},
_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')
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
id
:
data
.
id
,
idType
:
12
,
isReport
:
4
})
}
},
_contHide
()
{
this
.
_page
()
},
_page
:
async
function
()
{
console
.
log
(
'page'
)
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
pageOpenSoil
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_editModal
()
{
this
.
$refs
.
editModal
.
_open
()
},
_reportEdit
(
data
)
{
this
.
$refs
.
reportEdit
.
_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
.
originalTemplateDeleteById
(
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-sample-manage/open-soil-template-manage/OpenSoilTemplateEdit.vue
0 → 100644
View file @
bcb45755
<
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"
>
<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>
</div>
</
template
>
<
script
>
/**
* 添加编辑
*/
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
:
'开土制备模板'
}
],
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/original_template/upload_open_soil_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/open-soil-template-manage/SoilRecordEdit.vue
0 → 100644
View file @
bcb45755
<
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%"
>
<!--
<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"
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"
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-item
label=
"多sheet模板"
prop=
"moreSheet"
style=
"width: 100%"
>
<Radio-group
v-model=
"formObj.moreSheet"
>
<Radio
v-for=
"item in sheetType"
:key=
"item.value"
:label=
"item.value"
>
{{
item
.
name
}}
</Radio>
</Radio-group>
</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
:
''
,
classType
:
''
,
remark
:
''
,
sampleBeginRow
:
''
,
sampleBeginCol
:
''
,
sampleMergerNum
:
''
,
templateSampleNum
:
''
,
moreSheet
:
0
,
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
:
'编辑'
,
formObj
:
defVal
,
ruleValidate
:
{
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'
}
]
},
sheetType
:
[{
value
:
1
,
name
:
'是'
},
{
value
:
0
,
name
:
'否'
}],
typeList
:
[
{
value
:
'力学'
},
{
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
.
originalTemplateEdit
({
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
.
formObj
.
moreSheet
=
data
.
moreSheet
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-sample-manage/sample-alone-keep/entrust-sample-manage/SeniorSampleEdit.vue
0 → 100644
View file @
bcb45755
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
width=
"900"
@
on-visible-change=
"_visibleChange"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
:id=
"formId"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"90"
inline
>
<div>
<Form-item
label=
"高级样品位置"
prop=
"receiveLocation"
style=
"width: 80%"
>
<Input
v-model=
"formObj.receiveLocation"
name=
"receiveLocation"
placeholder=
"请输入高级样品位置"
/>
</Form-item>
<Form-item
label=
"高级样品分类:"
prop=
"seniorType"
style=
"width: 80%"
>
<el-select
v-model=
"formObj.seniorType"
placeholder=
"请选择"
name=
"seniorType"
style=
"width: 100%"
>
<el-option
v-for=
"(item,index) in groupoptions"
:key=
"index"
:label=
"item.name"
:value=
"item.id"
/>
</el-select>
</Form-item>
<Form-item
label=
"接收时间:"
prop=
"testBasis"
style=
"width: 80%"
>
<Date-picker
v-model=
"formObj.receiveTime"
name=
"receiveTime"
type=
"date"
split-panels
style=
"width:100%;"
placeholder=
"请选择委托日期"
@
on-change=
"_tabulateChange"
></Date-picker>
</Form-item>
<Form-item
label=
"接收人"
prop=
"receiver"
class=
"width-48"
@
click
.
native=
"_selectPerson"
>
<Input
v-model=
"formObj.receiver"
name=
"receiver"
placeholder=
"请输入名称"
/>
</Form-item>
</div>
</Form>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
<assignPerson
ref=
"userModal"
@
on-result-change=
"_userResult"
></assignPerson>
</div>
</
template
>
<
script
>
/**
* 添加编辑环境资质项目表
*/
import
{
soilAptitude
,
soilEntrust
}
from
'../../../../api'
import
assignPerson
from
'../../../../components/user-info-single/assignPerson'
export
default
{
components
:
{
assignPerson
},
data
()
{
return
{
activeName
:
''
,
hideUserSel
:
true
,
id
:
''
,
modalTitle
:
''
,
formObj
:
{
receiveLocation
:
undefined
,
seniorType
:
undefined
,
receiveTime
:
undefined
,
receiver
:
undefined
,
receiverId
:
undefined
},
sampleIds
:
[],
ruleValidate
:
{
name
:
[]
},
options
:
[],
groupoptions
:
[],
showModal
:
false
,
footerList
:
[
{
name
:
'取消'
,
type
:
''
},
{
name
:
'保存'
,
type
:
'primary'
}
],
aptitude
:
''
,
// testBasisName: '',
formId
:
''
}
},
mounted
()
{
// 检测科室
// this._getUserGroup()
// 检测依据
// this._getTestBasisList()
// 资质
// this._getAptitudeList()
// this._getType()
},
methods
:
{
groupSelect
(
data
)
{
console
.
log
(
data
)
// this.formObj.groupId = da
},
_selGroup
(
data
)
{
console
.
log
(
data
)
this
.
formObj
.
groupId
=
data
},
_selectPerson
()
{
this
.
$refs
.
userModal
.
_openOrg
(
'选择制表人'
,
'itemTree'
)
},
_userResult
(
data
,
msg
)
{
this
.
$forceUpdate
()
this
.
formObj
.
receiver
=
data
.
realname
this
.
formObj
.
receiverId
=
data
.
id
},
_tabulateChange
(
data
)
{
this
.
formObj
.
receiveTime
=
data
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_open
(
sampleIds
)
{
this
.
formObj
.
receiveLocation
=
undefined
this
.
formObj
.
seniorType
=
undefined
this
.
formObj
.
receiveTime
=
undefined
this
.
formObj
.
receiver
=
undefined
this
.
formObj
.
receiverId
=
undefined
this
.
formId
=
'index-edit-form'
this
.
sampleIds
=
sampleIds
this
.
_hideLoading
()
this
.
_getTestType
()
this
.
$refs
.
formObj
.
resetFields
()
this
.
hideUserSel
=
true
this
.
modalTitle
=
'编辑'
this
.
showModal
=
true
},
// 获取检测依据
_getStandardList
:
async
function
()
{
const
result
=
await
soilAptitude
.
getStandardList
()
if
(
result
)
{
this
.
options
=
result
}
},
_getTestType
:
async
function
()
{
const
result
=
await
soilEntrust
.
testType
(
'高级分类'
)
console
.
log
(
result
)
if
(
result
)
{
this
.
groupoptions
=
result
}
},
// 检测项目结果
_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
}
},
_clearMarks
()
{
this
.
marksList
=
[]
},
// 获取表数据
_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
(
'index-edit-form'
)
data
.
receiverId
=
this
.
formObj
.
receiverId
console
.
log
(
'index-edit-form'
,
data
)
this
.
_save
({
ids
:
this
.
sampleIds
,
obj
:
data
})
}
else
{
this
.
$refs
.
footerModal
.
_hideLoading
()
this
.
$Message
.
error
(
'表单验证失败!'
)
}
})
},
_save
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilAptitude
.
editSeniorSample
(
data
)
console
.
log
(
result
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
edit
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'编辑成功!'
)
}
},
_cancel
()
{
this
.
showModal
=
false
this
.
_hideLoading
()
},
_visibleChange
(
data
)
{
this
.
$emit
(
'on-result-change'
)
}
}
}
</
script
>
pages/soil-sample-manage/sample-alone-keep/entrust-sample-manage/WaitReceive.vue
View file @
bcb45755
...
@@ -5,21 +5,21 @@
...
@@ -5,21 +5,21 @@
<Row>
<Row>
<!--查询-->
<!--查询-->
<Col
span=
"24"
style=
"padding-bottom: 5px"
>
<Col
span=
"24"
style=
"padding-bottom: 5px"
>
<Form
id=
"search-wait"
:label-width=
"100"
v-show=
"searchOpen
"
inline
onsubmit=
"return false"
>
<Form
v-show=
"searchOpen"
id=
"search-wait"
:label-width=
"100
"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<label
class=
"label-sign"
></label>
<Form-item
label=
"试样编号:"
class=
"search-item"
>
<Form-item
label=
"试样编号:"
class=
"search-item"
>
<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>
<Form-item
label=
"是否有试验项目:"
class=
"search-item"
>
<Form-item
label=
"是否有试验项目:"
class=
"search-item"
>
<Select
v-model=
"formObj.haveExp"
clearable
name=
"groupId"
style=
"width:150px"
placeholder=
"请选择是否有试验项目"
>
<Select
v-model=
"formObj.haveExp"
clearable
name=
"groupId"
style=
"width:150px"
placeholder=
"请选择是否有试验项目"
>
<Option
v-for=
"(item,index) in itemData"
:
value=
"item.value"
:key=
"index
"
>
{{
item
.
name
}}
</Option>
<Option
v-for=
"(item,index) in itemData"
:
key=
"index"
:value=
"item.value
"
>
{{
item
.
name
}}
</Option>
</Select>
</Select>
</Form-item>
</Form-item>
<Form-item
label=
"筛选试样:"
class=
"search-item"
>
<Form-item
label=
"筛选试样:"
class=
"search-item"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.experimentNames"
name=
"experimentNames"
placeholder=
"请输入试验项目"
clearable
></Input>
<Input
v-model=
"formObj.experimentNames"
name=
"experimentNames"
placeholder=
"请输入试验项目"
clearable
@
on-enter=
"_formSearch"
></Input>
</Form-item>
</Form-item>
<Form-item
label=
"试验科室:"
class=
"search-item"
>
<Form-item
label=
"试验科室:"
class=
"search-item"
>
<el-select
@
change=
"_selGroup"
v-model=
"formObj.groupId"
placeholder=
"请选择"
clearable
style=
"width: 100%
"
>
<el-select
v-model=
"formObj.groupId"
placeholder=
"请选择"
clearable
style=
"width: 100%"
@
change=
"_selGroup
"
>
<el-option
<el-option
v-for=
"(item,index) in groupoptions"
v-for=
"(item,index) in groupoptions"
:key=
"index"
:key=
"index"
...
@@ -29,22 +29,22 @@
...
@@ -29,22 +29,22 @@
</el-select>
</el-select>
</Form-item>
</Form-item>
<Form-item
class=
"search-btn"
>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
</Form-item>
</Form-item>
</Form>
</Form>
</Col>
</Col>
<Col
span=
"24"
>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
@
on-result-change=
"_btnClick"
:show-search-btn=
"true"
class=
"contHide
"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide"
@
on-result-change=
"_btnClick
"
>
</btn-list>
</btn-list>
</Col>
</Col>
<Col
span=
"24"
>
<Col
span=
"24"
>
<PTVXETableHeight
<PTVXETableHeight
ref=
"pageTable"
ref=
"pageTable"
:table
H
eight=
"tableHeight"
:table
-h
eight=
"tableHeight"
@
on-result-change=
"_tableResultChan
ge"
:get-page=
"getPa
ge"
:
getPage=
"getPage
"
:
icon-msg=
"iconMsg
"
:iconMsg=
"iconMsg"
select-data
select-data
>
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
<vxe-table-column
v-for=
"item in pageColumns"
v-for=
"item in pageColumns"
:key=
"item.key"
:key=
"item.key"
...
@@ -71,7 +71,8 @@
...
@@ -71,7 +71,8 @@
<storageSelect
ref=
"locationModal"
@
on-result-change=
"_page()"
></storageSelect>
<storageSelect
ref=
"locationModal"
@
on-result-change=
"_page()"
></storageSelect>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
<SoilSampleItemManage
ref=
"sampleItemManage"
@
on-result-change=
"_page"
></SoilSampleItemManage>
<KeepAdress
ref=
"keepAdressModal"
@
on-result-change=
"_page"
></KeepAdress>
<KeepAdress
ref=
"keepAdressModal"
@
on-result-change=
"_page"
></KeepAdress>
<SampleItemSelect
ref=
"sampleItemSelectModal"
@
on-result-change=
"_itemImportBack"
is-change
/>
<SampleItemSelect
ref=
"sampleItemSelectModal"
is-change
@
on-result-change=
"_itemImportBack"
/>
<SeniorSampleEdit
ref=
"seniorSampleEditModal"
is-change
@
on-result-change=
"_page"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -79,11 +80,13 @@ import { soilAptitude, soilEntrust, soilSample } from '../../../../api'
...
@@ -79,11 +80,13 @@ import { soilAptitude, soilEntrust, soilSample } from '../../../../api'
import
storageSelect
from
'../storageSelect'
import
storageSelect
from
'../storageSelect'
import
SampleItemSelect
from
'./SampleItemSelect'
import
SampleItemSelect
from
'./SampleItemSelect'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
import
SoilSampleItemManage
from
'./SoilSampleItemManage'
import
SeniorSampleEdit
from
'./SeniorSampleEdit'
import
KeepAdress
from
'./KeepAdress'
import
KeepAdress
from
'./KeepAdress'
export
default
{
export
default
{
components
:
{
components
:
{
storageSelect
,
storageSelect
,
SoilSampleItemManage
,
SoilSampleItemManage
,
SeniorSampleEdit
,
KeepAdress
,
KeepAdress
,
SampleItemSelect
SampleItemSelect
},
},
...
@@ -91,6 +94,7 @@ export default {
...
@@ -91,6 +94,7 @@ export default {
return
{
return
{
btn
:
[
btn
:
[
{
type
:
'primary'
,
id
:
''
,
name
:
'调出'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'调出'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'导入试验项目'
}
{
type
:
'primary'
,
id
:
''
,
name
:
'导入试验项目'
}
],
],
groupoptions
:
[],
groupoptions
:
[],
...
@@ -110,6 +114,10 @@ export default {
...
@@ -110,6 +114,10 @@ export default {
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
120
,
fixed
:
'left'
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
120
,
fixed
:
'left'
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
100
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
100
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
100
},
{
title
:
'现场编号'
,
key
:
'siteNo'
,
width
:
100
},
{
title
:
'高级样品位置'
,
key
:
'receiveLocation'
,
width
:
130
},
{
title
:
'高级样品分类'
,
key
:
'seniorType'
,
width
:
130
},
{
title
:
'收样时间'
,
key
:
'receiveTime'
,
width
:
100
,
date
:
true
},
{
title
:
'接收人'
,
key
:
'receiver'
,
width
:
100
},
{
title
:
'试验项目'
,
key
:
'experimentNames'
,
width
:
220
},
{
title
:
'试验项目'
,
key
:
'experimentNames'
,
width
:
220
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
,
width
:
205
},
{
title
:
'土质描述'
,
key
:
'sampleDescribe'
,
width
:
205
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
120
},
{
title
:
'样品包装类型'
,
key
:
'samplePack'
,
width
:
120
},
...
@@ -132,16 +140,6 @@ export default {
...
@@ -132,16 +140,6 @@ export default {
groupName
:
undefined
,
groupName
:
undefined
,
groupId
:
undefined
groupId
:
undefined
},
},
stdList
:
[],
sampleLinkList
:
[
{
value
:
0
,
name
:
'食品生产'
},
{
value
:
1
,
name
:
'食品流通'
},
{
value
:
2
,
name
:
'餐饮服务'
},
{
value
:
3
,
name
:
'食用农产品'
},
{
value
:
4
,
name
:
'生产'
},
{
value
:
5
,
name
:
'流通'
},
{
value
:
6
,
name
:
'餐饮'
}
],
searchOpen
:
true
,
searchOpen
:
true
,
acceptSelectUserValue
:
''
acceptSelectUserValue
:
''
}
}
...
@@ -211,25 +209,6 @@ export default {
...
@@ -211,25 +209,6 @@ export default {
this
.
groupoptions
=
result
this
.
groupoptions
=
result
}
}
},
},
_detailModal
(
id
)
{
// 查看
if
(
this
.
type
===
0
)
{
// 政府
this
.
currentComponent
=
'FoodSampleCompanyDetail'
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
id
).
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
companyModel
)
})
})
}
else
{
this
.
currentComponent
=
'FoodSampleGovernDetail'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
id
).
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
)
})
})
}
},
_open
(
contractId
,
type
)
{
_open
(
contractId
,
type
)
{
console
.
log
(
'待接收样品'
)
console
.
log
(
'待接收样品'
)
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
...
@@ -269,9 +248,6 @@ export default {
...
@@ -269,9 +248,6 @@ export default {
case
'试验项目'
:
case
'试验项目'
:
this
.
_itemManage
(
data
.
id
)
this
.
_itemManage
(
data
.
id
)
break
break
case
'复制'
:
this
.
_copySample
(
data
)
break
case
'操作日志'
:
case
'操作日志'
:
this
.
$refs
.
refModal
.
_open
(
data
.
id
)
this
.
$refs
.
refModal
.
_open
(
data
.
id
)
break
break
...
@@ -313,9 +289,6 @@ export default {
...
@@ -313,9 +289,6 @@ export default {
this
.
$refs
.
refModal
.
_open
(
'扫码接收发放'
)
this
.
$refs
.
refModal
.
_open
(
'扫码接收发放'
)
}
}
break
break
case
'复制历史样品检测项目'
:
this
.
_copyHisItem
()
break
case
'收样室收样'
:
case
'收样室收样'
:
this
.
_sampleReceive
(
this
.
selectIds
)
this
.
_sampleReceive
(
this
.
selectIds
)
break
break
...
@@ -328,6 +301,9 @@ export default {
...
@@ -328,6 +301,9 @@ export default {
case
'导入试验项目'
:
case
'导入试验项目'
:
this
.
_importItem
()
this
.
_importItem
()
break
break
case
'编辑'
:
this
.
_editSeniorSample
()
break
case
'打印标签'
:
case
'打印标签'
:
this
.
_selectPrinter
(
'print-label'
)
this
.
_selectPrinter
(
'print-label'
)
break
break
...
@@ -351,6 +327,15 @@ export default {
...
@@ -351,6 +327,15 @@ export default {
this
.
$refs
.
sampleItemSelectModal
.
_open
()
this
.
$refs
.
sampleItemSelectModal
.
_open
()
}
}
},
},
_editSeniorSample
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择至少一条数据!'
)
}
else
{
this
.
$refs
.
seniorSampleEditModal
.
_open
(
this
.
selectIds
)
}
},
_itemImportBack
(
data
)
{
_itemImportBack
(
data
)
{
console
.
log
(
data
)
console
.
log
(
data
)
if
(
data
.
length
>
0
)
{
if
(
data
.
length
>
0
)
{
...
@@ -368,55 +353,7 @@ export default {
...
@@ -368,55 +353,7 @@ export default {
})
})
if
(
result
)
{
if
(
result
)
{
this
.
$Message
.
success
(
'导入成功'
)
this
.
$Message
.
success
(
'导入成功'
)
this
.
_page
()
await
this
.
_page
()
}
},
// 1.自定义打印,除检样、备样、留样 增加制备标签,需要单独的查询制备标签的数据,
// 2.样品接收位置的制备用制备的的接口,将当前的保存方式置空,打印出来手动填写
_cusTomePrint
()
{
this
.
$store
.
dispatch
(
'FoodSample/preparationButton'
,
{
sampleIds
:
this
.
selectIds
.
join
(
','
)
})
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
list
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
// 样品制备保存方式
result
[
i
].
saveWay
=
''
}
// 样品的数据和制备样品的数据
this
.
$refs
.
refModal
.
_open
(
this
.
selectData
,
result
)
})
},
// 接收并发放
_submitSend
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$msgTip
(
'warning'
,
'请至少选择一条数据!'
)
}
else
{
const
data
=
{
ids
:
this
.
selectIds
.
join
(
','
)
}
// 判断接收发放是否选人
if
(
this
.
acceptSelectUserValue
===
'是'
)
{
this
.
$store
.
dispatch
(
'FoodSample/submitReceiveSendCheck'
,
data
)
.
then
(()
=>
{
const
result
=
this
.
$store
.
state
.
FoodSample
.
success
if
(
result
)
{
// 验证成功
this
.
$refs
.
userModal
.
_open
(
'sampleReceiveSendMan'
,
'请选择领样人'
)
}
})
}
else
{
this
.
$store
.
dispatch
(
'FoodSample/sampleReceiveSend'
,
data
)
.
then
(()
=>
{
this
.
_resultChange
(
'接收发放成功'
)
})
}
}
}
},
},
_resultChange
(
msg
)
{
_resultChange
(
msg
)
{
...
@@ -424,140 +361,6 @@ export default {
...
@@ -424,140 +361,6 @@ export default {
this
.
$Message
.
success
(
msg
)
this
.
$Message
.
success
(
msg
)
this
.
selectIds
=
[]
this
.
selectIds
=
[]
},
},
_exportReceiveRecord
()
{
// 导出交接记录
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择数据进行导出'
)
}
else
{
// eslint-disable-next-line no-undef
http
.
open
(
'/food/report/excel/sheet?_u=db样品来源.report.xml&ids='
+
ids
)
}
},
_deleteById
(
id
)
{
// 删除一条记录
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
$store
.
dispatch
(
'FoodSample/deleteByIds'
,
id
).
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSample
.
success
)
{
this
.
_page
()
this
.
$Message
.
success
(
'删除成功!'
)
}
})
}
})
},
// 添加与编辑
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
// 编辑
if
(
data
.
type
===
1
)
{
// 政府
this
.
currentComponent
=
'SampleGovernEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
id
).
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
this
.
contractId
,
'receive-his-wait'
)
})
})
}
else
if
(
data
.
type
===
2
)
{
this
.
currentComponent
=
'FoodSampleGovernLYEdit'
this
.
$nextTick
(
function
()
{
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
this
.
contractId
,
'receive-his-wait'
)
})
})
}
else
{
this
.
currentComponent
=
'CompanySampleEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
this
.
$store
.
state
.
FoodSample
.
companyModel
,
this
.
contractId
,
'receive-his-wait'
)
})
})
}
}
else
{
// 添加
if
(
this
.
type
===
0
)
{
// 企业
this
.
currentComponent
=
'CompanySampleEdit'
}
else
{
// 政府和粮油
this
.
currentComponent
=
'SampleGovernEdit'
}
this
.
$nextTick
(()
=>
{
// receive 标识,表示是样品接收的添加页面与其他普通样品的添加页面不同
this
.
$refs
.
refModal
.
_open
(
''
,
this
.
contractId
,
'receive-his-wait'
)
})
}
},
// 复制样品
_copySample
(
data
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要复制该样品信息?'
,
onOk
:
()
=>
{
if
(
data
.
type
===
1
)
{
// 政府
this
.
currentComponent
=
'SampleGovernEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_openCopyAll
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
'receive-his-wait-copy'
)
})
})
}
else
if
(
data
.
type
===
2
)
{
this
.
currentComponent
=
'FoodSampleGovernLYEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByGovernId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_openCopyAll
(
this
.
$store
.
state
.
FoodSample
.
governModel
,
'receive-his-wait-copy'
)
})
})
}
else
{
this
.
currentComponent
=
'CompanySampleEdit'
this
.
$store
.
dispatch
(
'FoodSample/getByCompanyId'
,
data
.
id
)
.
then
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_openCopyAll
(
this
.
$store
.
state
.
FoodSample
.
companyModel
,
'receive-his-wait-copy'
)
})
})
}
}
})
},
_search
()
{
_search
()
{
this
.
_page
()
this
.
_page
()
},
},
...
@@ -664,16 +467,6 @@ export default {
...
@@ -664,16 +467,6 @@ export default {
this
.
_getStdList
()
this
.
_getStdList
()
break
break
}
}
},
// 查询执行标准
_getStdList
(
data
)
{
const
obj
=
Object
.
assign
({},
this
.
$serialize
(
'search-wait'
))
if
(
data
)
{
obj
.
standard
=
data
}
this
.
$store
.
dispatch
(
'FoodSample/listReceiveStandard'
,
obj
).
then
(()
=>
{
this
.
stdList
=
this
.
$store
.
state
.
FoodSample
.
list
})
}
}
}
}
}
}
...
...
pages/soil-sample-manage/sample-preparation/CreateReport.vue
0 → 100644
View file @
bcb45755
<
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
:
''
,
entrustId
:
undefined
,
showIssueModal
:
false
}
},
methods
:
{
_open
(
id
)
{
this
.
entrustId
=
id
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
.
backData
.
entrustId
=
this
.
entrustId
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-sample-manage/sample-preparation/ReportTemplate.vue
0 → 100644
View file @
bcb45755
<
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
.
pageOpenSoil
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/SamplePreparation.vue
View file @
bcb45755
...
@@ -6,27 +6,27 @@
...
@@ -6,27 +6,27 @@
<Row>
<Row>
<!--查询-->
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
id=
"formId"
v-show=
"searchOpen
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<Form
v-show=
"searchOpen"
id=
"formId
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"委托商:"
>
<Form-item
class=
"search-item"
label=
"委托商:"
>
<Input
v-model=
"formObj.client"
@
on-enter=
"_formSearch"
name=
"client"
placeholder=
"请输入委托单位"
clearable
/>
<Input
v-model=
"formObj.client"
name=
"client"
placeholder=
"请输入委托单位"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
v-model=
"formObj.entrustCode"
@
on-enter=
"_formSearch"
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
/>
<Input
v-model=
"formObj.entrustCode"
name=
"entrustCode"
placeholder=
"请输入委托编号"
clearable
@
on-enter=
"_formSearch"
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-item"
label=
"钻孔名称:"
>
<Form-item
class=
"search-item"
label=
"钻孔名称:"
>
<Input
v-model=
"formObj.boreholeName"
@
on-enter=
"_formSearch"
placeholder=
"请输入钻孔名称"
clearable
></Input>
<Input
v-model=
"formObj.boreholeName"
placeholder=
"请输入钻孔名称"
clearable
@
on-enter=
"_formSearch"
></Input>
</Form-item>
</Form-item>
<Form-item
class=
"search-btn"
>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</Button>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
</Form-item>
</Form-item>
</Form>
</Form>
</Col>
</Col>
<!--操作-->
<!--操作-->
<Col
span=
"24"
>
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick
"
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
class=
"contHide
"
class=
"contHide
"
></btn-list>
@
on-result-change=
"_btnClick
"
></btn-list>
</Col>
</Col>
<!--表格-->
<!--表格-->
<Col
span=
"24"
>
<Col
span=
"24"
>
...
@@ -52,15 +52,15 @@
...
@@ -52,15 +52,15 @@
</div>
</div>
<keep-alive>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<!-- eslint-disable-next-line vue/require-component-is -->
<component
ref=
"refModal"
:is=
"currentComponent
"
@
on-result-change=
"_componentResult"
></component>
<component
:is=
"currentComponent"
ref=
"refModal
"
@
on-result-change=
"_componentResult"
></component>
</keep-alive>
</keep-alive>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
soilEntrust
}
from
'../../../api'
import
{
soilEntrust
,
soilSample
}
from
'../../../api'
import
http
from
'../../../api/http'
import
http
from
'../../../api/http'
import
Operation
from
'../../../components/operation/Operation'
import
Operation
from
'../../../components/operation/Operation'
import
global
from
'../../../api/config
'
import
CreateReport
from
'./CreateReport
'
import
SampleManage
from
'./SampleManage'
import
SampleManage
from
'./SampleManage'
import
SamplePreparationEdit
from
'./SamplePreparationEdit'
import
SamplePreparationEdit
from
'./SamplePreparationEdit'
import
SoilSampleItemManageEdit
from
'./SoilSampleItemManageEdit'
import
SoilSampleItemManageEdit
from
'./SoilSampleItemManageEdit'
...
@@ -75,6 +75,7 @@ export default {
...
@@ -75,6 +75,7 @@ export default {
SampleManage
,
SampleManage
,
// eslint-disable-next-line vue/no-unused-components
// eslint-disable-next-line vue/no-unused-components
SoilSampleItemManageEdit
,
SoilSampleItemManageEdit
,
CreateReport
,
// eslint-disable-next-line vue/no-unused-components
// eslint-disable-next-line vue/no-unused-components
SoilEntrustItemNum
SoilEntrustItemNum
},
},
...
@@ -217,22 +218,73 @@ export default {
...
@@ -217,22 +218,73 @@ export default {
},
},
_componentResult
(
data
,
msg
)
{
_componentResult
(
data
,
msg
)
{
switch
(
this
.
currentComponent
)
{
switch
(
this
.
currentComponent
)
{
case
'CreateReport'
:
this
.
_openSoilRecordMake
(
data
)
break
default
:
default
:
this
.
_page
()
this
.
_page
()
}
}
},
},
_exportPrepare
(
id
)
{
_openSoilRecordMake
(
data
)
{
this
.
$Modal
.
confirm
({
if
(
data
)
{
title
:
'提示'
,
this
.
$refs
.
pageTable
.
_showLoading
()
content
:
'确定导出这条记录'
,
this
.
_makeCodeExcel
(
data
)
onOk
:
()
=>
{
}
else
{
window
.
open
(
const
ids
=
this
.
selectIds
global
.
baseURL
+
if
(
ids
.
length
===
0
)
{
'/soil/v1/entrust/export_soil_prepare_record?ids='
+
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
id
,
}
else
{
'_blank'
// this._appendOriginalRecord()
)
}
}
},
_makeCodeExcel
:
async
function
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
const
result
=
await
soilSample
.
saveExcelOpenSoilRecord
({
entrustId
:
data
.
entrustId
,
templateId
:
data
.
id
})
this
.
$refs
.
pageTable
.
_hideLoading
()
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
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
_exportPrepare
(
id
)
{
// this.$Modal.confirm({
// title: '提示',
// content: '确定导出这条记录',
// onOk: () => {
// window.open(
// global.baseURL +
// '/soil/v1/entrust/export_soil_prepare_record?ids=' +
// id,
// '_blank'
// )
// }
// })
this
.
currentComponent
=
'CreateReport'
this
.
$nextTick
(()
=>
{
this
.
$refs
.
refModal
.
_open
(
id
)
})
})
},
},
_sampleManage
(
data
)
{
_sampleManage
(
data
)
{
...
...
router/soil-routes.js
View file @
bcb45755
...
@@ -50,7 +50,7 @@ import SoilExpReportMakeIndex from '../pages/soil-exp-report/report-make/SoilExp
...
@@ -50,7 +50,7 @@ import SoilExpReportMakeIndex from '../pages/soil-exp-report/report-make/SoilExp
import
SoilExpReportCheckIndex
from
'../pages/soil-exp-report/report-check/SoilExpReportCheckIndex'
import
SoilExpReportCheckIndex
from
'../pages/soil-exp-report/report-check/SoilExpReportCheckIndex'
import
SoilExpReportIssueIndex
from
'../pages/soil-exp-report/report-issue/SoilExpReportIssueIndex'
import
SoilExpReportIssueIndex
from
'../pages/soil-exp-report/report-issue/SoilExpReportIssueIndex'
import
SoilExpReportEndIndex
from
'../pages/soil-exp-report/report-end/SoilExpReportEndIndex'
import
SoilExpReportEndIndex
from
'../pages/soil-exp-report/report-end/SoilExpReportEndIndex'
import
OpenSoilTemplate
from
'../pages/soil-sample-manage/open-soil-template-manage/OpenSoilTemplate'
import
Blank
from
'~/pages/blank'
import
Blank
from
'~/pages/blank'
export
default
[
export
default
[
{
{
...
@@ -176,6 +176,11 @@ export default [
...
@@ -176,6 +176,11 @@ export default [
path
:
'box'
,
path
:
'box'
,
component
:
BoxManage
,
component
:
BoxManage
,
meta
:
{
title
:
'盒号管理'
}
meta
:
{
title
:
'盒号管理'
}
},
{
path
:
'open_soil_template'
,
component
:
OpenSoilTemplate
,
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