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
32ed99c6
Commit
32ed99c6
authored
Dec 05, 2020
by
zhangmengqi
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev'
parents
a260a42c
4a5d105d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
732 additions
and
10 deletions
+732
-10
soil-sample.js
api/soil/soil-sample.js
+7
-1
AddressManageEdit.vue
pages/soil-sample-manage/sample-box/AddressManageEdit.vue
+188
-0
BoxManage.vue
pages/soil-sample-manage/sample-box/BoxManage.vue
+242
-0
SampleManageHis.vue
...soil-sample-manage/sample-preparation/SampleManageHis.vue
+78
-0
SamplePreparationHis.vue
...sample-manage/sample-preparation/SamplePreparationHis.vue
+8
-8
SoilSampleManageHis.vue
...-sample-manage/sample-preparation/SoilSampleManageHis.vue
+0
-0
RecordIndex.vue
...preparation/sample-preparation-record-his/RecordIndex.vue
+48
-0
RecordLeftList.vue
...paration/sample-preparation-record-his/RecordLeftList.vue
+151
-0
RecordRightList.vue
...aration/sample-preparation-record-his/RecordRightList.vue
+0
-0
RecordRightList.vue
...preparation/sample-preparation-record/RecordRightList.vue
+4
-1
soil-routes.js
router/soil-routes.js
+6
-0
No files found.
api/soil/soil-sample.js
View file @
32ed99c6
...
@@ -194,5 +194,11 @@ export default {
...
@@ -194,5 +194,11 @@ export default {
)
)
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
sampleBringOut
:
data
=>
sampleBringOut
:
data
=>
http
.
post
(
'soil/v1/sample/sample_bring_out?ids='
+
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/sample/sample_bring_out?ids='
+
data
).
then
(
res
=>
res
),
boxPage
:
data
=>
http
.
post
(
'soil/v1/box/page'
,
data
).
then
(
res
=>
res
),
addBox
:
data
=>
http
.
post
(
'soil/v1/box/'
,
data
).
then
(
res
=>
res
),
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
)
}
}
pages/soil-sample-manage/sample-box/AddressManageEdit.vue
0 → 100644
View file @
32ed99c6
<
template
>
<div>
<Modal
v-model=
"showEditModal"
v-drag
:mask-closable=
"false"
:width=
"500"
class=
"zIndex-1200"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
inline
>
<Form-item
label=
"盒号"
prop=
"boxCode"
style=
"width: 100%"
>
<Input
v-model=
"formObj.boxCode"
name=
"boxCode"
placeholder=
"请输入盒号"
/>
</Form-item>
<Form-item
label=
"盒子名称"
prop=
"name"
style=
"width: 100%"
>
<Input
v-model=
"formObj.name"
name=
"name"
placeholder=
"请输入盒子名称"
/>
</Form-item>
<Form-item
label=
"盒子重量"
prop=
"quality"
style=
"width: 100%"
>
<Input
v-model=
"formObj.quality"
type=
"number"
name=
"quality"
/>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
>
<ModalFooter
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></ModalFooter>
</div>
</Modal>
<UserInfo
ref=
"userModal"
@
on-result-change=
"_userData"
is-change
></UserInfo>
</div>
</
template
>
<
script
>
/**
* 添加编辑
*/
import
ModalFooter
from
'../../../components/base/modalFooter'
import
{
soilSample
}
from
'../../../api'
import
Global
from
'../../../api/config'
import
UserInfo
from
'../../../components/user-info-single/assignPerson'
export
default
{
components
:
{
ModalFooter
,
UserInfo
},
data
()
{
return
{
formId
:
''
,
lengthLimitList
:
[
{
key
:
'stdNum'
,
title
:
'标准号'
},
{
key
:
'enName'
,
title
:
'英文名称'
},
{
key
:
'belongUnit'
,
title
:
'归口单位'
},
{
key
:
'publishUnit'
,
title
:
'发布单位'
}
],
modalTitle
:
'添加盒子信息'
,
formObj
:
{
name
:
''
,
boxCode
:
''
,
quality
:
''
},
options
:
[
{
name
:
'国家标准'
},
{
name
:
'地方标准'
},
{
name
:
'行业标准'
},
{
name
:
'企业标准'
}
],
ruleValidate
:
{
boxCode
:
[{
required
:
true
,
message
:
'盒号不能为空'
,
trigger
:
'blur'
}]
},
showEditModal
:
false
,
classifyList
:
[
{
value
:
0
,
name
:
'判定依据'
},
{
value
:
1
,
name
:
'检测依据'
},
{
value
:
2
,
name
:
'其他'
}
],
typeList
:
[
{
value
:
0
,
name
:
'国家标准'
},
{
value
:
1
,
name
:
'地方标准'
},
{
value
:
2
,
name
:
'行业标准'
},
{
value
:
3
,
name
:
'企业标准'
}
],
statusList
:
[
{
value
:
0
,
name
:
'现行'
},
{
value
:
1
,
name
:
'即将实施'
},
{
value
:
2
,
name
:
'部分被代替'
},
{
value
:
3
,
name
:
'被代替'
},
{
value
:
4
,
name
:
'作废'
}
],
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'保存'
,
type
:
'primary'
}
]
}
},
methods
:
{
_getUser
()
{
const
user
=
Global
.
getUserInfo
()
this
.
formObj
.
manager
=
user
.
realname
this
.
formObj
.
managerId
=
user
.
id
console
.
log
(
user
)
},
_selectStaff
()
{
this
.
$refs
.
userModal
.
_open
()
},
_userData
(
data
,
msg
,
contractTempData
)
{
console
.
log
(
data
,
msg
)
},
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'保存'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_resultChange
(
msg
)
{
this
.
showEditModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
const
data
=
this
.
$serialize
(
'edit-form'
)
if
(
this
.
$string
(
this
.
formObj
.
id
).
isEmpty
())
{
// 添加
this
.
_save
(
data
)
}
else
{
// 编辑
this
.
_edit
({
id
:
this
.
formObj
.
id
,
obj
:
data
})
}
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
this
.
_hideLoading
()
}
})
},
_save
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
addBox
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'添加成功!'
)
}
},
_edit
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
editBox
(
data
)
if
(
result
)
{
this
.
_resultChange
(
'编辑成功!'
)
}
},
_cancel
()
{
this
.
_hideLoading
()
this
.
showEditModal
=
false
},
_open
(
formObj
)
{
this
.
formId
=
this
.
$randomCode
()
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
if
(
this
.
$string
(
formObj
).
isEmpty
())
{
this
.
modalTitle
=
'添加'
this
.
formObj
.
id
=
''
this
.
_getUser
()
}
else
{
this
.
formObj
=
formObj
this
.
formObj
.
id
=
formObj
.
id
this
.
modalTitle
=
'编辑'
}
this
.
showEditModal
=
true
},
_registerAdd
()
{
this
.
formId
=
this
.
$randomCode
()
this
.
_hideLoading
()
this
.
$refs
.
formObj
.
resetFields
()
this
.
modalTitle
=
'添加'
this
.
formObj
.
id
=
''
this
.
formObj
.
type
=
3
this
.
showEditModal
=
true
}
}
}
</
script
>
pages/soil-sample-manage/sample-box/BoxManage.vue
0 → 100644
View file @
32ed99c6
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<Col
span=
"24"
class=
"margin-top-10"
>
<!--搜索表单-->
<Form
id=
"search-form"
:label-width=
"90"
v-show=
"searchOpen"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"盒号:"
>
<Input
@
on-enter=
"_formSearch"
v-model=
"formObj.boxCode"
name=
"code"
placeholder=
"请输入盒号"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:showSearchBtn=
"true"
@
on-result-change=
"_btnClick"
class=
"contHide"
></btn-list>
</Col>
<!--表格 -->
<Col
span=
"24"
>
<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"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.key==='status'"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'现行'
:
scope
.
row
[
item
.
key
]
===
1
?
'即将实施'
:
scope
.
row
[
item
.
key
]
===
2
?
'部分被代替'
:
scope
.
row
[
item
.
key
]
===
3
?
'被代替'
:
scope
.
row
[
item
.
key
]
===
4
?
'作废'
:
''
}}
</div>
<div
v-else-if=
"item.key==='classify'"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'判定依据'
:
scope
.
row
[
item
.
key
]
===
1
?
'检测依据'
:
scope
.
row
[
item
.
key
]
===
2
?
'其他'
:
''
}}
</div>
<div
v-else-if=
"item.key==='type'"
>
{{
scope
.
row
[
item
.
key
]
===
0
?
'国家标准'
:
scope
.
row
[
item
.
key
]
===
1
?
'地方标准'
:
scope
.
row
[
item
.
key
]
===
2
?
'行业标准'
:
scope
.
row
[
item
.
key
]
===
3
?
'企业标准'
:
''
}}
</div>
<div
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</div>
<div
v-else-if=
"item.key==='fileUrl'"
>
<span
v-if=
"scope.row['fileUrl']"
class=
"green-color"
>
是
</span>
<span
v-else
class=
"red-color"
>
否
</span>
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
<!--组件加载-->
<StandardsManageEdit
ref=
"editModal"
@
on-result-change=
"_page"
></StandardsManageEdit>
</div>
</template>
<
script
>
import
{
soilSample
}
from
'../../../api'
import
StandardsManageEdit
from
'./AddressManageEdit'
// 添加、编辑
export
default
{
components
:
{
StandardsManageEdit
},
data
()
{
return
{
currentComponent
:
''
,
formObj
:
{
code
:
undefined
,
name
:
undefined
},
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
,
componentName
:
'StandardsManageEdit'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
// 表格
pageColumns
:
[
{
title
:
'盒子号'
,
key
:
'boxCode'
},
{
title
:
'盒子名称'
,
key
:
'name'
},
{
title
:
'盒子重量'
,
key
:
'quality'
}
],
// 操作
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
,
componentName
:
'StandardsManageEdit'
},
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
],
searchOpen
:
false
,
getPage
:
{},
// 选中的内容
selectIds
:
[]
}
},
computed
:
{
// 表格的高度
tableHeight
:
function
()
{
if
(
this
.
searchOpen
)
{
return
this
.
$tableHeight
(
'search'
)
}
else
{
return
this
.
$tableHeight
(
'noSearch'
)
}
}
},
mounted
()
{
this
.
_page
()
},
methods
:
{
// 操作按钮
_btnClick
(
msg
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
switch
(
msg
)
{
case
'添加'
:
this
.
$nextTick
(()
=>
{
this
.
_editModal
(
false
)
})
break
case
'删除'
:
this
.
_deleteSelected
()
break
case
'导入'
:
this
.
$nextTick
(()
=>
{
this
.
_import
()
})
break
case
'导出'
:
// this._export()
break
// 收起搜索
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
// 表格中操作
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
currentComponent
=
currentComponent
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
.
id
)
break
case
'删除'
:
this
.
_deleteById
(
data
.
id
)
break
}
})
},
_editModal
:
async
function
(
edit
,
id
)
{
if
(
edit
)
{
const
result
=
await
soilSample
.
getByIdBox
(
id
)
if
(
result
)
{
this
.
$refs
.
editModal
.
_open
(
result
)
}
}
else
{
// 添加
this
.
$refs
.
editModal
.
_open
()
}
},
// 获取数据
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilSample
.
boxPage
(
this
.
$serializeForm
(
this
.
formObj
))
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
// 查询
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
// 删除一条记录
_deleteById
(
id
)
{
this
.
_deleteByIds
([
id
])
},
// 批量删除
_deleteSelected
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一条或多条数据!'
)
}
else
{
this
.
_deleteByIds
(
this
.
selectIds
,
'确定删除这 '
+
this
.
selectIds
.
length
+
' 条记录?'
)
}
},
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
loading
:
true
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
ids
)
}
})
},
_delOk
:
async
function
(
ids
)
{
const
result
=
await
soilSample
.
deleteBox
(
ids
)
if
(
result
)
{
this
.
_page
()
this
.
$Modal
.
remove
()
this
.
$Message
.
success
(
'删除成功'
)
}
},
// 表格内容
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'changeSize'
:
this
.
_page
()
break
}
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/SampleManageHis.vue
0 → 100644
View file @
32ed99c6
<
template
>
<div>
<Modal
v-model=
"showSampleModal"
v-drag
@
on-visible-change=
"_visibleChange"
width=
"1200"
class=
"zIndex-900 modal-footer-none"
>
<p
slot=
"header"
>
管理样品
</p>
<div>
<el-tabs
v-model=
"activeName"
@
tab-click=
"_changeTabs"
>
<el-tab-pane
label=
"样品管理"
name=
"prepareManage"
>
<SoilSampleManage
ref=
"prepareManage"
></SoilSampleManage>
</el-tab-pane>
<el-tab-pane
label=
"原始记录填写"
name=
"recordModal"
>
<RecordWrite
ref=
"recordModal"
></RecordWrite>
</el-tab-pane>
</el-tabs>
<!--
<keep-alive>
-->
<!-- <!– eslint-disable-next-line vue/require-component-is –>-->
<!--
<component
ref=
"refModal"
:is=
"currentComponent"
></component>
-->
<!--
</keep-alive>
-->
</div>
</Modal>
</div>
</
template
>
<
script
>
import
SoilSampleManage
from
'./SoilSampleManageHis'
import
RecordWrite
from
'./sample-preparation-record-his/RecordIndex'
export
default
{
components
:
{
SoilSampleManage
,
RecordWrite
},
data
()
{
return
{
type
:
''
,
contractId
:
''
,
// 合同id
entrustId
:
''
,
showSampleModal
:
false
,
modalTitle
:
''
,
selectIds
:
[],
activeName
:
'prepareManage'
,
name
:
''
,
currentComponent
:
''
}
},
mounted
()
{},
methods
:
{
_open
(
entrustId
,
type
,
name
)
{
this
.
type
=
type
// 类型(采样或送样)
this
.
name
=
name
this
.
showSampleModal
=
true
this
.
entrustId
=
entrustId
// 委托id
this
.
activeName
=
'prepareManage'
this
.
selectIds
=
[]
this
.
_preparePage
()
},
// 制备管理
_preparePage
()
{
this
.
$refs
.
prepareManage
.
_open
(
this
.
entrustId
)
},
// 原始记录填写
_recordPage
()
{
this
.
$refs
.
recordModal
.
_open
(
this
.
entrustId
)
},
_changeTabs
(
tab
,
event
)
{
if
(
tab
.
name
===
'prepareManage'
)
{
// this._issuedPage()
this
.
$refs
.
prepareManage
.
_open
(
this
.
entrustId
)
this
.
$refs
.
recordModal
.
_clearTable
()
}
else
{
this
.
$refs
.
recordModal
.
_open
(
this
.
entrustId
)
}
},
// 关闭弹框的时候刷新上个界面
_visibleChange
(
data
)
{
this
.
$emit
(
'on-result-change'
)
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/SamplePreparationHis.vue
View file @
32ed99c6
...
@@ -6,24 +6,24 @@
...
@@ -6,24 +6,24 @@
<Row>
<Row>
<!--查询-->
<!--查询-->
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Col
span=
"24"
style=
"margin-top: 10px"
>
<Form
v-show=
"searchOpen"
id=
"formId
"
:label-width=
"90"
inline
onsubmit=
"return false"
>
<Form
id=
"formId"
v-show=
"searchOpen
"
: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"
name=
"client"
placeholder=
"请输入委托单位"
clearable
@
on-enter=
"_formSearch"
/>
<Input
v-model=
"formObj.client"
@
on-enter=
"_formSearch"
name=
"client"
placeholder=
"请输入委托单位"
clearable
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Form-item
class=
"search-item"
label=
"委托编号:"
>
<Input
v-model=
"formObj.entrustCode"
name=
"entrustCode"
placeholder=
"请输入委托单号"
clearable
@
on-enter=
"_formSearch"
/>
<Input
v-model=
"formObj.entrustCode"
@
on-enter=
"_formSearch"
name=
"entrustCode"
placeholder=
"请输入委托单号"
clearable
/>
</Form-item>
</Form-item>
<Form-item
class=
"search-btn"
>
<Form-item
class=
"search-btn"
>
<Button
type=
"primary"
@
click=
"_formSearch
"
>
搜索
</Button>
<Button
@
click=
"_formSearch"
type=
"primary
"
>
搜索
</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"
class=
"contHide
"
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick
"
@
on-result-change=
"_btnClick
"
></btn-list>
class=
"contHide
"
></btn-list>
</Col>
</Col>
<!--表格-->
<!--表格-->
<Col
span=
"24"
>
<Col
span=
"24"
>
...
@@ -51,15 +51,15 @@
...
@@ -51,15 +51,15 @@
</div>
</div>
<keep-alive>
<keep-alive>
<!-- eslint-disable-next-line vue/require-component-is -->
<!-- eslint-disable-next-line vue/require-component-is -->
<component
:is=
"currentComponent"
ref=
"refModal
"
@
on-result-change=
"_componentResult"
></component>
<component
ref=
"refModal"
:is=
"currentComponent
"
@
on-result-change=
"_componentResult"
></component>
</keep-alive>
</keep-alive>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
soilAptitude
,
soilEntrust
}
from
'../../../api'
import
{
soilAptitude
,
soilEntrust
}
from
'../../../api'
import
MeterEntrustRecord
from
'../../../components/operation/Operation'
import
MeterEntrustRecord
from
'../../../components/operation/Operation'
import
SoilSampleManageHis
from
'../SoilSampleManageHis'
import
global
from
'../../../api/config'
import
global
from
'../../../api/config'
import
SoilSampleManageHis
from
'./SampleManageHis'
import
SoilEntrustItemNum
from
'./SoilItemNum'
import
SoilEntrustItemNum
from
'./SoilItemNum'
export
default
{
export
default
{
// eslint-disable-next-line vue/no-unused-components
// eslint-disable-next-line vue/no-unused-components
...
...
pages/soil-sample-manage/sample-preparation/SoilSampleManageHis.vue
0 → 100644
View file @
32ed99c6
This diff is collapsed.
Click to expand it.
pages/soil-sample-manage/sample-preparation/sample-preparation-record-his/RecordIndex.vue
0 → 100644
View file @
32ed99c6
<
template
>
<div>
<TwoColumnPage>
<template
slot=
"left"
>
<ItemLeftList
ref=
"leftModal"
@
on-result-change=
"_leftResult"
></ItemLeftList>
</
template
>
<
template
slot=
"right"
>
<ItemRightList
ref=
"rightModal"
@
on-result-change=
"_rightResult"
></ItemRightList>
</
template
>
</TwoColumnPage>
</div>
</template>
<
script
>
import
TwoColumnPage
from
'../../../../components/base/TwoColumnPage'
import
ItemLeftList
from
'./RecordLeftList'
import
ItemRightList
from
'./RecordRightList'
export
default
{
components
:
{
TwoColumnPage
,
ItemLeftList
,
ItemRightList
},
data
()
{
return
{
id
:
''
}
},
methods
:
{
_leftResult
(
data
)
{
console
.
log
(
'ItemTabs'
,
data
)
this
.
$refs
.
rightModal
.
_open
(
this
.
id
,
data
)
},
_rightResult
()
{
this
.
$refs
.
leftModal
.
_page
()
},
_open
(
id
)
{
this
.
id
=
id
console
.
log
(
id
)
this
.
$refs
.
leftModal
.
_open
(
this
.
id
)
},
_clearTable
()
{
this
.
$refs
.
rightModal
.
_clearAll
()
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/sample-preparation-record-his/RecordLeftList.vue
0 → 100644
View file @
32ed99c6
<
template
>
<div>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"task-assign-item-left"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"检测项目:"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入检测项目"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 6px;"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:isRadio=
"true"
:pageColumns=
"pageColumns"
:table-name=
"tableName"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:hide-checkbox=
"true"
select-data
>
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<a
v-if=
"item.detail"
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<span
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
<VXESettingCol
slot=
"setting"
:pageColumns=
"pageColumns"
:userColumns=
"userColumns"
@
on-result-change=
"_resetColumn"
:table-name=
"tableName"
></VXESettingCol>
</PTVXETable>
</Col>
</Row>
</div>
</template>
<
script
>
import
{
soilTest
}
from
'../../../../api'
export
default
{
components
:
{},
data
()
{
return
{
currentComponent
:
''
,
formObj
:
{
name
:
undefined
},
tableName
:
'food-task-assign-item-left'
,
// 用户自己选中的列
userColumns
:
[],
optionList
:
[
{
key
:
'name'
,
name
:
'检测项目'
,
placeholder
:
'请输入检测项目'
},
{
key
:
'testBasis'
,
name
:
'检测依据'
,
placeholder
:
'请输入检测依据'
}
],
getPage
:
{},
id
:
''
,
pageColumns
:
[
{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
},
{
title
:
'检测方法'
,
key
:
'testMethod'
,
width
:
140
},
{
title
:
'检测依据名称'
,
key
:
'testBasisName'
,
width
:
200
}
]
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tabSearch'
)
}
},
methods
:
{
// 重置column
_resetColumn
(
colList
)
{
this
.
userColumns
=
colList
this
.
$refs
.
pageTable
.
_loadColumn
(
colList
)
},
_modalResult
()
{
if
(
this
.
currentComponent
===
'AutoAssignModal'
)
{
this
.
_formSearch
()
}
},
_selInputResult1
(
msg
,
data
)
{
switch
(
msg
)
{
case
'search'
:
this
.
_formSearch
()
break
}
},
_open
(
id
)
{
this
.
id
=
id
this
.
_page
()
},
_searchParams
()
{
const
obj
=
{}
const
obj1
=
this
.
$refs
.
selInput1
.
_getFormObj
()
Object
.
assign
(
obj
,
obj1
)
return
obj
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
this
.
id
const
result
=
await
soilTest
.
pagePrepareByExp
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
},
_tableResultChange
(
msg
,
data
)
{
console
.
log
(
msg
,
data
)
switch
(
msg
)
{
case
'page'
:
this
.
getPage
=
this
.
$store
.
state
.
FoodItem
.
page
break
case
'selectData'
:
this
.
$emit
(
'on-result-change'
,
data
)
break
case
'singleSelect'
:
this
.
$emit
(
'on-result-change'
,
data
)
break
case
'changeSize'
:
this
.
_page
()
break
case
'table-col'
:
// 用户选中的表格列
this
.
userColumns
=
data
break
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'自动分配'
:
this
.
_autoAssign
()
break
}
},
_autoAssign
()
{
console
.
log
(
'自动分配'
)
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/sample-preparation-record-his/RecordRightList.vue
0 → 100644
View file @
32ed99c6
This diff is collapsed.
Click to expand it.
pages/soil-sample-manage/sample-preparation/sample-preparation-record/RecordRightList.vue
View file @
32ed99c6
...
@@ -183,7 +183,10 @@ export default {
...
@@ -183,7 +183,10 @@ export default {
case
'查看原始记录'
:
case
'查看原始记录'
:
console
.
log
(
data
)
console
.
log
(
data
)
if
(
data
.
recordId
)
{
if
(
data
.
recordId
)
{
this
.
_viewRecord
(
data
.
recordId
)
this
.
$refs
.
editModal
.
_openWithType
(
data
.
recordId
,
'ENVTESTMAKEEDIT'
)
}
else
{
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
}
...
...
router/soil-routes.js
View file @
32ed99c6
...
@@ -12,6 +12,7 @@ import SamplePreparationIndex from '../pages/soil-sample-manage/sample-preparati
...
@@ -12,6 +12,7 @@ import SamplePreparationIndex from '../pages/soil-sample-manage/sample-preparati
import
SamplePreparationCheckIndex
from
'../pages/soil-sample-manage/sample-preparation-check/SamplePreparationIndex'
import
SamplePreparationCheckIndex
from
'../pages/soil-sample-manage/sample-preparation-check/SamplePreparationIndex'
import
AddressManage
from
'../pages/soil-sample-manage/sample-address/AddressManage'
import
AddressManage
from
'../pages/soil-sample-manage/sample-address/AddressManage'
import
KeepAdress
from
'../pages/soil-sample-manage/keep-address/AddressManage'
import
KeepAdress
from
'../pages/soil-sample-manage/keep-address/AddressManage'
import
BoxManage
from
'../pages/soil-sample-manage/sample-box/BoxManage'
import
BackupsManage
from
'../pages/soil-sample-manage/backups-manage/SampleBackupsIndex'
import
BackupsManage
from
'../pages/soil-sample-manage/backups-manage/SampleBackupsIndex'
import
SampleTakeIndex
from
'../pages/soil-sample-manage/sample-take/SampleTakeIndex'
import
SampleTakeIndex
from
'../pages/soil-sample-manage/sample-take/SampleTakeIndex'
import
SurplusManage
from
'../pages/soil-sample-manage/surplus-manage/SampleSurplusIndex'
import
SurplusManage
from
'../pages/soil-sample-manage/surplus-manage/SampleSurplusIndex'
...
@@ -117,6 +118,11 @@ export default [
...
@@ -117,6 +118,11 @@ export default [
path
:
'receive_location'
,
path
:
'receive_location'
,
component
:
AddressManage
,
component
:
AddressManage
,
meta
:
{
title
:
'收样位置管理'
}
meta
:
{
title
:
'收样位置管理'
}
},
{
path
:
'box'
,
component
:
BoxManage
,
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