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
8e11b6d4
Commit
8e11b6d4
authored
Oct 31, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了试样检测
parent
ac6411a8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
389 additions
and
3 deletions
+389
-3
soil-test.js
api/soil/soil-test.js
+7
-1
sys-org.js
api/sys/sys-org.js
+1
-1
CollectFileManage.vue
pages/soil-test-manage/test-input/CollectFileManage.vue
+199
-0
CollectManage.vue
pages/soil-test-manage/test-input/CollectManage.vue
+161
-0
ItemRightList.vue
...s/soil-test-manage/test-input/item-tabs/ItemRightList.vue
+21
-1
No files found.
api/soil/soil-test.js
View file @
8e11b6d4
...
...
@@ -129,5 +129,11 @@ export default {
.
then
(
res
=>
res
),
// 数据审核 按照样品审核 右侧分页列表
pageExpAuditSampleHis
:
data
=>
http
.
post
(
'soil/v1/sample/page_exp_audit_sample_his'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/sample/page_exp_audit_sample_his'
,
data
)
.
then
(
res
=>
res
),
collectDataPage
:
data
=>
http
.
post
(
'soil/v1/experiment_collect_data/page'
,
data
).
then
(
res
=>
res
),
collectFilePage
:
data
=>
http
.
post
(
'soil/v1/experiment_collect_file/page'
,
data
).
then
(
res
=>
res
)
}
api/sys/sys-org.js
View file @
8e11b6d4
...
...
@@ -21,5 +21,5 @@ export default {
// 当前用户所在部门
getOrg
:
()
=>
http
.
get
(
'/base/v1/org/current'
).
then
(
res
=>
res
),
// 首页模块
getModulesList
:
()
=>
http
.
post
(
'/base/v1/module/list_user_module_
food
'
)
getModulesList
:
()
=>
http
.
post
(
'/base/v1/module/list_user_module_
soil
'
)
}
pages/soil-test-manage/test-input/CollectFileManage.vue
0 → 100644
View file @
8e11b6d4
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"800"
class=
"modal-footer-none full-screen"
>
<div
slot=
"header"
>
{{
modalTitle
}}
</div>
<div>
<Form
id=
"index-right-form"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"仪器名称:"
>
<Input
v-model=
"formObj.equipName"
@
on-enter=
"_formSearch"
placeholder=
"请输入仪器名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 10px;"
/>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:icon-msg=
"iconMsg"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='defaulted'"
>
{{
scope
.
row
[
item
.
key
]?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</div>
<div
class=
"viewFileImg"
>
<vue-gallery-slideshow
:images=
"imgViewList"
:index=
"imgViewIndex"
@
close=
"imgViewIndex = null"
></vue-gallery-slideshow>
</div>
</Modal>
<IndexManageEdit
ref=
"indexEdit"
@
on-result-change=
"_page"
></IndexManageEdit>
</div>
</template>
<
script
>
import
{
soilAptitude
,
soilTest
}
from
'../../../api'
import
global
from
'../../../api/config'
import
IndexManageEdit
from
'./IndexManageEdit'
export
default
{
components
:
{
IndexManageEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[{
type
:
'success'
,
id
:
'ZBC'
,
name
:
'添加指标'
}],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
imgViewList
:
[],
imgViewIndex
:
null
,
viewUri
:
'/soil/v1/sample_photo/view'
,
pageColumns
:
[
{
title
:
'仪器名称'
,
key
:
'equipName'
,
width
:
120
},
{
title
:
'仪器编号'
,
key
:
'equipNum'
,
width
:
120
},
{
title
:
'规格型号'
,
key
:
'spec'
,
width
:
120
},
{
title
:
'仪器品牌'
,
key
:
'brand'
,
width
:
120
},
{
title
:
'实验室编号'
,
key
:
'labNum'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-eye'
,
id
:
''
,
name
:
'预览'
}],
selectIds
:
[],
formObj
:
{
name
:
''
},
// 资质信息
aptitudeItemInfo
:
{}
}
},
methods
:
{
_open
(
data
)
{
console
.
log
(
data
)
this
.
aptitudeItemInfo
=
data
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
id
=
data
.
id
this
.
modalTitle
=
data
.
name
+
' 查看采集数据'
this
.
showModal
=
true
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
expId
=
this
.
id
const
result
=
await
soilTest
.
collectFilePage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
console
.
log
(
result
)
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'预览'
:
this
.
_viewFile
(
data
)
break
}
},
_viewFile
(
data
)
{
// this.$pdfView(data.objectKey)
const
imgViewList
=
[]
// imgViewList.push(global.baseURL + this.downloadFileUrlFile + data.id)
this
.
imgViewList
=
imgViewList
imgViewList
.
push
(
global
.
baseURL
+
this
.
viewUri
+
'?id='
+
data
.
id
+
'&objectKey='
+
data
.
objectKey
)
console
.
log
(
global
.
baseURL
+
this
.
viewUri
+
'?id='
+
data
.
id
+
'&objectKey='
+
data
.
objectKey
)
this
.
imgViewIndex
=
0
},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
this
.
_getById
(
data
)
}
else
{
this
.
$refs
.
indexEdit
.
_open
(
this
.
id
,
''
)
}
},
_getById
:
async
function
(
data
)
{
const
result
=
await
soilTest
.
itemGetById
(
data
.
id
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$refs
.
indexEdit
.
_open
(
''
,
result
)
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加指标'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteByIds
()
break
}
},
_deleteByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
// this.$msgTip('warning')
this
.
$message
.
warning
(
'请至少选择一条记录'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除 '
+
this
.
selectIds
.
length
+
' 条记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
this
.
selectIds
)
}
})
}
},
_delOk
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
expItemDeleteByIds
(
ids
)
if
(
result
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
<
style
scoped
>
.viewFileImg
>>>
.vgs__container
{
height
:
100%
!important
;
}
</
style
>
pages/soil-test-manage/test-input/CollectManage.vue
0 → 100644
View file @
8e11b6d4
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"100"
class=
"modal-footer-none full-screen"
>
<div
slot=
"header"
>
{{
modalTitle
}}
</div>
<div>
<Form
id=
"index-right-form"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"采集内容:"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
placeholder=
"请输入采集内容"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 10px;"
/>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='defaulted'"
>
{{
scope
.
row
[
item
.
key
]?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</div>
</Modal>
<IndexManageEdit
ref=
"indexEdit"
@
on-result-change=
"_page"
></IndexManageEdit>
</div>
</template>
<
script
>
import
{
soilAptitude
,
soilTest
}
from
'../../../api'
import
IndexManageEdit
from
'./IndexManageEdit'
export
default
{
components
:
{
IndexManageEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[{
type
:
'success'
,
id
:
'ZBC'
,
name
:
'添加指标'
}],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
pageColumns
:
[
{
title
:
'采集内容'
,
key
:
'name'
},
{
title
:
'检测值'
,
key
:
'testValue'
,
width
:
120
},
{
title
:
'实验室编号'
,
key
:
'labNum'
,
width
:
120
},
{
title
:
'仪器名称'
,
key
:
'equipName'
,
width
:
120
},
{
title
:
'仪器编号'
,
key
:
'equipNum'
,
width
:
120
},
{
title
:
'规格型号'
,
key
:
'spec'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
}],
selectIds
:
[],
formObj
:
{
name
:
''
},
// 资质信息
aptitudeItemInfo
:
{}
}
},
methods
:
{
_open
(
data
)
{
console
.
log
(
data
)
this
.
aptitudeItemInfo
=
data
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
id
=
data
.
id
this
.
modalTitle
=
data
.
name
+
' 查看采集数据'
this
.
showModal
=
true
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
expId
=
this
.
id
const
result
=
await
soilTest
.
collectDataPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
console
.
log
(
result
)
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
}
},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
this
.
_getById
(
data
)
}
else
{
this
.
$refs
.
indexEdit
.
_open
(
this
.
id
,
''
)
}
},
_getById
:
async
function
(
data
)
{
const
result
=
await
soilTest
.
itemGetById
(
data
.
id
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$refs
.
indexEdit
.
_open
(
''
,
result
)
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加指标'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteByIds
()
break
}
},
_deleteByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
// this.$msgTip('warning')
this
.
$message
.
warning
(
'请至少选择一条记录'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除 '
+
this
.
selectIds
.
length
+
' 条记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
this
.
selectIds
)
}
})
}
},
_delOk
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
expItemDeleteByIds
(
ids
)
if
(
result
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-input/item-tabs/ItemRightList.vue
View file @
8e11b6d4
...
...
@@ -52,6 +52,8 @@
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
<EquipManage
ref=
"equipModal"
@
on-result-change=
"_page"
></EquipManage>
<CollectManage
ref=
"collectModal"
@
on-result-change=
"_page"
></CollectManage>
<CollectFileManage
ref=
"collectFileModal"
@
on-result-change=
"_page"
></CollectFileManage>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
</div>
</template>
...
...
@@ -64,6 +66,8 @@ import OriginalRecordEdit from '../OriginalRecordEdit'
import
IndexManage
from
'../IndexManage'
import
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
EquipManage
from
'../EquipManage'
import
CollectManage
from
'../CollectManage'
import
CollectFileManage
from
'../CollectFileManage'
export
default
{
components
:
{
AssignPerson
,
...
...
@@ -71,7 +75,9 @@ export default {
OriginalRecordEdit
,
IndexManage
,
SelEquip
,
EquipManage
EquipManage
,
CollectManage
,
CollectFileManage
},
data
()
{
return
{
...
...
@@ -123,6 +129,8 @@ export default {
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
},
{
type
:
'ios-bookmarks'
,
id
:
''
,
name
:
'查看采集数据'
},
{
type
:
'ios-browsers'
,
id
:
''
,
name
:
'查看采集文件'
},
{
type
:
'ios-flask'
,
id
:
''
,
name
:
'设备列表'
}
],
getPage
:
{},
...
...
@@ -182,12 +190,24 @@ export default {
case
'查看指标'
:
this
.
_indexManage
(
data
)
break
case
'查看采集数据'
:
this
.
_collectManage
(
data
)
break
case
'查看采集文件'
:
this
.
_collectFileManage
(
data
)
break
case
'设备列表'
:
this
.
_equipManage
(
data
)
break
}
})
},
_collectManage
(
data
)
{
this
.
$refs
.
collectModal
.
_open
(
data
)
},
_collectFileManage
(
data
)
{
this
.
$refs
.
collectFileModal
.
_open
(
data
)
},
_indexManage
(
data
)
{
this
.
$refs
.
indexModal
.
_open
(
data
)
},
...
...
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