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
fc044299
Commit
fc044299
authored
Sep 27, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了管理样品查看原始记录和查看指标按钮
parent
3a55afe6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
213 additions
and
12 deletions
+213
-12
soil-test.js
api/soil/soil-test.js
+7
-1
IndexManage.vue
pages/soil-test-manage/test-input/IndexManage.vue
+162
-0
IndexManageEdit.vue
pages/soil-test-manage/test-input/IndexManageEdit.vue
+0
-0
ItemRightList.vue
...s/soil-test-manage/test-input/item-tabs/ItemRightList.vue
+44
-11
No files found.
api/soil/soil-test.js
View file @
fc044299
...
@@ -55,5 +55,11 @@ export default {
...
@@ -55,5 +55,11 @@ export default {
.
post
(
'soil/v1/original_record/update_original_record'
,
data
)
.
post
(
'soil/v1/original_record/update_original_record'
,
data
)
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
pageOriginalExp
:
data
=>
pageOriginalExp
:
data
=>
http
.
post
(
'soil/v1/experiment/page_original_exp'
,
data
).
then
(
res
=>
res
)
http
.
post
(
'soil/v1/experiment/page_original_exp'
,
data
).
then
(
res
=>
res
),
// 查看指标分页列表
itemPage
:
data
=>
http
.
post
(
'soil/v1/item/page'
,
data
).
then
(
res
=>
res
),
itemSave
:
data
=>
http
.
post
(
'soil/v1/item/'
,
data
).
then
(
res
=>
res
),
itemEdit
:
data
=>
http
.
put
(
'soil/v1/item/'
+
data
.
id
,
data
.
obj
).
then
(
res
=>
res
),
itemGetById
:
data
=>
http
.
get
(
'soil/v1/item/'
+
data
).
then
(
res
=>
res
)
}
}
pages/soil-test-manage/test-input/IndexManage.vue
0 → 100644
View file @
fc044299
<
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"
:iconMsg=
"iconMsg"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='defaulted'"
>
{{
scope
.
row
[
item
.
key
]?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</div>
</Modal>
<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
:
''
,
name
:
'添加指标'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
pageColumns
:
[
{
title
:
'试验指标名称'
,
key
:
'name'
},
{
title
:
'试验指标大类'
,
key
:
'mainType'
,
width
:
120
},
{
title
:
'试验指标小类'
,
key
:
'smallType'
,
width
:
120
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
120
},
{
title
:
'检测值'
,
key
:
'testValue'
,
width
:
120
},
{
title
:
'单位'
,
key
:
'unit'
,
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
.
experimentId
=
this
.
id
const
result
=
await
soilTest
.
itemPage
(
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/IndexManageEdit.vue
0 → 100644
View file @
fc044299
This diff is collapsed.
Click to expand it.
pages/soil-test-manage/test-input/item-tabs/ItemRightList.vue
View file @
fc044299
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
<!-- 表格 -->
<!-- 表格 -->
<Col
span=
"24"
>
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:pageColumns=
"pageColumns"
:tableHeight=
"tableHeight"
<PTVXETable
ref=
"pageTable"
:pageColumns=
"pageColumns"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:table-name=
"tableName"
:rows=
"100"
is-task
select-data
>
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:
icon-msg=
"iconMsg"
:
table-name=
"tableName"
:rows=
"100"
is-task
select-data
>
<vxe-table-column
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
:key=
"item.key"
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_assignBackData"
></AssignPerson>
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_assignBackData"
></AssignPerson>
<SelectOriTempRecord
ref=
"recordModal"
@
on-result-change=
"_page"
></SelectOriTempRecord>
<SelectOriTempRecord
ref=
"recordModal"
@
on-result-change=
"_page"
></SelectOriTempRecord>
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -57,8 +58,14 @@ import { soilTest } from '../../../../api'
...
@@ -57,8 +58,14 @@ import { soilTest } from '../../../../api'
import
AssignPerson
from
'../../../../components/user-info-single/AssignPerson'
import
AssignPerson
from
'../../../../components/user-info-single/AssignPerson'
import
SelectOriTempRecord
from
'../SelectOriTempRecord'
import
SelectOriTempRecord
from
'../SelectOriTempRecord'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
import
IndexManage
from
'../IndexManage'
export
default
{
export
default
{
components
:
{
AssignPerson
,
SelectOriTempRecord
,
OriginalRecordEdit
},
components
:
{
AssignPerson
,
SelectOriTempRecord
,
OriginalRecordEdit
,
IndexManage
},
data
()
{
data
()
{
return
{
return
{
// 定义表格名称----英文
// 定义表格名称----英文
...
@@ -104,7 +111,10 @@ export default {
...
@@ -104,7 +111,10 @@ export default {
},
},
{
type
:
''
,
id
:
'food-task-assign-maintain-info'
,
name
:
'信息维护'
}
{
type
:
''
,
id
:
'food-task-assign-maintain-info'
,
name
:
'信息维护'
}
],
],
iconMsg
:
[{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑原始记录'
}],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
}
],
getPage
:
{},
getPage
:
{},
pageColumns
:
[
pageColumns
:
[
{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
,
fixed
:
'left'
},
{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
,
fixed
:
'left'
},
...
@@ -113,6 +123,7 @@ export default {
...
@@ -113,6 +123,7 @@ export default {
{
title
:
'试样包装类型'
,
key
:
'samplePack'
,
width
:
180
},
{
title
:
'试样包装类型'
,
key
:
'samplePack'
,
width
:
180
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'原始记录是否填写'
,
key
:
'recorded'
,
width
:
140
},
{
title
:
'检测方法'
,
key
:
'testMethod'
,
width
:
260
},
{
title
:
'检测方法'
,
key
:
'testMethod'
,
width
:
260
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
140
},
{
title
:
'检测依据'
,
key
:
'testBasis'
,
width
:
140
},
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
150
}
{
title
:
'检测科室'
,
key
:
'groupName'
,
width
:
150
}
...
@@ -148,18 +159,40 @@ export default {
...
@@ -148,18 +159,40 @@ export default {
_iconClick
(
res
,
data
,
currentComponent
)
{
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
switch
(
res
)
{
case
'编辑原始记录'
:
case
'查看原始记录'
:
this
.
_recordEdit
(
data
)
console
.
log
(
data
)
this
.
_viewRecord
(
'1309434759937146882'
)
break
case
'查看指标'
:
this
.
_indexManage
(
data
)
break
break
}
}
})
})
},
},
_recordEdit
(
data
)
{
_indexManage
(
data
)
{
console
.
log
(
data
)
this
.
$refs
.
indexModal
.
_open
(
data
)
// this.$refs.editModal._openWithType(
},
// data.originalRecordId,
_viewRecord
(
originalRecordId
)
{
// 'ENVTESTAUDITEDIT'
// layx.iframe('labRecordWriteOriView', '原始记录预览', Global.recordURL + '/print/v1/form/' + originalRecordId, {
// )
// eslint-disable-next-line no-undef
layx
.
iframe
(
'labRecordWriteOriView'
,
'原始记录预览'
,
Global
.
recordURL
+
'/print/v1/form/'
+
originalRecordId
+
'?type=ENVTESTMAKE'
,
{
event
:
{
onload
:
{
after
:
function
(
layxWindow
,
winform
)
{
// eslint-disable-next-line no-undef
layx
.
max
(
winform
.
id
)
}
}
}
}
)
},
},
// 获取column
// 获取column
_getColumn
()
{
_getColumn
()
{
...
...
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