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
fd08629f
Commit
fd08629f
authored
Oct 28, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了数据录入按样品录入
parent
006c1b09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
124 additions
and
10 deletions
+124
-10
ItemRightList.vue
...s/soil-test-manage/test-input/item-tabs/ItemRightList.vue
+6
-1
SampleRightList.vue
...il-test-manage/test-input/sample-tabs/SampleRightList.vue
+118
-9
No files found.
pages/soil-test-manage/test-input/item-tabs/ItemRightList.vue
View file @
fd08629f
...
@@ -168,7 +168,12 @@ export default {
...
@@ -168,7 +168,12 @@ export default {
switch
(
res
)
{
switch
(
res
)
{
case
'查看原始记录'
:
case
'查看原始记录'
:
console
.
log
(
data
)
console
.
log
(
data
)
this
.
_viewRecord
(
'1309434759937146882'
)
if
(
data
.
recorded
===
'是'
)
{
// this._viewRecord('1309434759937146882')
this
.
_viewRecord
(
data
.
originalRecordId
)
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
break
break
case
'查看指标'
:
case
'查看指标'
:
this
.
_indexManage
(
data
)
this
.
_indexManage
(
data
)
...
...
pages/soil-test-manage/test-input/sample-tabs/SampleRightList.vue
View file @
fd08629f
...
@@ -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"
:
icon-msg=
"iconMsg"
:
getPage=
"getPage"
: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"
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</div>
</div>
<a
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<a
v-else-if=
"item.key==='code'"
@
click
.
stop=
"_detailModal(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<a
v-else-if=
"item.key==='num'"
@
click
.
stop=
"_sampleDetail(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<a
v-else-if=
"item.key==='num'"
@
click
.
stop=
"_sampleDetail(scope.row)"
>
{{
scope
.
row
[
item
.
key
]
}}
</a>
<span
v-else-if=
"item.key==='
statu
s'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
v-else-if=
"item.key==='
progres
s'"
>
{{
scope
.
row
[
item
.
key
].
display
}}
</span>
<span
<span
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
v-else-if=
"item.date"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd'
):
''
}}
</span>
<span
v-else-if=
"item.datetime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</span>
<span
v-else-if=
"item.datetime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</span>
...
@@ -48,14 +48,20 @@
...
@@ -48,14 +48,20 @@
</Col>
</Col>
</Row>
</Row>
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_assignBackData"
></AssignPerson>
<AssignPerson
ref=
"personModal"
@
on-result-change=
"_assignBackData"
></AssignPerson>
<SelectOriTempRecord
ref=
"recordModal"
@
on-result-change=
"_page"
></SelectOriTempRecord>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Global
from
'../../../../api/config'
import
Global
from
'../../../../api/config'
import
{
soilTest
}
from
'../../../../api'
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
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
IndexManage
from
'../IndexManage'
export
default
{
export
default
{
components
:
{
AssignPerson
},
components
:
{
AssignPerson
,
SelectOriTempRecord
,
SelEquip
,
IndexManage
},
data
()
{
data
()
{
return
{
return
{
// 定义表格名称----英文
// 定义表格名称----英文
...
@@ -86,7 +92,9 @@ export default {
...
@@ -86,7 +92,9 @@ export default {
{
key
:
'detectType'
,
name
:
'样品类别'
,
placeholder
:
'请输入样品类别'
}
{
key
:
'detectType'
,
name
:
'样品类别'
,
placeholder
:
'请输入样品类别'
}
],
],
btn
:
[
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'试验项目分配'
},
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'完成提交'
},
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
},
{
type
:
''
,
id
:
'food-task-assign-adjust-group'
,
name
:
'调整分组'
},
{
type
:
''
,
id
:
'food-task-assign-adjust-group'
,
name
:
'调整分组'
},
{
{
type
:
''
,
type
:
''
,
...
@@ -95,15 +103,23 @@ export default {
...
@@ -95,15 +103,23 @@ export default {
},
},
{
type
:
''
,
id
:
'food-task-assign-maintain-info'
,
name
:
'信息维护'
}
{
type
:
''
,
id
:
'food-task-assign-maintain-info'
,
name
:
'信息维护'
}
],
],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'md-apps'
,
id
:
''
,
name
:
'查看指标'
}
],
getPage
:
{},
getPage
:
{},
pageColumns
:
[
pageColumns
:
[
{
title
:
'试验名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'试验项目'
,
key
:
'name'
,
width
:
120
,
fixed
:
'left'
},
{
title
:
'试验项目英文简写'
,
key
:
'shortName'
,
width
:
140
},
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
180
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
180
},
{
title
:
'试样包装类型'
,
key
:
'samplePack'
,
width
:
180
},
{
title
:
'是否填写原始记录'
,
key
:
'recorded'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'progress'
,
width
:
180
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'大类'
,
key
:
'mainType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'小类'
,
key
:
'smallType'
,
width
:
140
},
{
title
:
'检测
依据'
,
key
:
'testBasis'
,
width
:
18
0
},
{
title
:
'检测
方法'
,
key
:
'testMethod'
,
width
:
26
0
},
{
title
:
'
试验方法'
,
key
:
'testMethod'
,
width
:
18
0
},
{
title
:
'
检测依据'
,
key
:
'testBasis'
,
width
:
14
0
},
{
title
:
'
状态'
,
key
:
'status'
,
width
:
18
0
}
{
title
:
'
检测科室'
,
key
:
'groupName'
,
width
:
15
0
}
],
],
leftSelectData
:
[],
leftSelectData
:
[],
sampleIds
:
[],
sampleIds
:
[],
...
@@ -238,6 +254,9 @@ export default {
...
@@ -238,6 +254,9 @@ export default {
})
})
}
}
},
},
_equipResult
(
res
)
{
console
.
log
(
res
)
},
// 调整分组
// 调整分组
_userGroupResult
(
data
)
{
_userGroupResult
(
data
)
{
const
tempData
=
{
const
tempData
=
{
...
@@ -260,6 +279,15 @@ export default {
...
@@ -260,6 +279,15 @@ export default {
case
'试验项目分配'
:
case
'试验项目分配'
:
this
.
_userAssign
()
this
.
_userAssign
()
break
break
case
'填写原始记录'
:
this
.
_addRecord
()
break
case
'完成提交'
:
this
.
_submitItem
(
this
.
selectData
)
break
case
'设备'
:
this
.
_selectEquipment
()
break
case
'按组分配'
:
case
'按组分配'
:
await
this
.
_reportDueDate
()
await
this
.
_reportDueDate
()
await
this
.
_groupAssign
()
await
this
.
_groupAssign
()
...
@@ -285,6 +313,41 @@ export default {
...
@@ -285,6 +313,41 @@ export default {
break
break
}
}
},
},
_selectEquipment
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
$refs
.
selEquip
.
_open
(
'sample-input'
)
}
},
_submitItem
(
data
)
{
console
.
log
(
data
)
if
(
data
[
0
].
recorded
!==
'是'
)
{
this
.
$Message
.
warning
(
'未编制报告不能提交'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定提交该数据?'
,
onOk
:
()
=>
{
this
.
_submitOk
()
}
})
}
},
_submitOk
:
async
function
()
{
const
result
=
await
soilTest
.
endExp
(
this
.
selectIds
.
join
(
','
))
if
(
result
)
{
this
.
_resultChange
(
'提交成功'
)
}
},
_addRecord
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$message
.
warning
(
'请至少选择一条数据'
)
}
else
{
console
.
log
(
'打开填写原始记录界面'
)
this
.
$refs
.
recordModal
.
_open
(
this
.
selectIds
,
this
.
entrustId
)
}
},
// 信息维护
// 信息维护
_maintainInfo
()
{
_maintainInfo
()
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
if
(
this
.
selectSampleIds
.
length
===
0
)
{
...
@@ -366,6 +429,9 @@ export default {
...
@@ -366,6 +429,9 @@ export default {
this
.
selectIds
=
selectIds
this
.
selectIds
=
selectIds
this
.
selectData
=
data
this
.
selectData
=
data
break
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
case
'table-col'
:
case
'table-col'
:
// 用户选中的表格列
// 用户选中的表格列
this
.
userColumns
=
data
this
.
userColumns
=
data
...
@@ -376,6 +442,49 @@ export default {
...
@@ -376,6 +442,49 @@ export default {
break
break
}
}
},
},
_iconClick
(
res
,
data
,
currentComponent
)
{
this
.
$nextTick
(()
=>
{
switch
(
res
)
{
case
'查看原始记录'
:
console
.
log
(
data
)
if
(
data
.
recorded
===
'是'
)
{
// this._viewRecord('1309434759937146882')
this
.
_viewRecord
(
data
.
originalRecordId
)
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
break
case
'查看指标'
:
this
.
_indexManage
(
data
)
break
}
})
},
_indexManage
(
data
)
{
this
.
$refs
.
indexModal
.
_open
(
data
)
},
_viewRecord
(
originalRecordId
)
{
// 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
)
}
}
}
}
)
},
// 按人分配 选人选时间
// 按人分配 选人选时间
_userAssign
()
{
_userAssign
()
{
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
const
user
=
Global
.
getUserInfo
(
'userInfo'
)
...
...
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