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
f5c18216
Commit
f5c18216
authored
Oct 28, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了数据录入设备列表
parent
38bed85a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
174 additions
and
3 deletions
+174
-3
soil-test.js
api/soil/soil-test.js
+5
-1
EquipManage.vue
pages/soil-test-manage/test-input/EquipManage.vue
+157
-0
ItemRightList.vue
...s/soil-test-manage/test-input/item-tabs/ItemRightList.vue
+12
-2
No files found.
api/soil/soil-test.js
View file @
f5c18216
...
...
@@ -103,5 +103,9 @@ export default {
addExpEquip
:
data
=>
https
.
post
(
'soil/v1/experiment_rel_equip/add_exp_equip'
,
JSON
.
stringify
(
data
))
.
then
(
res
=>
res
)
.
then
(
res
=>
res
),
equipPage
:
data
=>
http
.
post
(
'soil/v1/experiment_rel_equip/page'
,
data
).
then
(
res
=>
res
),
deleteEquip
:
data
=>
http
.
delete
(
'soil/v1/experiment_rel_equip/?ids='
+
data
).
then
(
res
=>
res
)
}
pages/soil-test-manage/test-input/EquipManage.vue
0 → 100644
View file @
f5c18216
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"800"
class=
"modal-footer-none full-screen"
>
<div
slot=
"header"
>
{{
modalTitle
}}
</div>
<div>
<Form
id=
"index-right-form"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"仪器名称:"
>
<Input
v-model=
"formObj.equipName"
@
on-enter=
"_formSearch"
placeholder=
"请输入仪器名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 10px;"
/>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:icon-msg=
"iconMsg"
:getPage=
"getPage"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='defaulted'"
>
{{
scope
.
row
[
item
.
key
]?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</div>
</Modal>
<IndexManageEdit
ref=
"indexEdit"
@
on-result-change=
"_page"
></IndexManageEdit>
</div>
</template>
<
script
>
import
{
soilTest
}
from
'../../../api'
import
IndexManageEdit
from
'./IndexManageEdit'
export
default
{
components
:
{
IndexManageEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
pageColumns
:
[
{
title
:
'仪器名称'
,
key
:
'equipName'
,
width
:
120
},
{
title
:
'仪器编号'
,
key
:
'equipNum'
,
width
:
120
},
{
title
:
'仪器品牌'
,
key
:
'brand'
,
width
:
120
},
{
title
:
'采集类型'
,
key
:
'collectionType'
,
width
:
120
},
{
title
:
'采集地址'
,
key
:
'collectionAddress'
,
width
:
120
},
{
title
:
'采集命令'
,
key
:
'acquisitionCommand'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-trash'
,
id
:
''
,
name
:
'删除'
}],
selectIds
:
[],
formObj
:
{
name
:
''
},
// 资质信息
aptitudeItemInfo
:
{}
}
},
methods
:
{
_open
(
data
)
{
console
.
log
(
data
)
this
.
aptitudeItemInfo
=
data
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
id
=
data
.
id
this
.
modalTitle
=
data
.
name
+
' 设备管理'
this
.
showModal
=
true
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
experimentId
=
this
.
id
const
result
=
await
soilTest
.
equipPage
(
this
.
$serializeForm
(
this
.
formObj
))
if
(
result
)
{
console
.
log
(
result
)
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
case
'删除'
:
this
.
_deleteByIds
(
data
.
id
)
break
}
},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
this
.
_getById
(
data
)
}
else
{
this
.
$refs
.
indexEdit
.
_open
(
this
.
id
,
''
)
}
},
_getById
:
async
function
(
data
)
{
const
result
=
await
soilTest
.
itemGetById
(
data
.
id
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$refs
.
indexEdit
.
_open
(
''
,
result
)
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加指标'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteByIds
()
break
}
},
_deleteByIds
(
id
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除这条记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
id
)
}
})
},
_delOk
:
async
function
(
id
)
{
const
result
=
await
soilTest
.
deleteEquip
(
id
)
if
(
result
)
{
this
.
$Message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-test-manage/test-input/item-tabs/ItemRightList.vue
View file @
f5c18216
...
...
@@ -51,6 +51,7 @@
<SelectOriTempRecord
ref=
"recordModal"
@
on-result-change=
"_page"
></SelectOriTempRecord>
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
<EquipManage
ref=
"equipModal"
@
on-result-change=
"_page"
></EquipManage>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
</div>
</template>
...
...
@@ -62,13 +63,15 @@ import SelectOriTempRecord from '../SelectOriTempRecord'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
import
IndexManage
from
'../IndexManage'
import
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
EquipManage
from
'../EquipManage'
export
default
{
components
:
{
AssignPerson
,
SelectOriTempRecord
,
OriginalRecordEdit
,
IndexManage
,
SelEquip
SelEquip
,
EquipManage
},
data
()
{
return
{
...
...
@@ -119,7 +122,8 @@ export default {
],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
}
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
},
{
type
:
'ios-flask'
,
id
:
''
,
name
:
'设备列表'
}
],
getPage
:
{},
pageColumns
:
[
...
...
@@ -178,12 +182,18 @@ export default {
case
'查看指标'
:
this
.
_indexManage
(
data
)
break
case
'设备列表'
:
this
.
_equipManage
(
data
)
break
}
})
},
_indexManage
(
data
)
{
this
.
$refs
.
indexModal
.
_open
(
data
)
},
_equipManage
(
data
)
{
this
.
$refs
.
equipModal
.
_open
(
data
)
},
_viewRecord
(
originalRecordId
)
{
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
// eslint-disable-next-line no-undef
...
...
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