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
acd66af3
Commit
acd66af3
authored
Dec 14, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了开土制备查看原始记录
parent
e371c714
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
161 additions
and
28 deletions
+161
-28
RecordRightList.vue
...preparation/sample-preparation-record/RecordRightList.vue
+80
-10
SampleRightList.vue
...il-test-manage/test-input/sample-tabs/SampleRightList.vue
+81
-18
No files found.
pages/soil-sample-manage/sample-preparation/sample-preparation-record/RecordRightList.vue
View file @
acd66af3
...
@@ -55,11 +55,12 @@
...
@@ -55,11 +55,12 @@
<CollectManage
ref=
"collectModal"
@
on-result-change=
"_page"
></CollectManage>
<CollectManage
ref=
"collectModal"
@
on-result-change=
"_page"
></CollectManage>
<CollectFileManage
ref=
"collectFileModal"
@
on-result-change=
"_page"
></CollectFileManage>
<CollectFileManage
ref=
"collectFileModal"
@
on-result-change=
"_page"
></CollectFileManage>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
<SelEquip
ref=
"selEquip"
@
on-result-change=
"_equipResult"
></SelEquip>
<CreateReport
ref=
"createModal"
@
on-result-change=
"_certificateSelectExcelBack"
></CreateReport>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Global
from
'../../../../api/config'
import
Global
from
'../../../../api/config'
import
{
soilTest
}
from
'../../../../api'
import
{
soil
Report
,
soilSample
,
soil
Test
}
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'
...
@@ -68,6 +69,7 @@ import SelEquip from '../../../../components/select-equip/SelEquip'
...
@@ -68,6 +69,7 @@ import SelEquip from '../../../../components/select-equip/SelEquip'
import
EquipManage
from
'../EquipManage'
import
EquipManage
from
'../EquipManage'
import
CollectManage
from
'../CollectManage'
import
CollectManage
from
'../CollectManage'
import
CollectFileManage
from
'../CollectFileManage'
import
CollectFileManage
from
'../CollectFileManage'
import
CreateReport
from
'../../../soil-test-manage/test-input/item-tabs/CreateReport'
export
default
{
export
default
{
components
:
{
components
:
{
AssignPerson
,
AssignPerson
,
...
@@ -77,7 +79,8 @@ export default {
...
@@ -77,7 +79,8 @@ export default {
SelEquip
,
SelEquip
,
EquipManage
,
EquipManage
,
CollectManage
,
CollectManage
,
CollectFileManage
CollectFileManage
,
CreateReport
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -117,6 +120,7 @@ export default {
...
@@ -117,6 +120,7 @@ export default {
],
],
btn
:
[
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'原始记录填写'
},
{
type
:
'success'
,
id
:
''
,
name
:
'完成提交'
},
{
type
:
'success'
,
id
:
''
,
name
:
'完成提交'
},
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
}
{
type
:
'success'
,
id
:
''
,
name
:
'设备'
}
],
],
...
@@ -182,14 +186,15 @@ export default {
...
@@ -182,14 +186,15 @@ export default {
switch
(
res
)
{
switch
(
res
)
{
case
'查看原始记录'
:
case
'查看原始记录'
:
console
.
log
(
data
)
console
.
log
(
data
)
if
(
data
.
recordId
)
{
this
.
_reportView
(
data
)
this
.
$refs
.
editModal
.
_openWithType
(
// if (data.recordId) {
data
.
recordId
,
// this.$refs.editModal._openWithType(
'ENVTESTMAKEEDIT'
// data.recordId,
)
// 'ENVTESTMAKEEDIT'
}
else
{
// )
this
.
$Message
.
warning
(
'未填写原始记录'
)
// } else {
}
// this.$Message.warning('未填写原始记录')
// }
break
break
case
'查看指标'
:
case
'查看指标'
:
this
.
_indexManage
(
data
)
this
.
_indexManage
(
data
)
...
@@ -206,6 +211,17 @@ export default {
...
@@ -206,6 +211,17 @@ export default {
}
}
})
})
},
},
_reportView
(
data
)
{
if
(
data
.
recorded
===
'是'
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
$refs
.
editModal
.
_openWithType
(
data
.
recordId
,
'ENVTESTMAKEEDIT'
)
}
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
},
_collectManage
(
data
)
{
_collectManage
(
data
)
{
this
.
$refs
.
collectModal
.
_open
(
data
)
this
.
$refs
.
collectModal
.
_open
(
data
)
},
},
...
@@ -401,6 +417,9 @@ export default {
...
@@ -401,6 +417,9 @@ export default {
case
'填写原始记录'
:
case
'填写原始记录'
:
this
.
_addRecord
()
this
.
_addRecord
()
break
break
case
'原始记录填写'
:
this
.
_makeCertificateExcelByTemp
()
break
case
'完成提交'
:
case
'完成提交'
:
this
.
_submitItem
(
this
.
selectData
)
this
.
_submitItem
(
this
.
selectData
)
break
break
...
@@ -432,6 +451,57 @@ export default {
...
@@ -432,6 +451,57 @@ export default {
break
break
}
}
},
},
_makeCertificateExcelByTemp
(
data
)
{
// this.$refs.SelectOriTempRecordExcel._open(data.id, data)
this
.
$refs
.
createModal
.
_open
()
},
_certificateSelectExcelBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_makeCodeExcel
(
data
)
}
else
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
// this._appendOriginalRecord()
}
}
},
_makeCodeExcel
:
async
function
(
data
)
{
console
.
log
(
this
.
selectIds
)
console
.
log
(
'----dddd---'
,
data
)
this
.
$refs
.
pageTable
.
_hideLoading
()
const
result
=
await
soilSample
.
generateExcelReport
(
data
)
if
(
result
)
{
await
this
.
_page
()
if
(
result
===
null
||
result
===
undefined
)
{
this
.
$Message
.
warning
(
'证书编制失败,请联系管理员!'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
return
false
}
else
{
this
.
$emit
(
'on-result-change'
)
this
.
_viewReport
(
result
)
}
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
getExcelOriginalRecord
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
_selectEquipment
()
{
_selectEquipment
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
...
...
pages/soil-test-manage/test-input/sample-tabs/SampleRightList.vue
View file @
acd66af3
...
@@ -56,17 +56,19 @@
...
@@ -56,17 +56,19 @@
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
<IndexManage
ref=
"indexModal"
@
on-result-change=
"_page"
></IndexManage>
<EquipManage
ref=
"equipModal"
@
on-result-change=
"_page"
></EquipManage>
<EquipManage
ref=
"equipModal"
@
on-result-change=
"_page"
></EquipManage>
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<OriginalRecordEdit
ref=
"editModal"
></OriginalRecordEdit>
<CreateReport
ref=
"createModal"
@
on-result-change=
"_certificateSelectExcelBack"
></CreateReport>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Global
from
'../../../../api/config'
import
Global
from
'../../../../api/config'
import
{
soilTest
}
from
'../../../../api'
import
{
soil
Report
,
soilSample
,
soil
Test
}
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
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
SelEquip
from
'../../../../components/select-equip/SelEquip'
import
IndexManage
from
'../IndexManage'
import
IndexManage
from
'../IndexManage'
import
EquipManage
from
'../EquipManage'
import
EquipManage
from
'../EquipManage'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
import
OriginalRecordEdit
from
'../OriginalRecordEdit'
import
CreateReport
from
'../item-tabs/CreateReport'
export
default
{
export
default
{
components
:
{
components
:
{
AssignPerson
,
AssignPerson
,
...
@@ -74,7 +76,8 @@ export default {
...
@@ -74,7 +76,8 @@ export default {
SelEquip
,
SelEquip
,
IndexManage
,
IndexManage
,
EquipManage
,
EquipManage
,
OriginalRecordEdit
OriginalRecordEdit
,
CreateReport
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -107,15 +110,9 @@ export default {
...
@@ -107,15 +110,9 @@ export default {
],
],
btn
:
[
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'填写原始记录'
},
{
type
:
'success'
,
id
:
''
,
name
:
'原始记录填写'
},
{
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-plan-date'
,
name
:
'设置计划完成时间'
},
{
type
:
''
,
id
:
'food-task-assign-maintain-info'
,
name
:
'信息维护'
}
],
],
iconMsg
:
[
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'查看原始记录'
},
...
@@ -318,6 +315,9 @@ export default {
...
@@ -318,6 +315,9 @@ export default {
case
'填写原始记录'
:
case
'填写原始记录'
:
this
.
_addRecord
()
this
.
_addRecord
()
break
break
case
'原始记录填写'
:
this
.
_makeCertificateExcelByTemp
()
break
case
'完成提交'
:
case
'完成提交'
:
this
.
_submitItem
(
this
.
selectData
)
this
.
_submitItem
(
this
.
selectData
)
break
break
...
@@ -349,6 +349,40 @@ export default {
...
@@ -349,6 +349,40 @@ export default {
break
break
}
}
},
},
_makeCertificateExcelByTemp
(
data
)
{
// this.$refs.SelectOriTempRecordExcel._open(data.id, data)
this
.
$refs
.
createModal
.
_open
()
},
_certificateSelectExcelBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_makeCodeExcel
(
data
)
}
else
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
// this._appendOriginalRecord()
}
}
},
_makeCodeExcel
:
async
function
(
data
)
{
console
.
log
(
this
.
selectIds
)
console
.
log
(
'----dddd---'
,
data
)
this
.
$refs
.
pageTable
.
_hideLoading
()
const
result
=
await
soilSample
.
generateExcelReport
(
data
)
if
(
result
)
{
await
this
.
_page
()
if
(
result
===
null
||
result
===
undefined
)
{
this
.
$Message
.
warning
(
'证书编制失败,请联系管理员!'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
return
false
}
else
{
this
.
$emit
(
'on-result-change'
)
this
.
_viewReport
(
result
)
}
}
},
_selectEquipment
()
{
_selectEquipment
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
...
@@ -488,14 +522,15 @@ export default {
...
@@ -488,14 +522,15 @@ export default {
switch
(
res
)
{
switch
(
res
)
{
case
'查看原始记录'
:
case
'查看原始记录'
:
console
.
log
(
data
)
console
.
log
(
data
)
if
(
data
.
recordId
)
{
this
.
_reportView
(
data
)
this
.
$refs
.
editModal
.
_openWithType
(
// if (data.recordId) {
data
.
recordId
,
// this.$refs.editModal._openWithType(
'ENVTESTMAKEEDIT'
// data.recordId,
)
// 'ENVTESTMAKEEDIT'
}
else
{
// )
this
.
$Message
.
warning
(
'未填写原始记录'
)
// } else {
}
// this.$Message.warning('未填写原始记录')
// }
break
break
case
'查看指标'
:
case
'查看指标'
:
this
.
_indexManage
(
data
)
this
.
_indexManage
(
data
)
...
@@ -506,6 +541,34 @@ export default {
...
@@ -506,6 +541,34 @@ export default {
}
}
})
})
},
},
_reportView
(
data
)
{
if
(
data
.
recorded
===
'是'
)
{
if
(
data
.
objectKey
)
{
this
.
_reportMakeLook
(
data
)
}
else
{
this
.
$refs
.
editModal
.
_openWithType
(
data
.
recordId
,
'ENVTESTMAKEEDIT'
)
}
}
else
{
this
.
$Message
.
warning
(
'未填写原始记录'
)
}
},
_reportMakeLook
:
async
function
(
data
)
{
console
.
log
(
data
)
const
result
=
await
soilReport
.
getExcelOriginalRecord
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
idType
:
10
,
id
:
data
.
id
,
isReport
:
4
})
}
},
_indexManage
(
data
)
{
_indexManage
(
data
)
{
this
.
$refs
.
indexModal
.
_open
(
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