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
678e7b8f
Commit
678e7b8f
authored
Jul 03, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了编制证书
parent
5f4b4e43
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
604 additions
and
2 deletions
+604
-2
CertificateMake.vue
pages/meter-certificate/CertificateMake.vue
+7
-1
CertificateMakeLook.vue
pages/meter-certificate/CertificateMakeLook.vue
+7
-1
MeterOutPersonalTask.vue
pages/meter-out/personal-task/MeterOutPersonalTask.vue
+61
-0
OriginalRecordClassTree.vue
pages/meter-out/personal-task/OriginalRecordClassTree.vue
+155
-0
RecordIframe.vue
pages/meter-out/personal-task/RecordIframe.vue
+126
-0
SelectOriTempRecord.vue
pages/meter-out/personal-task/SelectOriTempRecord.vue
+244
-0
common.js
plugins/common.js
+4
-0
No files found.
pages/meter-certificate/CertificateMake.vue
View file @
678e7b8f
<
template
>
<div>
<Modal
v-model=
"showDiagramModal"
title=
"检定(校准)证书编制"
width=
"1
300"
class=
"footer-hidden
"
>
<Modal
v-model=
"showDiagramModal"
title=
"检定(校准)证书编制"
width=
"1
00%"
class=
"footer-hidden iframeOne
"
>
<div
id=
"iframeOne"
style=
"text-align:center;align-content:center;width: 100%;height: 790px"
>
</div>
<div
slot=
"footer"
>
...
...
@@ -107,3 +107,9 @@ export default {
}
}
</
script
>
<
style
>
.iframeOne
.ivu-modal
{
position
:
relative
!important
;
top
:
0px
!important
;
}
</
style
>
pages/meter-certificate/CertificateMakeLook.vue
View file @
678e7b8f
<
template
>
<div>
<Modal
v-model=
"showDiagramModalSampleLook"
title=
"检定(校准)证书"
width=
"1
300"
class=
"footer-hidden
"
>
<Modal
v-model=
"showDiagramModalSampleLook"
title=
"检定(校准)证书"
width=
"1
00%"
class=
"footer-hidden iframeSampleLookThree
"
>
<div
id=
"iframeSampleLookThree"
style=
"text-align:center;align-content:center;width: 100%;height: 790px"
>
</div>
<div
slot=
"footer"
>
...
...
@@ -80,3 +80,9 @@ export default {
}
}
</
script
>
<
style
>
.iframeSampleLookThree
.ivu-modal
{
position
:
relative
!important
;
top
:
0px
!important
;
}
</
style
>
pages/meter-out/personal-task/MeterOutPersonalTask.vue
View file @
678e7b8f
...
...
@@ -59,6 +59,8 @@
</Row>
</div>
</div>
<CertificateMake
ref=
"itemOriginalRecordModal"
@
on-result-change=
"_resultRecord"
></CertificateMake>
<SelectOriTempRecord
ref=
"SelectOriTempRecord"
@
on-result-change=
"_certificateSelectBack"
></SelectOriTempRecord>
<docimasy
ref=
"docimasy"
@
on-result-change=
"_page"
></docimasy>
<FileManage
ref=
"FileManage"
@
on-result-change=
"_page"
></FileManage>
<operationModal
ref=
"operationModal"
@
on-result-change=
"_page"
></operationModal>
...
...
@@ -67,19 +69,27 @@
<InstruMentEdit
ref=
"InstruEdit"
@
on-result-change=
"_page"
></InstruMentEdit>
<MeterPersonItemTaskManage
ref=
"personModal"
@
on-result-change=
"_page"
></MeterPersonItemTaskManage>
<MeterSubcontractorEdit
ref=
"editSubcontractorModal"
@
on-result-change=
"_formSearch"
></MeterSubcontractorEdit>
<CertificateMakeLook
ref=
"itemOriginalRecordLookModal"
@
on-result-change=
"_resultRecord"
></CertificateMakeLook>
</div>
</template>
<
script
>
import
{
meterDevice
,
meterSample
}
from
'../../../api'
import
CertificateMake
from
'../../meter-certificate/CertificateMake'
import
SelEquip
from
'../../../components/select-equip/SelEquip'
import
operationModal
from
'../../../components/operation/Operation'
import
CertificateMakeLook
from
'../../meter-certificate/CertificateMakeLook'
import
MeterSubcontractorEdit
from
'./MeterGoOutTestEdit'
import
CarManage
from
'./CarManage'
import
MeterPersonItemTaskManage
from
'./MeterPersonItemTaskManage'
import
InstruMentEdit
from
'./InstrumentEdit'
import
docimasy
from
'./docimasy'
import
SelectOriTempRecord
from
'./SelectOriTempRecord'
export
default
{
components
:
{
CertificateMake
,
CertificateMakeLook
,
SelectOriTempRecord
,
docimasy
,
MeterSubcontractorEdit
,
CarManage
,
...
...
@@ -117,6 +127,11 @@ export default {
],
iconMsg
:
[
{
type
:
'ios-bookmarks'
,
id
:
''
,
name
:
'编制证书'
},
{
type
:
'md-create'
,
id
:
''
,
name
:
'检测结果'
...
...
@@ -242,6 +257,9 @@ export default {
this
.
currentComponent
=
componentName
this
.
$nextTick
(
function
()
{
switch
(
res
)
{
case
'编制证书'
:
this
.
_makeCertificate
(
data
)
break
case
'仪器领用'
:
this
.
$refs
.
InstruEdit
.
_open
(
data
.
id
)
break
...
...
@@ -266,6 +284,49 @@ export default {
}
})
},
_certificateSelectBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
itemOriginalRecordModal
.
_open
(
data
.
sampleId
,
data
.
tempId
,
data
.
dataSource
)
}
else
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
// this._appendOriginalRecord()
}
}
},
_makeCertificate
(
data
)
{
if
(
data
.
onlineReported
===
'否'
||
undefined
===
data
.
recordId
)
{
console
.
log
(
'click'
)
this
.
$refs
.
SelectOriTempRecord
.
_open
(
data
.
id
,
data
)
}
else
{
this
.
_itemOriginalRecordLook
(
data
,
'write'
)
}
},
_itemOriginalRecordLook
(
data
,
name
)
{
if
(
data
.
recordId
===
null
||
undefined
===
data
.
recordId
||
data
.
recordId
===
''
)
{
this
.
$Message
.
warning
(
'该检测项目暂无原始记录!'
)
}
else
{
this
.
$refs
.
itemOriginalRecordLookModal
.
_open
(
data
.
recordId
,
name
,
data
.
id
)
}
},
_resultRecord
()
{
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
},
_personModal
(
data
)
{
this
.
$refs
.
personModal
.
_open
(
data
.
id
)
},
...
...
pages/meter-out/personal-task/OriginalRecordClassTree.vue
0 → 100644
View file @
678e7b8f
<
template
>
<div>
<div>
<Form
onsubmit=
"return false"
>
<Form-item>
<Input
v-model=
"key"
@
on-enter=
"_search"
placeholder=
"请输入关键字,回车查询"
style=
"width:100%"
icon=
"ios-search-strong"
/>
</Form-item>
</Form>
</div>
<!--加载中-->
<div
v-show=
"isloading"
class=
"demo-spin-container spin-bg tree_height"
>
<Spin
fix
size=
"large"
></Spin>
</div>
<ul
:id=
"treeId"
v-show=
"isTree"
class=
"ztree ztreePro tree_height"
style=
"overflow-x: auto;"
></ul>
</div>
</
template
>
<
style
>
</
style
>
<
script
>
/**
* 原始记录类别添加编辑Ztree
*/
import
{
meterPrint
}
from
'../../../api'
export
default
{
data
()
{
return
{
treeId
:
''
,
key
:
''
,
isloading
:
true
,
isTree
:
false
,
setting
:
{
data
:
{
simpleData
:
{
enable
:
true
,
idKey
:
'id'
,
pIdKey
:
'pid'
}
},
callback
:
{
onClick
:
this
.
zTreeOnClick
}
},
businessTypeList
:
''
}
},
created
()
{
// this.$bus.$on('refreshTree', pid => {
// this._Ztree()
// })
},
methods
:
{
_Ztree
(
tableHeight
,
businessTypeList
)
{
this
.
key
=
''
this
.
treeId
=
'oriRecordClassTree'
+
this
.
$randomCode
()
this
.
isloading
=
false
this
.
isTree
=
true
if
(
businessTypeList
===
undefined
)
{
// 查询所有类别
this
.
_request
()
}
else
{
// 采样实/实验室不同类型
this
.
businessTypeList
=
businessTypeList
this
.
_requestByBusinessTypeList
()
}
// if (tableHeight) {
// $('.tree_height').height(tableHeight)
// } else {
// $('.tree_height').height(document.documentElement.clientHeight - 230)
// }
},
zTreeOnClick
(
event
,
treeId
,
treeNode
)
{
this
.
$emit
(
'on-result-change'
,
treeNode
)
},
_search
()
{
this
.
isloading
=
true
this
.
isTree
=
false
// 查询实验室、采样、所有类型的数据
if
(
this
.
businessTypeList
!==
undefined
)
{
this
.
_requestByBusinessTypeList
()
}
else
{
this
.
_request
()
}
this
.
$emit
(
'on-result-change'
)
},
// 原始记录模板管理查env所有的类别
_page
:
async
function
(
data
)
{
const
result
=
await
meterPrint
.
pageSampleInputRecordTemp
(
data
)
if
(
result
)
{
console
.
log
(
result
)
const
treeObj
=
$
.
fn
.
zTree
.
init
(
$
(
'#'
+
this
.
treeId
),
this
.
setting
,
result
)
treeObj
.
expandAll
(
true
)
}
else
{
console
.
log
(
'请求失败'
)
}
this
.
isloading
=
false
this
.
isTree
=
true
},
_request
()
{
console
.
log
(
'// 查询所有类别'
)
const
data
=
{}
if
(
this
.
key
)
{
data
.
name
=
this
.
key
}
this
.
_page
(
data
)
// this.$store.dispatch('ElnTemplateCategory/list', data).then(() => {
// const treeObj = $.fn.zTree.init(
// $('#' + this.treeId),
// this.setting,
// this.$store.state.ElnTemplateCategory.list
// )
// treeObj.expandAll(true)
// setTimeout(() => {
// this.isloading = false
// this.isTree = true
// }, 300)
// })
},
// 采样/实验室查env下,不同类型(采样/实验室)的树数据
_requestByBusinessTypeList
()
{
console
.
log
(
'采样/实验室查env下,不同类型(采样/实验室)的树数据'
)
const
data
=
{}
// data.businessTypeList = this.businessTypeList
if
(
this
.
key
)
{
data
.
name
=
this
.
key
}
this
.
_page
(
data
)
// this.$store.dispatch('ElnTemplateCategory/listType', data).then(() => {
// const treeObj = $.fn.zTree.init(
// $('#' + this.treeId),
// this.setting,
// this.$store.state.ElnTemplateCategory.list
// )
// treeObj.expandAll(true)
// setTimeout(() => {
// this.isloading = false
// this.isTree = true
// }, 300)
// })
}
}
}
</
script
>
<
style
>
.tree_height
{
height
:
300px
;
}
</
style
>
pages/meter-out/personal-task/RecordIframe.vue
0 → 100644
View file @
678e7b8f
<
template
>
<div>
</div>
</
template
>
<
script
>
import
{
Iframe
}
from
'../../../plugins/iframe'
export
default
{
props
:
{
ifrAction
:
null
},
data
()
{
return
{
iframeShow
:
false
,
isLoading
:
false
,
// fullScreenHeight: document.documentElement.clientHeight - 82 + 'px',
// iframeHeight: document.documentElement.clientHeight - 300 + 'px',
iframeHeader
:
'原始记录添加'
}
},
methods
:
{
/** 自定义iframe**/
_createIframe
(
bindUri
,
params
)
{
Iframe
.
iframe
(
bindUri
,
params
)
},
/** 自定义iframe的使用**/
_closeIframe
()
{
Iframe
.
closeModalDiv
()
}
}
}
</
script
>
<
style
>
.record-modal
{
width
:
800px
;
height
:
500px
;
border
:
1px
solid
#0079fd
;
position
:
fixed
;
box-shadow
:
0
0
10px
#505050
;
top
:
0
;
left
:
0
;
display
:
block
;
}
.record-modal-header
{
width
:
100%
;
height
:
30px
;
background-color
:
#ffffff
;
position
:
relative
;
border-bottom
:
1px
solid
#ffffff
;
}
.record-modal-title
{
width
:
200px
;
position
:
absolute
;
left
:
0
;
top
:
0
;
height
:
100%
;
font-size
:
14px
;
font-weight
:
400
;
color
:
#000
;
text-align
:
left
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
line-height
:
30px
;
margin-left
:
10px
;
}
.record-modal-btn
{
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
120px
;
height
:
100%
;
margin-top
:
0
;
/*margin-left: 680px;*/
}
.record-modal-btn
>
div
{
float
:
left
;
width
:
40px
;
height
:
100%
;
font-size
:
14px
;
line-height
:
30px
;
text-align
:
center
;
cursor
:
default
;
user-select
:
none
;
}
.record-modal-max
{
font-weight
:
bold
;
}
.record-modal-min
:hover
,
.record-modal-max
:hover
{
background-color
:
#e5e5e5
;
}
.record-modal-close
{
font-size
:
24px
!important
;
}
.record-modal-close
:hover
{
background-color
:
#e81123
!important
;
}
.record-modal-content
{
width
:
100%
;
height
:
470px
;
position
:
relative
;
background-color
:
#ffffff
;
}
.record-loading-content
{
background-color
:
#ffffff
;
width
:
100%
;
text-align
:
center
;
position
:
absolute
;
top
:
50%
;
transform
:
translateY
(
-50%
);
}
</
style
>
pages/meter-out/personal-task/SelectOriTempRecord.vue
0 → 100644
View file @
678e7b8f
<
template
>
<div>
<Modal
v-model=
"showModal"
v-drag
width=
"1100"
>
<p
slot=
"header"
>
选择原始记录模板
</p>
<div>
<TwoCard
:gutter=
16
@
on-result-change=
"_refresh"
left-name=
"原始记录模板类别"
right-name=
"实验室原始记录模板名称"
left-span=
"8"
>
<template
slot=
"left"
>
<OriginalRecordClassTree
ref=
"classTree"
@
on-result-change=
"_classData"
></OriginalRecordClassTree>
</
template
>
<
template
slot=
"right"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
:label-width=
"50"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
label=
"名称:"
>
<Input
v-model=
"formObj.title"
@
on-enter=
"_search"
placeholder=
"请输入名称"
style=
"width: 200px"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_search"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:height=
"300"
:get-page=
"getPage"
:is-radio=
"true"
@
on-result-change=
"_tableResultChange"
hide-checkbox
>
<vxe-table-column
v-for=
"(item,index) in pageColumns"
:key=
"index"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<div
v-if=
"item.key==='ctime'"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM:ss'
):
''
}}
</div>
<div
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</div>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</template>
</TwoCard>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerList"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
<!--自定义post请求iframe-->
<RecordIframe
ref=
"iframeModal"
></RecordIframe>
</div>
</template>
<
script
>
/**
* 选择原始记录模板(实验室的)
*/
import
Global
from
'../../../api/config'
import
TwoCard
from
'../../../components/base/TwoCard'
import
{
meterPrint
}
from
'../../../api'
import
RecordIframe
from
'./RecordIframe'
import
OriginalRecordClassTree
from
'./OriginalRecordClassTree'
let
count
=
0
export
default
{
components
:
{
OriginalRecordClassTree
,
TwoCard
,
RecordIframe
},
data
()
{
return
{
showModal
:
false
,
getPage
:
{},
pageColumns
:
[{
title
:
'名称'
,
key
:
'title'
}],
formObj
:
{
// id: '',
title
:
''
// businessTypeList: 0
},
selectData
:
[],
sampleId
:
''
,
sampleData
:
''
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
]
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
''
,
380
)
}
},
mounted
()
{
// 监听原始记录消息
window
.
addEventListener
(
'message'
,
this
.
_saveOriginal
)
},
// 销毁监听事件
beforeDestroy
()
{
count
=
0
window
.
removeEventListener
(
'message'
,
this
.
_saveOriginal
)
},
methods
:
{
// 刷新左右数据
_refresh
()
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
businessTypeList
=
0
// this.$refs.classTree._requestByBusinessTypeList()
this
.
_search
()
},
// 左侧数据请求
_classTree
()
{
const
height
=
this
.
$tableHeight
(
''
,
345
)
this
.
$refs
.
classTree
.
_Ztree
(
height
,
0
)
},
// 左边树的点击
_classData
(
result
)
{
if
(
result
!==
undefined
)
{
this
.
formObj
.
id
=
result
.
id
}
else
{
this
.
formObj
.
id
=
''
}
this
.
_search
()
},
/** *modal-footer */
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
showModal
=
false
break
case
'确定'
:
this
.
_ok
()
break
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_open
(
sampleId
,
data
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
_classTree
()
this
.
showModal
=
true
this
.
sampleId
=
sampleId
this
.
sampleData
=
data
this
.
_page
()
this
.
selectData
=
[]
this
.
_hideLoading
()
count
=
0
},
_page
:
async
function
(
data
)
{
const
result
=
await
meterPrint
.
pageSampleTemplate
(
data
)
if
(
result
)
{
this
.
getPage
=
result
}
},
_search
()
{
// this.$refs.pageTable._pageChange(1)
this
.
_page
(
this
.
formObj
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'singleSelect'
:
this
.
selectData
=
[
data
]
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_ok
()
{
if
(
this
.
selectData
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请选择一个原始记录模板!'
)
this
.
_hideLoading
()
}
else
{
// 校验多样品多项目原始记录模板
const
url
=
Global
.
recordURL
+
'/meter/v1/sample/certificate_record_data_bind?'
+
this
.
selectData
[
0
].
id
const
param
=
{
sampleId
:
this
.
sampleId
,
tempId
:
this
.
selectData
[
0
].
id
,
dataSource
:
this
.
sampleData
}
console
.
log
(
url
,
param
)
// this.$refs.iframeModal._createIframe(url, param)
this
.
$emit
(
'on-result-change'
,
param
)
}
},
_recordChange
()
{
this
.
$emit
(
'on-result-change'
)
},
// 保存原始记录信息
_saveOriginal
(
data
)
{
if
(
localStorage
.
getItem
(
'recordStatus'
)
===
'addLabRecord'
)
{
if
(
count
===
0
)
{
if
(
data
.
data
.
msg
!==
true
)
{
// 添加
const
tempData
=
{
formId
:
data
.
data
.
msg
,
ids
:
this
.
itemIds
.
join
(
','
)
}
console
.
log
(
'saveData'
,
data
)
const
copyMapTemp
=
{}
if
(
data
.
data
.
copySheet
&&
data
.
data
.
copyedSheet
)
{
tempData
.
copyMap
=
{}
const
copyedKey
=
String
(
data
.
data
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
data
.
data
.
copySheet
)
// 存在复制sheet的情况
tempData
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
}
else
if
(
typeof
data
.
data
.
testValueArry
!==
'undefined'
)
{
const
testValue
=
data
.
data
.
testValueArry
tempData
.
copyMap
=
{}
testValue
.
forEach
(
item
=>
{
const
copyedKey
=
String
(
item
.
copyedSheet
)
copyMapTemp
[
copyedKey
]
=
''
copyMapTemp
[
copyedKey
]
=
String
(
item
.
copySheet
)
tempData
.
copyMap
=
JSON
.
stringify
(
copyMapTemp
)
})
}
this
.
$store
.
dispatch
(
'EnvItem/saveFormForItem'
,
tempData
)
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
EnvItem
.
success
)
{
this
.
$Message
.
success
(
'添加成功'
)
this
.
_recordChange
()
this
.
$refs
.
iframeModal
.
_closeIframe
()
// 关闭所有layx弹框
// layx.destroyAll('recordAddTemplate');
}
})
}
}
count
=
count
+
1
}
}
}
}
</
script
>
plugins/common.js
View file @
678e7b8f
...
...
@@ -11,6 +11,10 @@ import global from '../api/config'
*echart颜色
*
*/
Vue
.
prototype
.
$layx
=
function
(
id
,
title
,
url
,
option
)
{
layx
.
iframe
(
id
,
title
,
url
,
option
||
{
width
:
'100%'
,
height
:
'100%'
})
}
Vue
.
prototype
.
$echartColor
=
[
'#00a0e9'
,
'#CD5555'
,
...
...
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