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
5edd0b93
Commit
5edd0b93
authored
Oct 20, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了报告编制
parent
9b664f66
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
145 additions
and
1 deletions
+145
-1
ItemView.vue
pages/soil-report-manage/report-make/ItemView.vue
+0
-0
OriginalRecordEdit.vue
pages/soil-report-manage/report-make/OriginalRecordEdit.vue
+139
-0
OriginalRecordView.vue
pages/soil-report-manage/report-make/OriginalRecordView.vue
+0
-0
ReportMakeByEntrust.vue
...il-report-manage/report-make/tabs/ReportMakeByEntrust.vue
+6
-1
No files found.
pages/soil-report-manage/report-make/ItemView.vue
0 → 100644
View file @
5edd0b93
This diff is collapsed.
Click to expand it.
pages/soil-report-manage/report-make/OriginalRecordEdit.vue
0 → 100644
View file @
5edd0b93
<
template
>
<div>
<!--
<Modal
v-model=
"showModal"
title=
"原始记录"
:mask-closable=
"false"
width=
"1300"
class=
"modal-footer-none"
>
-->
<!--
<div
style=
"text-align:center;align-content:center;width: 100%;height: 790px"
v-html=
"htmlContent"
>
-->
<!--
</div>
-->
<!--
</Modal>
-->
</div>
</
template
>
<
script
>
import
Global
from
'../../../api/config'
import
{
soilTest
}
from
'../../../api'
/**
* 编辑原始记录详情
*/
export
default
{
data
()
{
return
{
// showModal: false,
again
:
false
,
formId
:
''
,
htmlContent
:
''
,
formIdTemp
:
''
}
},
created
()
{
// 监听原始记录消息
// eslint-disable-next-line nuxt/no-globals-in-created
window
.
addEventListener
(
'message'
,
this
.
_saveOriginal
)
},
// 销毁监听事件
beforeDestroy
()
{
this
.
again
=
false
window
.
removeEventListener
(
'message'
,
this
.
_saveOriginal
)
},
methods
:
{
_open
(
formId
)
{
this
.
formId
=
formId
this
.
formIdTemp
=
formId
+
this
.
$randomCode
()
this
.
again
=
true
// this.showModal = true;
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const
bindUri
=
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
Global
.
recordURL
+
'/print/v1/eln/form_YT_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
// this.htmlContent = '
<
iframe
style
=
"padding: 0px;width:100%;height:100%"
frameborder
=
"0"
src
=
' + encodeURI(url) + '
><
/iframe>'
;
this
.
$layx
(
this
.
formIdTemp
,
'编辑原始记录'
,
url
)
},
_openWithType
(
formId
,
fromType
)
{
this
.
formId
=
formId
this
.
formIdTemp
=
formId
+
this
.
$randomCode
()
this
.
again
=
true
// this.showModal = true;
// 编辑的时候传此bindUri 是为了 绑定spreadJs自定义的公式
const
bindUri
=
Global
.
baseURL
+
'/env/v1/env_item/original_record_data_bind?source='
const
url
=
Global
.
recordURL
+
'/print/v1/eln/form_YT_'
+
formId
+
'?bindUri='
+
encodeURIComponent
(
bindUri
)
+
'&type='
+
fromType
// this.htmlContent = '
<
iframe
style
=
"padding: 0px;width:100%;height:100%"
frameborder
=
"0"
src
=
' + encodeURI(url) + '
><
/iframe>'
;
this
.
$layx
(
this
.
formIdTemp
,
'编辑原始记录'
,
url
)
},
_saveOriginal
(
data
)
{
console
.
log
(
'修改的数据'
,
data
)
if
(
this
.
again
)
{
if
(
data
.
data
.
msg
===
true
)
{
this
.
_editSaveRecord
(
data
)
}
else
{
this
.
_cancel
()
}
this
.
again
=
false
}
},
_cancel
()
{
// this.showModal = false;
// 关闭所有layx弹框
// eslint-disable-next-line no-undef
layx
.
destroyAll
(
this
.
formIdTemp
)
},
_updateRecord
:
async
function
(
param
)
{
const
result
=
await
soilTest
.
updateItem
(
param
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$Message
.
success
(
'保存成功'
)
this
.
_cancel
()
this
.
$emit
(
'on-result-change'
)
}
},
// 保存后解析项目的检测值
_editSaveRecord
(
data
)
{
const
param
=
{
formId
:
this
.
formId
}
console
.
log
(
'data'
,
data
)
const
copyMapTemp
=
{}
if
(
data
.
data
.
copySheet
&&
data
.
data
.
copyedSheet
)
{
param
.
copyMap
=
{}
const
copyedKey
=
String
(
data
.
data
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
data
.
data
.
copySheet
)
// 存在复制sheet的情况
param
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
}
else
if
(
typeof
data
.
data
.
testValueArry
!==
'undefined'
)
{
const
testValue
=
data
.
data
.
testValueArry
param
.
copyMap
=
{}
testValue
.
forEach
(
item
=>
{
const
copyedKey
=
String
(
item
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
item
.
copySheet
)
param
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
})
}
this
.
_updateRecord
(
param
)
// this.$store.dispatch('EnvItem/updateFormForItem', param).then(() => {
// if (this.$store.state.EnvItem.success) {
// this.$Message.success('保存成功')
// // this.showModal = false;
// this.$emit('on-result-change')
// this._cancel()
// }
// })
}
}
}
</
script
>
pages/soil-report-manage/report-make/OriginalRecordView.vue
0 → 100644
View file @
5edd0b93
This diff is collapsed.
Click to expand it.
pages/soil-report-manage/report-make/tabs/ReportMakeByEntrust.vue
View file @
5edd0b93
...
...
@@ -81,14 +81,16 @@
<SampleByMakeModal
ref=
"sampleByMakeModal"
></SampleByMakeModal>
<Operation
ref=
"operation"
></Operation>
<FileManage
ref=
"FileManage"
></FileManage>
<OriginalRecordView
ref=
"originalRecordView"
></OriginalRecordView>
</div>
</template>
<
script
>
import
{
soilStatistics
}
from
'../../../../api'
import
SampleByMakeModal
from
'../SampleByMakeModal'
import
Operation
from
'../../../../components/operation/Operation'
import
OriginalRecordView
from
'../OriginalRecordView'
export
default
{
components
:
{
SampleByMakeModal
,
Operation
},
components
:
{
SampleByMakeModal
,
Operation
,
OriginalRecordView
},
data
()
{
return
{
typeList
:
[{
name
:
'企业'
,
value
:
0
},
{
name
:
'政府'
,
value
:
1
}],
...
...
@@ -217,6 +219,9 @@ export default {
this
.
personal
)
break
case
'查看原始记录'
:
this
.
$refs
.
originalRecordView
.
_open
(
data
.
id
)
break
case
'检测项目'
:
this
.
$refs
.
refModal
.
_open
(
data
)
break
...
...
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