Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tianhongweb
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
liuyuping
tianhongweb
Commits
5d2f8010
Commit
5d2f8010
authored
Jan 04, 2022
by
lichunliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1-4
parent
b4bc34af
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1404 additions
and
766 deletions
+1404
-766
dangerjob.js
src/api/dangerjob.js
+25
-0
hwapproval.js
src/api/hwapproval.js
+2
-0
routers.js
src/router/routers.js
+9
-2
certifyStatistics.vue
src/views/entercertifies/certifyStatistics.vue
+50
-50
enterceritifies.vue
src/views/entercertifies/enterceritifies.vue
+532
-466
index.vue
src/views/entercertifies/index.vue
+79
-77
findapproval.vue
src/views/hwapproval/findapproval.vue
+76
-83
hwapproval.vue
src/views/hwapproval/hwapproval.vue
+92
-67
hwapprovals.vue
src/views/hwapproval/hwapprovals.vue
+339
-0
hwapprovalstatistics.vue
src/views/hwapproval/hwapprovalstatistics.vue
+86
-19
index.vue
src/views/nested/menu2/index.vue
+114
-2
No files found.
src/api/dangerjob.js
0 → 100644
View file @
5d2f8010
import
request
from
'
@/utils/request
'
import
requestFile
from
'
@/utils/requestfile
'
import
qs
from
'
qs
'
export
function
dangerCriteria
(
params
)
{
return
request
({
url
:
'
/api/dangerJobReport/criteria
'
,
method
:
'
get
'
,
params
})
}
export
function
dangerJobReport
(
params
)
{
//报告分页
return
request
({
url
:
'
/api/dangerJobReport/page
'
,
method
:
'
get
'
,
params
})
}
export
function
dangerJobReportEnterprise
(
params
)
{
//企业分页
return
request
({
url
:
'
/api/dangerJobReport/pageEnterprise
'
,
method
:
'
get
'
,
params
})
}
\ No newline at end of file
src/api/hwapproval.js
View file @
5d2f8010
...
...
@@ -25,3 +25,5 @@ export function postHwapproval(data) {
data
})
}
src/router/routers.js
View file @
5d2f8010
...
...
@@ -30,7 +30,7 @@ const editlaw = () => import('../views/law/editlaw.vue')
const
addadvice
=
()
=>
import
(
'
../views/advice/addadvice.vue
'
)
const
eidtadvice
=
()
=>
import
(
'
../views/advice/editadvice.vue
'
)
const
addwarn
=
()
=>
import
(
'
../views/warn/index.vue
'
)
const
addwarntype
=
()
=>
import
(
'
../views/warn/warntype.vue
'
)
const
addwarntype
=
()
=>
import
(
'
../views/warn/warntype.vue
'
)
const
live
=
()
=>
import
(
'
../views/live/index.vue
'
)
const
teach
=
()
=>
import
(
'
../views/teach/index.vue
'
)
const
addtype
=
()
=>
import
(
'
../views/teach/addtype.vue
'
)
...
...
@@ -66,6 +66,7 @@ const entercertifies = () => import('../views/entercertifies/enterceritifies.vue
const
hwapproval
=
()
=>
import
(
'
../views/hwapproval/hwapproval.vue
'
)
const
hwapprovalstatistics
=
()
=>
import
(
'
../views/hwapproval/hwapprovalstatistics.vue
'
)
const
hwapprovalsearch
=
()
=>
import
(
'
../views/hwapproval/findapproval.vue
'
)
const
hwapprovals
=
()
=>
import
(
'
../views/hwapproval/hwapprovals.vue
'
)
Vue
.
use
(
Router
)
...
...
@@ -462,7 +463,7 @@ export const constantRouterMap = [
name
:
'
手动组卷
'
,
meta
:
{
title
:
'
手动组卷
'
}
},
{
path
:
'
entercertifymanage/entercer
'
,
component
:
entercertify
,
...
...
@@ -504,6 +505,12 @@ export const constantRouterMap = [
component
:
hwapprovalsearch
,
name
:
'
危险作业备案查找
'
,
meta
:
{
title
:
'
危险作业备案查找
'
}
},
{
path
:
'
hwapprovalmanage/:name
'
,
component
:
hwapprovals
,
name
:
'
危险作业备案列表
'
,
meta
:
{
title
:
'
危险作业备案列表
'
}
}
]
},
...
...
src/views/entercertifies/certifyStatistics.vue
View file @
5d2f8010
...
...
@@ -15,90 +15,90 @@
</
template
>
<
script
>
import
{
analyzeCertify
}
from
'
@/api/certify.js
'
import
echarts
from
'
echarts
'
import
{
parseTime
}
from
'
@/utils/index
'
import
{
analyzeCertify
}
from
"
@/api/certify.js
"
;
import
echarts
from
"
echarts
"
;
import
{
parseTime
}
from
"
@/utils/index
"
;
export
default
{
data
()
{
return
{
certifySearchDate
:
''
}
certifySearchDate
:
""
,
}
;
},
watch
:
{
certifySearchDate
(
newVal
,
oldVal
)
{
// console.log(newVal, oldVal);
this
.
echartsdom
.
clear
()
this
.
statisticsCertify
()
}
this
.
echartsdom
.
clear
()
;
this
.
statisticsCertify
()
;
}
,
},
mounted
()
{
this
.
echartsdom
=
echarts
.
init
(
this
.
$refs
.
statistics
)
this
.
statisticsCertify
()
this
.
echartsdom
=
echarts
.
init
(
this
.
$refs
.
statistics
)
;
this
.
statisticsCertify
()
;
},
methods
:
{
statisticsCertify
()
{
// this.$refs.statistics
const
params
=
{}
const
params
=
{}
;
if
(
this
.
certifySearchDate
instanceof
Array
)
{
params
.
uploadEndDate
=
parseTime
(
new
Date
(),
'
{y}-{m}-{d}
'
)
params
.
uploadStartDate
=
parseTime
(
new
Date
(),
'
{y}-{m}-{d}
'
)
params
.
uploadEndDate
=
parseTime
(
new
Date
(),
"
{y}-{m}-{d}
"
);
params
.
uploadStartDate
=
parseTime
(
new
Date
(),
"
{y}-{m}-{d}
"
);
}
analyzeCertify
(
params
).
then
((
res
)
=>
{
const
data1
=
[]
const
data1
=
[]
;
for
(
const
key
in
res
)
{
data1
.
push
({
name
:
key
,
value
:
res
[
key
]
})
value
:
res
[
key
]
,
})
;
}
data1
.
map
(
function
(
val
)
{
if
(
val
.
name
===
'
stanEnterpriseNum
'
)
{
val
.
name
=
'
标准化体系的企业数量
'
}
else
if
(
val
.
name
===
'
stanAndEmerEnterpriseNum
'
)
{
val
.
name
=
'
标准化+应急企业数量
'
}
else
if
(
val
.
name
===
'
emerEnterpriseNum
'
)
{
val
.
name
=
'
应急预案的企业数量
'
}
else
if
(
val
.
name
===
'
dualEnterpriseNum
'
)
{
val
.
name
=
'
双体系证书的企业数量
'
}
else
if
(
val
.
name
===
'
dualAndStanEnterpriseNum
'
)
{
val
.
name
=
'
双体系+标准化企业数量
'
}
else
if
(
val
.
name
===
'
dualAndStanAndEmerEnterpriseNum
'
)
{
val
.
name
=
'
双体系+标准化+应急企业数量
'
}
else
if
(
val
.
name
===
'
dualAndEmerEnterpriseNum
'
)
{
val
.
name
=
'
双体系+应急企业数量
'
data1
.
map
(
function
(
val
)
{
if
(
val
.
name
===
"
stanEnterpriseNum
"
)
{
val
.
name
=
"
标准化体系的企业数量
"
;
}
else
if
(
val
.
name
===
"
stanAndEmerEnterpriseNum
"
)
{
val
.
name
=
"
标准化+应急企业数量
"
;
}
else
if
(
val
.
name
===
"
emerEnterpriseNum
"
)
{
val
.
name
=
"
应急预案的企业数量
"
;
}
else
if
(
val
.
name
===
"
dualEnterpriseNum
"
)
{
val
.
name
=
"
双体系证书的企业数量
"
;
}
else
if
(
val
.
name
===
"
dualAndStanEnterpriseNum
"
)
{
val
.
name
=
"
双体系+标准化企业数量
"
;
}
else
if
(
val
.
name
===
"
dualAndStanAndEmerEnterpriseNum
"
)
{
val
.
name
=
"
双体系+标准化+应急企业数量
"
;
}
else
if
(
val
.
name
===
"
dualAndEmerEnterpriseNum
"
)
{
val
.
name
=
"
双体系+应急企业数量
"
;
}
})
console
.
log
(
res
,
'
analyzeCertify
'
)
})
;
console
.
log
(
res
,
"
analyzeCertify
"
);
this
.
echartsdom
.
setOption
({
title
:
{
text
:
'
证书列表统计
'
,
left
:
'
center
'
text
:
"
证书列表统计
"
,
left
:
"
center
"
,
},
tooltip
:
{
trigger
:
'
item
'
,
formatter
:
'
{a} <br/>{b} : {c} ({d}%)
'
trigger
:
"
item
"
,
formatter
:
"
{a} <br/>{b} : {c}
"
,
},
series
:
[
{
name
:
'
证书列表
'
,
type
:
'
pie
'
,
radius
:
'
50%
'
,
name
:
"
证书列表
"
,
type
:
"
pie
"
,
radius
:
"
50%
"
,
data
:
data1
,
emphasis
:
{
itemStyle
:
{
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowColor
:
'
rgba(0, 0, 0, 0.5)
'
}
}
}
]
})
})
}
}
}
shadowColor
:
"
rgba(0, 0, 0, 0.5)
"
,
}
,
}
,
}
,
]
,
})
;
})
;
}
,
}
,
}
;
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/entercertifies/enterceritifies.vue
View file @
5d2f8010
<
template
>
<div
class=
"entercertifies-total-wrapper"
>
<div
class=
"tools-wrapper"
>
<el-button
type=
"primary"
@
click=
"createUploadCertify"
>
上传证书
</el-button>
<el-button
type=
"primary"
@
click=
"createUploadCertify"
>
上传证书
</el-button
>
</div>
<div
class=
"certify-find-tools-wrapper"
>
<div
class=
"certify-find-item"
>
<div
class=
"certify-title"
>
证书类别:
</div>
<div>
<el-select
v-model=
"certifyType"
placeholder=
"请选择证书类型"
>
<el-option
v-for=
"item in certifyTypes"
:key=
"item.label"
:label=
"item.label"
:value=
"item.value"
></el-option>
<el-option
v-for=
"item in certifyTypes"
:key=
"item.label"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</div>
</div>
<div
class=
"certify-find-item"
>
<div
class=
"certify-title"
>
证书名称:
</div>
<div>
<el-input
v-model=
"certifyName"
placeholder=
"请输入证书名称"
></el-input>
<el-input
v-model=
"certifyName"
placeholder=
"请输入证书名称"
></el-input>
</div>
</div>
<div
class=
"certify-find-item"
>
...
...
@@ -29,10 +36,11 @@
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"上传开始日期"
end-placeholder=
"上传结束日期"
>
end-placeholder=
"上传结束日期"
>
</el-date-picker>
</div>
</div>
</div>
<div
class=
"certify-find-item"
>
<div
class=
"certify-title"
>
有效日期:
</div>
<div>
...
...
@@ -41,7 +49,8 @@
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"有效开始日期"
end-placeholder=
"有效结束日期"
>
end-placeholder=
"有效结束日期"
>
</el-date-picker>
</div>
</div>
...
...
@@ -62,10 +71,7 @@
</div>
</div>
<div
class=
"emergencyplan-table-wrapper"
v-show=
"isShowEmergency"
>
<el-table
:data=
"emergencyplanTableData"
border
>
<el-table
:data=
"emergencyplanTableData"
border
>
<el-table-column
prop=
"name"
label=
"证书名称"
...
...
@@ -81,12 +87,14 @@
label=
"有效日期"
width=
"180"
></el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"success"
@
click=
"viewCertify(scope.row)"
>
查看
</el-button>
<el-button
type=
"primary"
@
click=
"downloadCertify(scope.row)"
>
下载
</el-button>
<el-button
type=
"success"
@
click=
"viewCertify(scope.row)"
>
查看
</el-button
>
<el-button
type=
"primary"
@
click=
"downloadCertify(scope.row)"
>
下载
</el-button
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -105,10 +113,7 @@
</div>
</div>
<div
class=
"dualsystem-table-wrapper"
v-show=
"isShowDualsystem"
>
<el-table
:data=
"dualsystemTableData"
border
>
<el-table
:data=
"dualsystemTableData"
border
>
<el-table-column
prop=
"name"
label=
"证书名称"
...
...
@@ -124,12 +129,14 @@
label=
"有效日期"
width=
"180"
></el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"success"
@
click=
"viewCertify(scope.row)"
>
查看
</el-button>
<el-button
type=
"primary"
@
click=
"downloadCertify(scope.row)"
>
下载
</el-button>
<el-button
type=
"success"
@
click=
"viewCertify(scope.row)"
>
查看
</el-button
>
<el-button
type=
"primary"
@
click=
"downloadCertify(scope.row)"
>
下载
</el-button
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -148,10 +155,7 @@
</div>
</div>
<div
class=
"standardization-table-wrapper"
v-show=
"isShowStandardization"
>
<el-table
:data=
"standardizationTableData"
border
>
<el-table
:data=
"standardizationTableData"
border
>
<el-table-column
prop=
"name"
label=
"证书名称"
...
...
@@ -167,22 +171,20 @@
label=
"有效日期"
width=
"180"
></el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"success"
@
click=
"viewCertify(scope.row)"
>
查看
</el-button>
<el-button
type=
"primary"
@
click=
"downloadCertify(scope.row)"
>
下载
</el-button>
<el-button
type=
"success"
@
click=
"viewCertify(scope.row)"
>
查看
</el-button
>
<el-button
type=
"primary"
@
click=
"downloadCertify(scope.row)"
>
下载
</el-button
>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
<el-dialog
title=
"上传证书"
:visible.sync=
"uploadDialogShow"
width=
"65%"
>
<el-dialog
title=
"上传证书"
:visible.sync=
"uploadDialogShow"
width=
"65%"
>
<el-form
ref=
"uploadform"
:model=
"uploadFormInfo"
...
...
@@ -190,19 +192,11 @@
:rules=
"uploadFormRules"
v-if=
"uploadDialogShow"
>
<el-form-item
prop=
"name"
label=
"证书名称"
>
<el-form-item
prop=
"name"
label=
"证书名称"
>
<el-input
v-model=
"uploadFormInfo.name"
></el-input>
</el-form-item>
<el-form-item
prop=
"type"
label=
"证书类型"
>
<el-select
v-model=
"uploadFormInfo.type"
>
<el-form-item
prop=
"type"
label=
"证书类型"
>
<el-select
v-model=
"uploadFormInfo.type"
>
<el-option
v-for=
"item in options"
:label=
"item.label"
...
...
@@ -211,56 +205,72 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item
prop=
"uploadTime"
label=
"上传日期"
>
<el-form-item
prop=
"uploadTime"
label=
"上传日期"
>
<el-date-picker
v-model=
"uploadFormInfo.uploadTime"
type=
"date"
placeholder=
"选择日期时间"
>
placeholder=
"选择日期时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
prop=
"validTime"
label=
"有效日期"
>
<el-form-item
prop=
"validTime"
label=
"有效日期"
>
<el-date-picker
v-model=
"uploadFormInfo.validTime"
type=
"date"
placeholder=
"选择日期时间"
>
placeholder=
"选择日期时间"
>
</el-date-picker>
</el-form-item>
<el-form-item
prop=
"file"
label=
"证书文件"
>
<el-form-item
prop=
"file"
label=
"证书文件"
>
<div
class=
"uploadcertify-wrapper"
>
<label>
选择文件
<input
ref=
"uploadfile"
type=
"file"
hidden
@
change=
"chooseFile"
/></label>
<label
>
选择文件
<input
ref=
"uploadfile"
type=
"file"
hidden
@
change=
"chooseFile"
/></label>
</div>
<div
style=
"color: #52
BEED;"
>
{{uploadFilePath
}}
</div>
<div
style=
"color: #52
beed"
>
{{ uploadFilePath
}}
</div>
</el-form-item>
</el-form>
<div
slot=
"footer"
>
<el-button
type=
"info"
@
click=
"cancelUploadFile"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitUploadFile"
:disabled=
"isUploading"
v-loading=
"isUploading"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"submitUploadFile"
:disabled=
"isUploading"
v-loading=
"isUploading"
>
提交
</el-button
>
</div>
</el-dialog>
<div
v-if=
"certifyShow && getFileType"
class=
"certify-item"
@
click.stop=
""
@
mousewheel.stop.prevent=
""
>
<div
v-if=
"certifyShow && getFileType"
class=
"certify-item"
@
click.stop=
""
@
mousewheel.stop.prevent=
""
>
<div
class=
"certify-inner-wrapper"
>
<div
class=
"certify-innerw-wrapper"
@
mousewheel.stop=
""
>
<pdf
v-for=
"i in pdfNumPage"
:key=
"i"
:page=
"i"
:src=
"loadingTask"
></pdf>
v-for=
"i in pdfNumPage"
:key=
"i"
:page=
"i"
:src=
"loadingTask"
></pdf>
</div>
<div
class=
"close-certify"
@
click=
"certifyShow = false"
></div>
</div>
</div>
<div
v-if=
"certifyShow && !getFileType"
class=
"certify-item"
@
click.stop=
""
@
mousewheel.stop.prevent=
""
>
<div
v-if=
"certifyShow && !getFileType"
class=
"certify-item"
@
click.stop=
""
@
mousewheel.stop.prevent=
""
>
<div
class=
"certify-inner-wrapper"
>
<img
:src=
"curCertifyFilePath"
class=
"certify-img"
/>
<img
:src=
"curCertifyFilePath"
class=
"certify-img"
/>
<div
class=
"close-certify"
@
click=
"certifyShow = false"
></div>
</div>
</div>
...
...
@@ -268,76 +278,85 @@
</template>
<
script
>
import
pdf
from
'
vue-pdf
'
;
import
{
enterCertifies
,
postCertify
}
from
'
@/api/certify.js
'
import
pdf
from
"
vue-pdf
"
;
import
{
enterCertifies
,
postCertify
}
from
"
@/api/certify.js
"
;
// {y}-{m}-{d} {h}:{i}:{s}
import
{
parseTime
}
from
'
@/utils/index.js
'
import
{
parseTime
}
from
"
@/utils/index.js
"
;
export
default
{
components
:
{
pdf
pdf
,
},
data
()
{
return
{
isUploading
:
false
,
emergencyplanTableData
:
[
{
name
:
'
安全生产标准化证书01
'
,
uploadDate
:
'
2021-01-11 12:36:25
'
,
validDate
:
'
2021-10-10 12:36:25
'
,
filepath
:
'
https://8.143.198.78/certify1/威海大庆特种材料制作有限公司-双体系.pdf
'
name
:
"
安全生产标准化证书01
"
,
uploadDate
:
"
2021-01-11 12:36:25
"
,
validDate
:
"
2021-10-10 12:36:25
"
,
filepath
:
"
https://8.143.198.78/certify1/威海大庆特种材料制作有限公司-双体系.pdf
"
,
},
{
name
:
'
安全生产标准化证书02
'
,
uploadDate
:
'
2021-01-13 12:11:25
'
,
validDate
:
'
2021-10-09 12:45:11
'
,
filepath
:
'
https://8.143.198.78/certify1/威海大宇电子有限公司-双体系.jpg
'
name
:
"
安全生产标准化证书02
"
,
uploadDate
:
"
2021-01-13 12:11:25
"
,
validDate
:
"
2021-10-09 12:45:11
"
,
filepath
:
"
https://8.143.198.78/certify1/威海大宇电子有限公司-双体系.jpg
"
,
},
{
name
:
'
安全生产标准化证书03
'
,
uploadDate
:
'
2021-01-15 12:25:23
'
,
validDate
:
'
2021-08-09 12:23:00
'
,
filepath
:
'
https://8.143.198.78/certify1/威海海马地毯集团有限公司-双体系2.pdf
'
}
name
:
"
安全生产标准化证书03
"
,
uploadDate
:
"
2021-01-15 12:25:23
"
,
validDate
:
"
2021-08-09 12:23:00
"
,
filepath
:
"
https://8.143.198.78/certify1/威海海马地毯集团有限公司-双体系2.pdf
"
,
},
],
dualsystemTableData
:
[
{
name
:
'
安全生产标准化证书01
'
,
uploadDate
:
'
2021-01-11 12:36:25
'
,
validDate
:
'
2021-10-10 12:36:25
'
,
filepath
:
'
https://8.143.198.78/certify1/威海大庆特种材料制作有限公司-双体系.pdf
'
name
:
"
安全生产标准化证书01
"
,
uploadDate
:
"
2021-01-11 12:36:25
"
,
validDate
:
"
2021-10-10 12:36:25
"
,
filepath
:
"
https://8.143.198.78/certify1/威海大庆特种材料制作有限公司-双体系.pdf
"
,
},
{
name
:
'
安全生产标准化证书02
'
,
uploadDate
:
'
2021-01-13 12:11:25
'
,
validDate
:
'
2021-10-09 12:45:11
'
,
filepath
:
'
https://8.143.198.78/certify1/威海大宇电子有限公司-双体系.jpg
'
name
:
"
安全生产标准化证书02
"
,
uploadDate
:
"
2021-01-13 12:11:25
"
,
validDate
:
"
2021-10-09 12:45:11
"
,
filepath
:
"
https://8.143.198.78/certify1/威海大宇电子有限公司-双体系.jpg
"
,
},
{
name
:
'
安全生产标准化证书03
'
,
uploadDate
:
'
2021-01-15 12:25:23
'
,
validDate
:
'
2021-08-09 12:23:00
'
,
filepath
:
'
https://8.143.198.78/certify1/威海海马地毯集团有限公司-双体系2.pdf
'
}
name
:
"
安全生产标准化证书03
"
,
uploadDate
:
"
2021-01-15 12:25:23
"
,
validDate
:
"
2021-08-09 12:23:00
"
,
filepath
:
"
https://8.143.198.78/certify1/威海海马地毯集团有限公司-双体系2.pdf
"
,
},
],
standardizationTableData
:
[
{
name
:
'
安全生产标准化证书01
'
,
uploadDate
:
'
2021-01-11 12:36:25
'
,
validDate
:
'
2021-10-10 12:36:25
'
,
filepath
:
'
https://8.143.198.78/certify1/威海大庆特种材料制作有限公司-双体系.pdf
'
name
:
"
安全生产标准化证书01
"
,
uploadDate
:
"
2021-01-11 12:36:25
"
,
validDate
:
"
2021-10-10 12:36:25
"
,
filepath
:
"
https://8.143.198.78/certify1/威海大庆特种材料制作有限公司-双体系.pdf
"
,
},
{
name
:
'
安全生产标准化证书02
'
,
uploadDate
:
'
2021-01-13 12:11:25
'
,
validDate
:
'
2021-10-09 12:45:11
'
,
filepath
:
'
https://8.143.198.78/certify1/威海大宇电子有限公司-双体系.jpg
'
name
:
"
安全生产标准化证书02
"
,
uploadDate
:
"
2021-01-13 12:11:25
"
,
validDate
:
"
2021-10-09 12:45:11
"
,
filepath
:
"
https://8.143.198.78/certify1/威海大宇电子有限公司-双体系.jpg
"
,
},
{
name
:
'
安全生产标准化证书03
'
,
uploadDate
:
'
2021-01-15 12:25:23
'
,
validDate
:
'
2021-08-09 12:23:00
'
,
filepath
:
'
https://8.143.198.78/certify1/威海海马地毯集团有限公司-双体系2.pdf
'
}
name
:
"
安全生产标准化证书03
"
,
uploadDate
:
"
2021-01-15 12:25:23
"
,
validDate
:
"
2021-08-09 12:23:00
"
,
filepath
:
"
https://8.143.198.78/certify1/威海海马地毯集团有限公司-双体系2.pdf
"
,
},
],
// 显示应急
isShowEmergency
:
false
,
...
...
@@ -347,478 +366,525 @@ export default {
isShowStandardization
:
false
,
uploadDialogShow
:
false
,
uploadFormInfo
:
{
name
:
''
,
uploadTime
:
''
,
type
:
'
双体系证书
'
,
validTime
:
''
,
file
:
null
name
:
""
,
uploadTime
:
""
,
type
:
"
双体系证书
"
,
validTime
:
""
,
file
:
null
,
},
uploadFilePath
:
''
,
uploadFilePath
:
""
,
uploadFormRules
:
{
name
:
[
{
required
:
true
,
message
:
'
请输入证书名称
'
,
trigger
:
'
blur
'
}
message
:
"
请输入证书名称
"
,
trigger
:
"
blur
"
,
}
,
],
type
:
[
{
required
:
true
,
message
:
'
请输入证书类型
'
,
trigger
:
'
change
'
}
message
:
"
请输入证书类型
"
,
trigger
:
"
change
"
,
}
,
],
uploadTime
:
[
{
required
:
true
,
message
:
'
请输入上传日期
'
,
trigger
:
'
change
'
}
message
:
"
请输入上传日期
"
,
trigger
:
"
change
"
,
}
,
],
validTime
:
[
{
required
:
true
,
message
:
'
请输入有效日期
'
,
trigger
:
'
change
'
}
message
:
"
请输入有效日期
"
,
trigger
:
"
change
"
,
}
,
],
file
:
[
{
required
:
true
,
message
:
'
请选择有效格式的文件(pdf、jpg、jpeg、png、gif)
'
,
trigger
:
'
change
'
}
]
message
:
"
请选择有效格式的文件(pdf、jpg、jpeg、png、gif)
"
,
trigger
:
"
change
"
,
}
,
]
,
},
certifyShow
:
false
,
curCertifyFilePath
:
''
,
curCertifyFilePath
:
""
,
pdfNumPage
:
undefined
,
loadingTask
:
undefined
,
curCompanyId
:
-
1
,
options
:
[
{
label
:
'
双体系证书
'
,
value
:
'
双体系证书
'
label
:
"
双体系证书
"
,
value
:
"
双体系证书
"
,
},
{
label
:
'
应急预案
'
,
value
:
'
应急预案
'
label
:
"
应急预案
"
,
value
:
"
应急预案
"
,
},
{
label
:
'
标准化
'
,
value
:
'
标准化
'
}
label
:
"
标准化
"
,
value
:
"
标准化
"
,
}
,
],
certifyTypes
:
[
{
label
:
'
双体系证书
'
,
value
:
'
双体系证书
'
label
:
"
双体系证书
"
,
value
:
"
双体系证书
"
,
},
{
label
:
'
应急预案
'
,
value
:
'
应急预案
'
label
:
"
应急预案
"
,
value
:
"
应急预案
"
,
},
{
label
:
'
标准化
'
,
value
:
'
标准化
'
}
label
:
"
标准化
"
,
value
:
"
标准化
"
,
}
,
],
certifyType
:
''
,
certifyName
:
''
,
uploadTime
:
''
,
validTime
:
''
,
}
certifyType
:
""
,
certifyName
:
""
,
uploadTime
:
""
,
validTime
:
""
,
}
;
},
mounted
()
{
this
.
curCompanyId
=
this
.
$route
.
params
.
name
this
.
initMethod
()
this
.
curCompanyId
=
this
.
$route
.
params
.
name
;
this
.
initMethod
()
;
},
computed
:
{
getFileType
()
{
if
(
this
.
curCertifyFilePath
.
endsWith
(
'
.pdf
'
))
{
return
true
if
(
this
.
curCertifyFilePath
.
endsWith
(
"
.pdf
"
))
{
return
true
;
}
return
false
}
return
false
;
}
,
},
methods
:
{
initMethod
()
{
this
.
initCertify
(
'
双体系证书
'
)
this
.
initCertify
(
'
应急预案
'
)
this
.
initCertify
(
'
标准化
'
)
this
.
initCertify
(
"
双体系证书
"
);
this
.
initCertify
(
"
应急预案
"
);
this
.
initCertify
(
"
标准化
"
);
},
initCertify
(
category
)
{
let
params
=
{
companyId
:
this
.
curCompanyId
,
category
:
category
}
enterCertifies
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
category
,
'
enterCertifies enterCertifies
'
)
if
(
category
===
'
双体系证书
'
)
{
this
.
dualsystemTableData
=
[...
res
.
content
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
}
})]
}
else
if
(
category
===
'
应急预案
'
)
{
this
.
emergencyplanTableData
=
[...
res
.
content
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
}
})]
}
else
if
(
category
===
'
标准化
'
)
{
this
.
standardizationTableData
=
[...
res
.
content
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
}
})]
category
:
category
,
};
enterCertifies
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
,
category
,
"
enterCertifies enterCertifies
"
);
if
(
category
===
"
双体系证书
"
)
{
this
.
dualsystemTableData
=
[
...
res
.
content
.
map
((
item
)
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
,
};
}),
];
}
else
if
(
category
===
"
应急预案
"
)
{
this
.
emergencyplanTableData
=
[
...
res
.
content
.
map
((
item
)
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
,
};
}),
];
}
else
if
(
category
===
"
标准化
"
)
{
this
.
standardizationTableData
=
[
...
res
.
content
.
map
((
item
)
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
,
};
}),
];
}
})
})
;
},
chooseFile
()
{
this
.
uploadFormInfo
.
file
=
null
this
.
uploadFilePath
=
''
if
(
this
.
$refs
.
uploadfile
.
files
.
length
)
{
const
filename
=
this
.
$refs
.
uploadfile
.
files
[
0
].
name
if
(
!
(
filename
.
endsWith
(
'
.pdf
'
)
||
filename
.
endsWith
(
'
.jpg
'
)
||
filename
.
endsWith
(
'
.jpeg
'
)
||
filename
.
endsWith
(
'
.png
'
)
||
filename
.
endsWith
(
'
.gif
'
)))
{
return
this
.
uploadFormInfo
.
file
=
null
;
this
.
uploadFilePath
=
""
;
if
(
this
.
$refs
.
uploadfile
.
files
.
length
)
{
const
filename
=
this
.
$refs
.
uploadfile
.
files
[
0
].
name
;
if
(
!
(
filename
.
endsWith
(
"
.pdf
"
)
||
filename
.
endsWith
(
"
.jpg
"
)
||
filename
.
endsWith
(
"
.jpeg
"
)
||
filename
.
endsWith
(
"
.png
"
)
||
filename
.
endsWith
(
"
.gif
"
)
)
)
{
return
;
}
this
.
uploadFilePath
=
this
.
$refs
.
uploadfile
.
files
[
0
].
name
this
.
uploadFormInfo
.
file
=
this
.
$refs
.
uploadfile
.
files
[
0
]
this
.
uploadFilePath
=
this
.
$refs
.
uploadfile
.
files
[
0
].
name
;
this
.
uploadFormInfo
.
file
=
this
.
$refs
.
uploadfile
.
files
[
0
]
;
}
},
createUploadCertify
()
{
this
.
uploadDialogShow
=
true
this
.
uploadDialogShow
=
true
;
this
.
uploadFormInfo
=
{
name
:
''
,
uploadTime
:
''
,
type
:
'
双体系证书
'
,
validTime
:
''
,
file
:
null
}
name
:
""
,
uploadTime
:
""
,
type
:
"
双体系证书
"
,
validTime
:
""
,
file
:
null
,
}
;
},
cancelUploadFile
()
{
this
.
uploadDialogShow
=
false
this
.
uploadDialogShow
=
false
;
},
submitUploadFile
()
{
this
.
$refs
.
uploadform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
isUploading
=
true
this
.
isUploading
=
true
;
let
params
=
{
companyId
:
this
.
curCompanyId
,
category
:
this
.
uploadFormInfo
.
type
,
expirationDate
:
parseTime
(
new
Date
(
this
.
uploadFormInfo
.
validTime
),
'
{y}-{m}-{d}
'
),
expirationDate
:
parseTime
(
new
Date
(
this
.
uploadFormInfo
.
validTime
),
"
{y}-{m}-{d}
"
),
file
:
this
.
uploadFormInfo
.
file
,
name
:
this
.
uploadFormInfo
.
name
,
uploadDate
:
parseTime
(
new
Date
(
this
.
uploadFormInfo
.
uploadTime
),
'
{y}-{m}-{d}
'
)
}
uploadDate
:
parseTime
(
new
Date
(
this
.
uploadFormInfo
.
uploadTime
),
"
{y}-{m}-{d}
"
),
};
let
formData
=
new
FormData
();
for
(
const
key
in
params
)
{
formData
.
append
(
key
,
params
[
key
])
for
(
const
key
in
params
)
{
formData
.
append
(
key
,
params
[
key
])
;
}
postCertify
(
formData
).
then
(
res
=>
{
this
.
$message
({
type
:
'
success
'
,
message
:
'
添加证书成功
'
postCertify
(
formData
)
.
then
((
res
)
=>
{
this
.
$message
({
type
:
"
success
"
,
message
:
"
添加证书成功
"
,
});
this
.
uploadDialogShow
=
false
;
this
.
isUploading
=
false
;
this
.
initMethod
();
})
this
.
uploadDialogShow
=
false
this
.
isUploading
=
false
this
.
initMethod
()
}).
catch
(()
=>
{
this
.
$message
.
error
(
'
添加证书失败
'
)
this
.
isUploading
=
false
})
.
catch
(()
=>
{
this
.
$message
.
error
(
"
添加证书失败
"
);
this
.
isUploading
=
false
;
});
}
})
})
;
},
viewCertify
(
row
)
{
this
.
certifyShow
=
true
this
.
curCertifyFilePath
=
row
.
filepath
const
index1
=
this
.
curCertifyFilePath
.
indexOf
(
'
\\
'
)
const
index2
=
this
.
curCertifyFilePath
.
indexOf
(
'
\\
'
,
index1
+
1
)
const
index3
=
this
.
curCertifyFilePath
.
indexOf
(
'
\\
'
,
index2
+
1
)
this
.
curCertifyFilePath
=
this
.
curCertifyFilePath
.
substring
(
index3
)
if
(
this
.
curCertifyFilePath
.
endsWith
(
'
.pdf
'
))
{
this
.
loadingTask
=
pdf
.
createLoadingTask
(
this
.
curCertifyFilePath
)
this
.
loadingTask
.
promise
.
then
(
pdf
=>
{
this
.
pdfNumPage
=
pdf
.
numPages
})
this
.
certifyShow
=
true
;
this
.
curCertifyFilePath
=
row
.
filepath
;
const
index1
=
this
.
curCertifyFilePath
.
indexOf
(
"
\\
"
);
const
index2
=
this
.
curCertifyFilePath
.
indexOf
(
"
\\
"
,
index1
+
1
);
const
index3
=
this
.
curCertifyFilePath
.
indexOf
(
"
\\
"
,
index2
+
1
);
this
.
curCertifyFilePath
=
this
.
curCertifyFilePath
.
substring
(
index3
)
;
if
(
this
.
curCertifyFilePath
.
endsWith
(
"
.pdf
"
))
{
this
.
loadingTask
=
pdf
.
createLoadingTask
(
this
.
curCertifyFilePath
)
;
this
.
loadingTask
.
promise
.
then
(
(
pdf
)
=>
{
this
.
pdfNumPage
=
pdf
.
numPages
;
})
;
}
},
downloadCertify
(
row
)
{
const
link
=
document
.
createElement
(
'
a
'
)
link
.
href
=
row
.
filepath
link
.
setAttribute
(
'
download
'
,
row
.
filepath
.
substr
(
row
.
filepath
.
lastIndexOf
(
'
/
'
)
+
1
))
document
.
body
.
appendChild
(
link
)
link
.
click
()
link
.
remove
()
window
.
URL
.
revokeObjectURL
(
link
.
href
)
const
link
=
document
.
createElement
(
"
a
"
);
let
curCertifyFilePath
=
row
.
filepath
;
const
index1
=
this
.
curCertifyFilePath
.
indexOf
(
"
\\
"
);
const
index2
=
this
.
curCertifyFilePath
.
indexOf
(
"
\\
"
,
index1
+
1
);
const
index3
=
this
.
curCertifyFilePath
.
indexOf
(
"
\\
"
,
index2
+
1
);
curCertifyFilePath
=
this
.
curCertifyFilePath
.
substring
(
index3
);
link
.
href
=
curCertifyFilePath
;
link
.
setAttribute
(
"
download
"
,
row
.
filepath
.
substr
(
row
.
filepath
.
lastIndexOf
(
"
/
"
)
+
1
)
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
link
.
remove
();
window
.
URL
.
revokeObjectURL
(
link
.
href
);
},
findCertifies
()
{
let
params
=
{}
params
.
companyId
=
this
.
curCompanyId
let
params
=
{}
;
params
.
companyId
=
this
.
curCompanyId
;
if
(
this
.
certifyType
)
{
params
.
category
=
this
.
certifyType
params
.
certificateCategory
=
this
.
certifyType
params
.
category
=
this
.
certifyType
;
params
.
certificateCategory
=
this
.
certifyType
;
}
else
{
this
.
$message
.
error
(
'
请输入证书类型
'
)
return
this
.
$message
.
error
(
"
请输入证书类型
"
);
return
;
}
if
(
this
.
certifyName
)
{
params
.
certificateName
=
this
.
certifyName
params
.
certificateName
=
this
.
certifyName
;
}
if
(
this
.
validTime
)
{
params
.
expirationStartDate
=
parseTime
(
new
Date
(
this
.
validTime
[
0
]),
'
{y}-{m}-{d}
'
)
params
.
expirationEndDate
=
parseTime
(
new
Date
(
this
.
validTime
[
1
]),
'
{y}-{m}-{d}
'
)
params
.
expirationStartDate
=
parseTime
(
new
Date
(
this
.
validTime
[
0
]),
"
{y}-{m}-{d}
"
);
params
.
expirationEndDate
=
parseTime
(
new
Date
(
this
.
validTime
[
1
]),
"
{y}-{m}-{d}
"
);
}
if
(
this
.
uploadTime
)
{
params
.
uploadStartDate
=
parseTime
(
new
Date
(
this
.
uploadTime
[
0
]),
'
{y}-{m}-{d}
'
)
params
.
uploadEndDate
=
parseTime
(
new
Date
(
this
.
uploadTime
[
1
]),
'
{y}-{m}-{d}
'
)
params
.
uploadStartDate
=
parseTime
(
new
Date
(
this
.
uploadTime
[
0
]),
"
{y}-{m}-{d}
"
);
params
.
uploadEndDate
=
parseTime
(
new
Date
(
this
.
uploadTime
[
1
]),
"
{y}-{m}-{d}
"
);
}
enterCertifies
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'
certifyEnters certifyEnters
'
)
if
(
this
.
certifyType
===
'
双体系证书
'
)
{
this
.
dualsystemTableData
=
[...
res
.
content
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
}
})]
}
else
if
(
this
.
certifyType
===
'
应急预案
'
)
{
this
.
emergencyplanTableData
=
[...
res
.
content
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
}
})]
}
else
if
(
this
.
certifyType
===
'
标准化
'
)
{
this
.
standardizationTableData
=
[...
res
.
content
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
}
})]
enterCertifies
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
,
"
certifyEnters certifyEnters
"
);
if
(
this
.
certifyType
===
"
双体系证书
"
)
{
this
.
dualsystemTableData
=
[
...
res
.
content
.
map
((
item
)
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
,
};
}),
];
}
else
if
(
this
.
certifyType
===
"
应急预案
"
)
{
this
.
emergencyplanTableData
=
[
...
res
.
content
.
map
((
item
)
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
,
};
}),
];
}
else
if
(
this
.
certifyType
===
"
标准化
"
)
{
this
.
standardizationTableData
=
[
...
res
.
content
.
map
((
item
)
=>
{
return
{
name
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
validDate
:
item
.
expirationDate
,
filepath
:
item
.
filePath
,
id
:
item
.
id
,
category
:
item
.
category
,
};
}),
];
}
})
}
}
}
})
;
}
,
}
,
}
;
</
script
>
<
style
lang=
"scss"
scoped
>
.uploadcertify-wrapper
{
width
:
160px
;
height
:
40px
;
.uploadcertify-wrapper
{
width
:
160px
;
height
:
40px
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background
:
#46a6ff
;
color
:
white
;
label
{
display
:
flex
;
width
:
100%
;
height
:
100%
;
justify-content
:
center
;
align-items
:
center
;
background
:
#46A6FF
;
color
:
white
;
label
{
}
}
.downtriangle
{
border-top
:
20px
solid
#eee
;
border-bottom
:
20px
solid
transparent
;
border-left
:
20px
solid
transparent
;
border-right
:
20px
solid
transparent
;
position
:
relative
;
transform
:
translateY
(
5px
);
cursor
:
pointer
;
}
.righttriangle
{
border-top
:
20px
solid
transparent
;
border-bottom
:
20px
solid
transparent
;
border-left
:
20px
solid
#eee
;
border-right
:
20px
solid
transparent
;
position
:
relative
;
transform
:
translateX
(
5px
);
cursor
:
pointer
;
}
.entercertifies-total-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
30px
;
box-shadow
:
0
0
9px
1px
#eee
;
.certify-find-tools-wrapper
{
display
:
flex
;
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
flex-wrap
:
wrap
;
box-shadow
:
0
0
9px
1px
#eee
;
.certify-find-item
{
width
:
80%
;
margin
:
10px
auto
;
padding
:
10px
;
border-radius
:
10px
;
box-shadow
:
0
0
5px
1px
#eee
;
display
:
flex
;
width
:
100%
;
height
:
100%
;
justify-content
:
center
;
justify-content
:
flex-start
;
align-items
:
center
;
.certify-title
{
width
:
15%
;
display
:
flex
;
justify-content
:
flex-end
;
margin-right
:
20px
;
}
}
.certify-find-btn
{
width
:
80%
;
margin
:
10px
auto
;
padding
:
2px
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
}
}
.downtriangle
{
border-top
:
20px
solid
#eee
;
border-bottom
:
20px
solid
transparent
;
border-left
:
20px
solid
transparent
;
border-right
:
20px
solid
transparent
;
position
:
relative
;
transform
:
translateY
(
5px
);
cursor
:
pointer
;
}
.righttriangle
{
border-top
:
20px
solid
transparent
;
border-bottom
:
20px
solid
transparent
;
border-left
:
20px
solid
#eee
;
border-right
:
20px
solid
transparent
;
position
:
relative
;
transform
:
translateX
(
5px
);
cursor
:
pointer
;
.tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
}
.e
ntercertifies-total
-wrapper
{
.e
mergencyplan
-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
3
0px
;
border-radius
:
2
0px
;
box-shadow
:
0
0
9px
1px
#eee
;
.
certify-find-tools-wrapper
{
.
emergencyplan-title
{
display
:
flex
;
width
:
80%
;
margin
:
30px
auto
;
justify-content
:
space-between
;
padding
:
10px
;
align-items
:
center
;
}
.emergencyplan-table-wrapper
{
padding
:
20px
;
border-radius
:
20px
;
flex-wrap
:
wrap
;
box-shadow
:
0
0
9px
1px
#eee
;
.certify-find-item
{
width
:
80%
;
margin
:
10px
auto
;
padding
:
10px
;
border-radius
:
10px
;;
box-shadow
:
0
0
5px
1px
#eee
;
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
.certify-title
{
width
:
15%
;
display
:
flex
;
justify-content
:
flex-end
;
margin-right
:
20px
;
}
}
.certify-find-btn
{
width
:
80%
;
margin
:
10px
auto
;
padding
:
2px
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
}
margin-left
:
40px
;
background
:
#eee
;
}
.tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
}
.dualsystem-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.dualsystem-title
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
10px
;
align-items
:
center
;
}
.dualsystem-table-wrapper
{
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
margin-left
:
40px
;
background
:
#eee
;
}
.emergencyplan-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.emergencyplan-title
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
10px
;
align-items
:
center
;
}
.emergencyplan-table-wrapper
{
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
margin-left
:
40px
;
background
:
#eee
;
}
}
.standardization-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.standardization-title
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
10px
;
align-items
:
center
;
}
.dualsystem-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
.standardization-table-wrapper
{
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.dualsystem-title
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
10px
;
align-items
:
center
;
}
.dualsystem-table-wrapper
{
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
margin-left
:
40px
;
background
:
#eee
;
}
margin-left
:
40px
;
background
:
#eee
;
}
.standardization-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.standardization-title
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
10px
;
align-items
:
center
;
}
.standardization-table-wrapper
{
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
margin-left
:
40px
;
background
:
#eee
;
}
}
.certify-item
{
display
:
block
;
position
:
fixed
;
left
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
9999
;
background
:
#808080
;
.certify-inner-wrapper
{
position
:
absolute
;
width
:
960px
;
height
:
620px
;
left
:
50%
;
top
:
50%
;
padding
:
20px
;
transform
:
translate
(
-50%
,
-50%
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background
:
#eee
;
.certify-innerw-wrapper
{
width
:
100%
;
height
:
100%
;
overflow-y
:
scroll
;
&
:
:-
webkit-scrollbar
{
display
:
none
;
}
}
}
.certify-item
{
display
:
block
;
position
:
fixed
;
left
:
0
;
top
:
0
;
right
:
0
;
bottom
:
0
;
z-index
:
9999
;
background
:
#808080
;
.certify-inner-wrapper
{
.certify-img
{
height
:
100%
;
}
.close-certify
{
position
:
absolute
;
width
:
960px
;
height
:
620px
;
left
:
0
;
right
:
0
;
top
:
0
;
padding
:
20px
;
transform
:
translate
(
50%
,
50%
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
background
:
#eee
;
.certify-innerw-wrapper
{
width
:
100%
;
height
:
100%
;
overflow-y
:
scroll
;
&
:
:-
webkit-scrollbar
{
display
:
none
;
}
}
.certify-img
{
height
:
100%
;
}
.close-certify
{
position
:
absolute
;
right
:
0
;
top
:
0
;
width
:
30px
;
height
:
30px
;
background-image
:
url('../../assets/home/certifyclose.png')
;
background-size
:
100%
100%
;
background-position
:
center
;
cursor
:
pointer
;
}
width
:
30px
;
height
:
30px
;
background-image
:
url("../../assets/home/certifyclose.png")
;
background-size
:
100%
100%
;
background-position
:
center
;
cursor
:
pointer
;
}
}
}
</
style
>
\ No newline at end of file
src/views/entercertifies/index.vue
View file @
5d2f8010
...
...
@@ -17,18 +17,16 @@
:value=
"item.value"
>
</el-option>
</el-select>
-->
<el-input
v-model=
"searchEnterName"
placeholder=
"请输入企业名称"
style=
"margin-right: 30px;width: 50%;"
></el-input>
<el-input
v-model=
"searchEnterName"
placeholder=
"请输入企业名称"
style=
"margin-right: 30px; width: 50%"
></el-input>
<el-button
type=
"success"
@
click=
"searchEnters"
>
查找
</el-button>
</div>
<div
class=
"enter-safe-enter-list-wrapper"
>
<el-table
:data=
"enterCertifyList"
border
>
<el-table-column
prop=
"companyName"
label=
"企业名称"
></el-table-column>
<el-table
:data=
"enterCertifyList"
border
>
<el-table-column
prop=
"companyName"
label=
"企业名称"
></el-table-column>
<el-table-column
prop=
"emergencyPlan"
label=
"应急预案证书数量"
...
...
@@ -41,11 +39,11 @@
prop=
"standardization"
label=
"标准化证书数量"
></el-table-column>
<el-table-column
label=
"操作"
>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"toEnterCertifies(scope.row)"
>
详情
</el-button>
<el-button
type=
"text"
@
click=
"toEnterCertifies(scope.row)"
>
详情
</el-button
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -56,66 +54,68 @@
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"currentPageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalElements"
>
:total=
"totalElements"
>
</el-pagination>
</div>
</div>
</template>
<
script
>
import
{
certifyEnters
}
from
'
@/api/certify.js
'
import
{
certifyEnters
}
from
"
@/api/certify.js
"
;
export
default
{
data
()
{
return
{
searchEnterName
:
''
,
queryEnter
:
''
,
searchEnterName
:
""
,
queryEnter
:
""
,
loading
:
false
,
enterList
:
[],
enterCertifyList
:
[
{
companyName
:
'
威海兴茂置业有限公司
'
,
companyName
:
"
威海兴茂置业有限公司
"
,
companyId
:
71522
,
emergencyPlan
:
20
,
dualSystem
:
10
,
standardization
:
10
standardization
:
10
,
},
{
companyName
:
'
中国石油天然气股份有限公司山东威海销售分公司
'
,
companyName
:
"
中国石油天然气股份有限公司山东威海销售分公司
"
,
companyId
:
71520
,
emergencyPlan
:
20
,
dualSystem
:
10
,
standardization
:
10
standardization
:
10
,
},
{
companyName
:
'
威海经济技术开发区洪氏家居生活馆
'
,
companyName
:
"
威海经济技术开发区洪氏家居生活馆
"
,
companyId
:
71519
,
emergencyPlan
:
15
,
dualSystem
:
12
,
standardization
:
11
standardization
:
11
,
},
{
companyName
:
'
威海市教育局经济技术开发区教育服务中心
'
,
companyName
:
"
威海市教育局经济技术开发区教育服务中心
"
,
companyId
:
71517
,
emergencyPlan
:
8
,
dualSystem
:
3
,
standardization
:
1
}
standardization
:
1
,
}
,
],
currentPage
:
1
,
currentPageSize
:
10
,
totalElements
:
10
}
totalElements
:
10
,
}
;
},
methods
:
{
initMethod
()
{
let
params
=
{
page
:
this
.
currentPage
-
1
,
size
:
this
.
currentPageSize
}
size
:
this
.
currentPageSize
,
}
;
if
(
this
.
searchEnterName
)
{
params
.
enterpriseName
=
this
.
searchEnterName
params
.
enterpriseName
=
this
.
searchEnterName
;
}
certifyEnters
(
params
).
then
(
res
=>
{
certifyEnters
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
.
totalElements
);
/**
* {
companyName: '威海市教育局经济技术开发区教育服务中心',
...
...
@@ -125,71 +125,73 @@ export default {
standardization: 1
}
*/
this
.
enterCertifyList
=
[...
res
.
content
.
map
(
item
=>
{
return
{
companyName
:
item
.
enterpriseName
,
companyId
:
item
.
enterpriseId
,
emergencyPlan
:
item
.
emergencyPlanNum
,
dualSystem
:
item
.
dualSystemNum
,
standardization
:
item
.
standardizationNum
}
})]
this
.
totalElements
=
res
.
totalElements
})
this
.
enterCertifyList
=
[
...
res
.
content
.
map
((
item
)
=>
{
return
{
companyName
:
item
.
enterpriseName
,
companyId
:
item
.
enterpriseId
,
emergencyPlan
:
item
.
emergencyPlanNum
,
dualSystem
:
item
.
dualSystemNum
,
standardization
:
item
.
standardizationNum
,
};
}),
];
this
.
totalElements
=
res
.
totalElements
;
});
},
remoteMethod
(
query
)
{
if
(
query
!==
''
)
{
if
(
query
!==
""
)
{
this
.
loading
=
true
;
setTimeout
(()
=>
{
this
.
loading
=
false
this
.
enterList
=
[]
})
this
.
loading
=
false
;
this
.
enterList
=
[]
;
})
;
}
},
toEnterCertifies
(
row
)
{
this
.
$router
.
push
(
'
/train/entercertifymanage/
'
+
row
.
companyId
)
this
.
$router
.
push
(
"
/train/entercertifymanage/
"
+
row
.
companyId
);
},
handleSizeChange
(
val
)
{
this
.
currentPageSize
=
val
this
.
initMethod
()
this
.
currentPageSize
=
val
;
this
.
initMethod
()
;
},
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
this
.
initMethod
()
this
.
currentPage
=
val
;
this
.
initMethod
()
;
},
searchEnters
()
{
this
.
initMethod
()
}
this
.
initMethod
()
;
}
,
},
mounted
()
{
this
.
initMethod
()
}
}
this
.
initMethod
()
;
}
,
}
;
</
script
>
<
style
lang=
"scss"
scoped
>
.enter-safe-manage-wrapper
{
.enter-safe-manage-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
border-radius
:
30px
;
padding
:
30px
;
box-shadow
:
0
0
9px
1px
#eee
;
.enter-safe-tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
border-radius
:
3
0px
;
padding
:
3
0px
;
border-radius
:
2
0px
;
padding
:
2
0px
;
box-shadow
:
0
0
9px
1px
#eee
;
.enter-safe-tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
border-radius
:
20px
;
padding
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-start
;
}
.enter-safe-enter-list-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
border-radius
:
20px
;
padding
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
}
display
:
flex
;
align-items
:
center
;
justify-content
:
flex-start
;
}
.enter-safe-enter-list-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
border-radius
:
20px
;
padding
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
}
}
</
style
>
\ No newline at end of file
src/views/hwapproval/findapproval.vue
View file @
5d2f8010
...
...
@@ -11,10 +11,7 @@
</div>
<div
class=
"approval-item"
>
<div
class=
"approval-item-title"
>
作业时间:
</div>
<el-date-picker
v-model=
"workTime"
type=
"date"
placeholder=
"选择日期"
>
<el-date-picker
v-model=
"workTime"
type=
"date"
placeholder=
"选择日期"
>
</el-date-picker>
</div>
<div
class=
"approval-item"
>
...
...
@@ -24,34 +21,20 @@
type=
"daterange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
end-placeholder=
"结束日期"
>
</el-date-picker>
</div>
<div
class=
"approval-item-btn"
>
<el-button
type=
"primary"
>
查找
</el-button>
<el-button
type=
"primary"
@
click=
"findapproval"
>
查找
</el-button>
</div>
</div>
<div
class=
"find-approval-table-wrapper"
>
<el-table
:data=
"approvalList"
border
>
<el-table-column
prop=
"companyName"
label=
"公司名称"
></el-table-column>
<el-table-column
prop=
"approvalName"
label=
"备案名称"
></el-table-column>
<el-table-column
prop=
"workTime"
label=
"作业时间"
></el-table-column>
<el-table-column
prop=
"uploadTime"
label=
"上传日期"
></el-table-column>
<el-table
:data=
"approvalList"
border
>
<el-table-column
prop=
"companyName"
label=
"公司名称"
></el-table-column>
<el-table-column
prop=
"approvalName"
label=
"备案名称"
></el-table-column>
<el-table-column
prop=
"workTime"
label=
"作业时间"
></el-table-column>
<el-table-column
prop=
"uploadTime"
label=
"上传日期"
></el-table-column>
<el-table-column>
<template
slot-scope=
"scope"
>
<el-button
type=
"success"
>
查看
</el-button>
...
...
@@ -64,85 +47,95 @@
</template>
<
script
>
import
{
dangerJobReport
}
from
"
@/api/dangerjob.js
"
;
import
{
parseTime
}
from
"
@/utils/index.js
"
;
export
default
{
data
()
{
return
{
companyName
:
''
,
approvalName
:
''
,
workTime
:
''
,
uploadTime
:
''
,
companyName
:
""
,
//企业名称
approvalName
:
""
,
//危险作业名称
workTime
:
""
,
//作业时间
uploadTime
:
""
,
//上传时间范围
approvalList
:
[
{
companyName
:
'
威海兴茂置业有限公司
'
,
companyName
:
"
威海兴茂置业有限公司
"
,
companyId
:
1
,
approvalName
:
'
备案1
'
,
workTime
:
'
2021-08-21 12:21:23
'
,
uploadTime
:
'
2021-09-11 03:02:01
'
,
filepath
:
''
approvalName
:
"
备案1
"
,
workTime
:
"
2021-08-21 12:21:23
"
,
uploadTime
:
"
2021-09-11 03:02:01
"
,
filepath
:
""
,
},
{
companyName
:
'
威海大宇电子有限公司
'
,
companyName
:
"
威海大宇电子有限公司
"
,
companyId
:
2
,
approvalName
:
'
备案2
'
,
workTime
:
'
2021-09-21 11:11:11
'
,
uploadTime
:
'
2021-11:11 09:09:09
'
,
filepath
:
''
}
]
}
approvalName
:
"
备案2
"
,
workTime
:
"
2021-09-21 11:11:11
"
,
uploadTime
:
"
2021-11:11 09:09:09
"
,
filepath
:
""
,
}
,
]
,
}
;
},
}
methods
:
{
findapproval
()
{
console
.
log
(
111
);
const
params
=
{
companyId
:
""
,
};
dangerJobReport
(
params
).
then
((
res
)
=>
{
console
.
log
(
res
,
"
1111 certifyEnters
"
);
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.find-approval-wrapper
{
.find-approval-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
30px
;
box-shadow
:
0
0
9px
1px
#eee
;
.find-approval-tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
3
0px
;
border-radius
:
3
0px
;
padding
:
2
0px
;
border-radius
:
2
0px
;
box-shadow
:
0
0
9px
1px
#eee
;
.find-approval-tools-wrapper
{
.approval-item
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.approval-item
{
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
width
:
80%
;
margin
:
10px
auto
;
padding
:
10px
;
border-radius
:
10px
;
box-shadow
:
0
0
5px
1px
#eee
;
.approval-item-title
{
width
:
25%
;
display
:
flex
;
justify-content
:
flex-end
;
flex-shrink
:
0
;
flex-grow
:
0
;
padding-right
:
10px
;
}
}
.approval-item-btn
{
margin
:
10px
auto
;
padding
:
10px
;
border-radius
:
10px
;
box-shadow
:
0
0
5px
1px
#eee
;
.approval-item-title
{
width
:
25%
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
width
:
80%
;
padding
:
5px
;
margin
:
3px
auto
;
flex-shrink
:
0
;
flex-grow
:
0
;
padding-right
:
10px
;
}
}
.find-approval-table-wrapper
{
.approval-item-btn
{
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
padding
:
5px
;
margin
:
3px
auto
;
}
}
.find-approval-table-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
}
}
</
style
>
\ No newline at end of file
src/views/hwapproval/hwapproval.vue
View file @
5d2f8010
...
...
@@ -18,11 +18,11 @@
:value=
"item.value"
/>
</el-select>
<el-button
type=
"success"
@
click=
"
searchEnters
"
>
查找
</el-button>
<el-button
type=
"success"
@
click=
""
>
查找
</el-button>
</div>
<div
class=
"hwapproval-table-wrapper"
>
<el-table
:data=
"approvalList"
border
>
<el-table-column
type=
"expand"
>
<
!--
<
el-table-column
type=
"expand"
>
<template
slot-scope=
"scope"
>
<el-table
:data=
"scope.row.approvals"
>
<el-table-column
...
...
@@ -51,14 +51,16 @@
</el-table-column>
</el-table>
</template>
</el-table-column>
</el-table-column>
-->
<el-table-column
prop=
"companyName"
label=
"企业名称"
/>
<el-table-column
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"success"
@
click=
"createHWapproval(scope.row)"
>
上传危险作业备案
</el-button>
<el-button
type=
"primary"
@
click=
"listHwApprovals(scope.row)"
>
查看
</el-button
>
<el-button
type=
"success"
@
click=
"createHWapproval(scope.row)"
>
上传危险作业备案
</el-button
>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -94,8 +96,9 @@
</el-form-item>
<el-form-item
prop=
"file"
label=
"文件"
>
<div>
<label>
选择文件
<input
ref=
"chosenfile"
type=
"file"
hidden
@
change=
"chooseFile"
>
<label
>
选择文件
<input
ref=
"chosenfile"
type=
"file"
hidden
@
change=
"chooseFile"
/>
</label>
</div>
<div>
{{ uploadFilePath }}
</div>
...
...
@@ -111,11 +114,11 @@
</template>
<
script
>
import
pdf
from
'
vue-pdf
'
import
{
hwapprovalEnters
}
from
'
@/api/hwapproval.js
'
import
pdf
from
"
vue-pdf
"
;
import
{
dangerJobReportEnterprise
}
from
"
@/api/dangerjob.js
"
;
export
default
{
components
:
{
pdf
pdf
,
},
data
()
{
return
{
...
...
@@ -123,118 +126,140 @@ export default {
loadingTask
:
undefined
,
loading
:
false
,
enters
:
[],
searchEnter
:
''
,
searchEnter
:
""
,
approvalList
:
[
{
companyName
:
'
威海兴茂置业有限公司
'
,
companyName
:
"
威海兴茂置业有限公司
"
,
companyId
:
-
1
,
approvals
:
[
{
uploadTime
:
'
2021-09-21 11:11:11
'
,
workTime
:
'
2021-08-22 12:01:03
'
,
approvalName
:
'
备案1
'
,
uploadTime
:
"
2021-09-21 11:11:11
"
,
workTime
:
"
2021-08-22 12:01:03
"
,
approvalName
:
"
备案1
"
,
approvalId
:
1
,
filepath
:
''
filepath
:
""
,
},
{
uploadTime
:
'
2021-10-21 12:12:12
'
,
workTime
:
'
2021-08-22 12:01:01
'
,
approvalName
:
'
备案2
'
,
uploadTime
:
"
2021-10-21 12:12:12
"
,
workTime
:
"
2021-08-22 12:01:01
"
,
approvalName
:
"
备案2
"
,
approvalId
:
2
,
filepath
:
''
}
]
}
filepath
:
""
,
}
,
]
,
}
,
],
addDialogShow
:
false
,
addFormInfo
:
{
name
:
''
,
workTime
:
''
,
uploadTime
:
''
,
name
:
""
,
workTime
:
""
,
uploadTime
:
""
,
file
:
null
,
companyId
:
-
1
companyId
:
-
1
,
},
uploadFilePath
:
''
,
uploadFilePath
:
""
,
addFormRules
:
{
name
:
[
{
required
:
true
,
message
:
'
请输入危险作业备案名称
'
,
trigger
:
'
blur
'
}
message
:
"
请输入危险作业备案名称
"
,
trigger
:
"
blur
"
,
}
,
],
workTime
:
[
{
required
:
true
,
message
:
'
请选择作业时间
'
,
trigger
:
'
change
'
}
message
:
"
请选择作业时间
"
,
trigger
:
"
change
"
,
}
,
],
uploadTime
:
[
{
required
:
true
,
message
:
'
请选择上传时间
'
,
trigger
:
'
change
'
}
message
:
"
请选择上传时间
"
,
trigger
:
"
change
"
,
}
,
],
file
:
[
{
required
:
true
,
message
:
'
请选择文件(pdf、jpg、jpeg、png、gif)
'
,
trigger
:
'
change
'
}
]
message
:
"
请选择文件(pdf、jpg、jpeg、png、gif)
"
,
trigger
:
"
change
"
,
}
,
]
,
},
curApprovalFilePath
:
''
}
curApprovalFilePath
:
""
,
}
;
},
computed
:
{
getFileType
()
{
if
(
this
.
curApprovalFilePath
.
endsWith
(
'
.pdf
'
))
{
return
true
if
(
this
.
curApprovalFilePath
.
endsWith
(
"
.pdf
"
))
{
return
true
;
}
return
false
}
return
false
;
},
},
mounted
()
{
this
.
initMethod
();
},
methods
:
{
initMethod
()
{
dangerJobReportEnterprise
().
then
((
res
)
=>
{
this
.
approvalList
=
[
...
res
.
content
.
map
((
item
)
=>
{
return
{
companyName
:
item
.
enterpriseName
,
companyId
:
item
.
enterpriseId
,
};
}),
];
console
.
log
(
res
,
"
hwapprovalEnters hwapprovalEnters
"
);
});
},
remoteMethod
()
{},
chooseFile
()
{
this
.
addFormInfo
.
file
=
null
this
.
uploadFilePath
=
''
this
.
addFormInfo
.
file
=
null
;
this
.
uploadFilePath
=
""
;
if
(
this
.
$refs
.
chosenfile
.
files
.
length
)
{
const
filePath
=
this
.
$refs
.
chooseFile
.
files
[
0
].
name
const
filePath
=
this
.
$refs
.
chooseFile
.
files
[
0
].
name
;
if
(
!
(
filePath
.
endsWith
(
'
.pdf
'
)
||
filePath
.
endsWith
(
'
.jpg
'
)
||
filePath
.
endsWith
(
'
.jpeg
'
)
||
filePath
.
endsWith
(
'
.png
'
)
||
filePath
.
endsWith
(
'
gif
'
)
filePath
.
endsWith
(
"
.pdf
"
)
||
filePath
.
endsWith
(
"
.jpg
"
)
||
filePath
.
endsWith
(
"
.jpeg
"
)
||
filePath
.
endsWith
(
"
.png
"
)
||
filePath
.
endsWith
(
"
gif
"
)
)
)
{
return
return
;
}
this
.
uploadFilePath
=
filePath
this
.
addFormInfo
.
file
=
this
.
$refs
.
chooseFile
.
files
[
0
]
this
.
uploadFilePath
=
filePath
;
this
.
addFormInfo
.
file
=
this
.
$refs
.
chooseFile
.
files
[
0
]
;
}
},
cancelHWapproval
()
{
this
.
addDialogShow
=
false
this
.
addDialogShow
=
false
;
},
submitHWapproval
()
{
this
.
$refs
.
addform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
}
})
})
;
},
createHWapproval
(
row
)
{
this
.
addFormInfo
.
companyId
=
row
.
companyId
this
.
addDialogShow
=
true
this
.
addFormInfo
.
companyId
=
row
.
companyId
;
this
.
addDialogShow
=
true
;
},
listHwApprovals
(
row
)
{
console
.
log
(
row
,
"
listHwApprovals
"
);
this
.
$router
.
push
(
"
/train/hwapprovalmanage/
"
+
row
.
companyId
+
"
&
"
+
row
.
companyName
);
},
viewApproval
(
prow
,
childrow
)
{},
downloadApproval
(
prow
,
childrow
)
{}
}
}
downloadApproval
(
prow
,
childrow
)
{}
,
}
,
}
;
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/hwapproval/hwapprovals.vue
0 → 100644
View file @
5d2f8010
<
template
>
<div
class=
"hwapprovals-wrapper"
>
<div
class=
"hwapprovals-find-tools-wrapper"
>
<div
class=
"hwapprovals-companyName"
>
<h2>
{{
companyName
}}
</h2>
<el-divider></el-divider>
</div>
<!--
<div
class=
"hwapprovals-find-item"
>
<div
class=
"hwapprovals-title"
>
企业名称:
</div>
<div>
<el-input
v-model=
"hwapprovalsName"
placeholder=
"请输入企业名称"
></el-input>
</div>
</div>
-->
<div
class=
"hwapprovals-find-item"
>
<div
class=
"hwapprovals-title"
>
危险作业名称:
</div>
<div>
<el-input
v-model=
"dangerName"
placeholder=
"请输入危险作业名称"
></el-input>
</div>
</div>
<div
class=
"hwapprovals-find-item"
>
<div
class=
"hwapprovals-title"
>
上传日期:
</div>
<div>
<el-date-picker
v-model=
"uploadDate"
type=
"daterange"
range-separator=
"至"
start-placeholder=
"上传开始日期"
end-placeholder=
"上传结束日期"
>
</el-date-picker>
</div>
</div>
<div
class=
"hwapprovals-find-item"
>
<div
class=
"hwapprovals-title"
>
作业时间:
</div>
<div>
<el-date-picker
v-model=
"validTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"有效开始日期"
end-placeholder=
"有效结束日期"
>
</el-date-picker>
</div>
</div>
<div
class=
"hwapprovals-find-btn"
>
<el-button
@
click=
"findDangerjobs"
type=
"primary"
>
查找
</el-button>
</div>
</div>
<div
class=
"hwapprovals-find-tools-wrapper hwapprovals-list"
>
<div
class=
"hwapprovalslist-table-wrapper"
>
<el-table
:data=
"hwapprovalslistTableData"
border
style=
"width: 100%"
>
<el-table-column
prop=
"jobName"
label=
"危险作业名称"
width=
"240"
></el-table-column>
<el-table-column
prop=
"uploadDate"
label=
"上传时间"
width=
"180"
></el-table-column>
<el-table-column
prop=
"time"
label=
"作业时间"
width=
"180"
></el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"success"
@
click=
"viewHwapproval(scope.row)"
>
查看
</el-button
>
<el-button
type=
"primary"
@
click=
"downloadHwapproval(scope.row)"
>
下载
</el-button
>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
</div>
</template>
<
script
>
import
pdf
from
"
vue-pdf
"
;
import
{
dangerJobReport
,
dangerJobReportEnterprise
}
from
"
@/api/dangerjob.js
"
;
import
{
parseTime
}
from
"
@/utils/index.js
"
;
export
default
{
components
:
{
pdf
,
},
data
()
{
return
{
hwapprovalsName
:
""
,
//企业名称
dangerName
:
""
,
//危险作业名称
uploadDate
:
""
,
//上传日期
validTime
:
""
,
//作业时间
filePath
:
""
,
//文件路径
curHwapprovalFilePath
:
""
,
pdfNumPage
:
undefined
,
loadingTask
:
undefined
,
hwapprovalslistTableData
:
[
{
companyId
:
71280
,
filePath
:
"
D:
\\
gemho
\\
tianhong
\\
danger-job-report
\\
gfhmQkIjCGv2118f31720703a6ed72aa25319b2ac768_20220104101158.png
"
,
id
:
4
,
name
:
"
111
"
,
time
:
"
2021-09-09 01:01:01
"
,
uploadDate
:
"
2022-01-04
"
,
},
],
companyId
:
""
,
companyName
:
""
,
};
},
methods
:
{
initJob
()
{
let
params
=
{
companyId
:
this
.
$route
.
params
.
name
.
split
(
"
&
"
)[
0
],
};
dangerJobReport
(
params
).
then
((
res
)
=>
{
// console.log(res.content, "所有");
this
.
hwapprovalslistTableData
=
[
...
res
.
content
.
map
((
item
)
=>
{
console
.
log
(
item
.
name
);
return
{
jobName
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
time
:
item
.
time
,
filePath
:
item
.
filePath
,
id
:
item
.
id
,
};
}),
];
});
},
findDangerjobs
()
{
// console.log(this.companyId);
let
params
=
{};
params
.
companyId
=
this
.
companyId
;
if
(
this
.
dangerName
)
{
params
.
jobName
=
this
.
dangerName
;
}
if
(
this
.
validTime
instanceof
Array
)
{
params
.
jobStartTime
=
parseTime
(
new
Date
(
this
.
validTime
[
0
]),
"
{y}-{m}-{d} {h}:{i}:{s}
"
);
params
.
jobEndTime
=
parseTime
(
new
Date
(
this
.
validTime
[
1
]),
"
{y}-{m}-{d} {h}:{i}:{s}
"
);
}
if
(
this
.
uploadDate
instanceof
Array
)
{
params
.
uploadStartDate
=
parseTime
(
new
Date
(
this
.
uploadDate
[
0
]),
"
{y}-{m}-{d}
"
);
params
.
uploadEndDate
=
parseTime
(
new
Date
(
this
.
uploadDate
[
1
]),
"
{y}-{m}-{d}
"
);
}
dangerJobReport
(
params
).
then
((
res
)
=>
{
// console.log(res);
this
.
hwapprovalslistTableData
=
[
...
res
.
content
.
map
((
item
)
=>
{
console
.
log
(
item
.
name
);
return
{
jobName
:
item
.
name
,
uploadDate
:
item
.
uploadDate
,
time
:
item
.
time
,
filePath
:
item
.
filePath
,
id
:
item
.
id
,
};
}),
];
});
},
viewHwapproval
(
row
)
{
// this.certifyShow = true;
this
.
curHwapprovalFilePath
=
row
.
filePath
;
const
index1
=
this
.
curHwapprovalFilePath
.
indexOf
(
"
\\
"
);
const
index2
=
this
.
curHwapprovalFilePath
.
indexOf
(
"
\\
"
,
index1
+
1
);
const
index3
=
this
.
curHwapprovalFilePath
.
indexOf
(
"
\\
"
,
index2
+
1
);
this
.
curHwapprovalFilePath
=
this
.
curHwapprovalFilePath
.
substring
(
index3
);
if
(
this
.
curHwapprovalFilePath
.
endsWith
(
"
.pdf
"
))
{
// if (this.curHwapprovalFilePath.endsWith(".pdf")) {
this
.
loadingTask
=
pdf
.
createLoadingTask
(
this
.
curHwapprovalFilePath
);
this
.
loadingTask
.
promise
.
then
((
pdf
)
=>
{
this
.
pdfNumPage
=
pdf
.
numPages
;
});
}
},
downloadHwapproval
(
row
)
{
const
link
=
document
.
createElement
(
"
a
"
);
let
curHwapprovalFilePath
=
row
.
filepath
;
const
index1
=
this
.
curHwapprovalFilePath
.
indexOf
(
"
\\
"
);
const
index2
=
this
.
curHwapprovalFilePath
.
indexOf
(
"
\\
"
,
index1
+
1
);
const
index3
=
this
.
curHwapprovalFilePath
.
indexOf
(
"
\\
"
,
index2
+
1
);
curHwapprovalFilePath
=
this
.
curHwapprovalFilePath
.
substring
(
index3
);
link
.
href
=
curHwapprovalFilePath
;
link
.
setAttribute
(
"
download
"
,
row
.
filepath
.
substr
(
row
.
filepath
.
lastIndexOf
(
"
/
"
)
+
1
)
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
link
.
remove
();
window
.
URL
.
revokeObjectURL
(
link
.
href
);
},
},
mounted
()
{
// console.log(this.$route.params.name);
this
.
companyId
=
this
.
$route
.
params
.
name
.
split
(
"
&
"
)[
0
];
this
.
companyName
=
this
.
$route
.
params
.
name
.
split
(
"
&
"
)[
1
];
// console.log(this.companyName, "this.companyName this.companyName");
this
.
initJob
();
},
};
</
script
>
<
style
lang=
"scss"
>
.hwapprovals-find-tools-wrapper
{
display
:
flex
;
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
flex-wrap
:
wrap
;
box-shadow
:
0
0
9px
1px
#eee
;
.hwapprovals-companyName
{
width
:
80%
;
margin
:
10px
auto
;
}
.hwapprovals-find-item
{
width
:
80%
;
margin
:
10px
auto
;
padding
:
10px
;
border-radius
:
10px
;
box-shadow
:
0
0
5px
1px
#eee
;
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
.hwapprovals-title
{
width
:
15%
;
display
:
flex
;
justify-content
:
flex-end
;
margin-right
:
20px
;
}
}
.hwapprovals-find-btn
{
width
:
80%
;
margin
:
10px
auto
;
padding
:
2px
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
}
}
.tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
}
.hwapprovalslist-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.hwapprovalslist-title
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
10px
;
align-items
:
center
;
}
}
.hwapprovalslist-table-wrapper
{
width
:
80%
;
padding
:
20px
;
border-radius
:
20px
;
// box-shadow: 0 0 9px 1px #eee;
margin
:
0
auto
;
// background: #eee;
// display: flex;
// justify-content: center;
}
.dualsystem-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.dualsystem-title
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
10px
;
align-items
:
center
;
}
.dualsystem-table-wrapper
{
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
margin-left
:
40px
;
background
:
#eee
;
}
}
.standardization-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.standardization-title
{
display
:
flex
;
justify-content
:
space-between
;
padding
:
10px
;
align-items
:
center
;
}
.standardization-table-wrapper
{
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
margin-left
:
40px
;
background
:
#eee
;
}
}
</
style
>
\ No newline at end of file
src/views/hwapproval/hwapprovalstatistics.vue
View file @
5d2f8010
...
...
@@ -6,42 +6,109 @@
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"备案上传开始日期"
end-placeholder=
"备案上传结束日期"
>
end-placeholder=
"备案上传结束日期"
>
</el-date-picker>
<el-button
type=
"success"
>
查找
</el-button>
<el-button
type=
"success"
@
click=
"statisticsApproval"
>
查找
</el-button>
</div>
<div
class=
"hwapproval-statistics"
ref=
"approvalstatistics"
></div>
</div>
</
template
>
<
script
>
import
{
dangerCriteria
}
from
"
@/api/dangerjob.js
"
;
import
echarts
from
"
echarts
"
;
import
{
parseTime
}
from
"
@/utils/index
"
;
export
default
{
data
()
{
return
{
approvalUploadTime
:
''
}
}
}
approvalUploadTime
:
""
,
};
},
watch
:
{
approvalUploadTime
(
newVal
,
oldVal
)
{
console
.
log
(
newVal
,
oldVal
);
this
.
echartsdom
.
clear
();
this
.
statisticsApproval
();
},
},
mounted
()
{
this
.
echartsdom
=
echarts
.
init
(
this
.
$refs
.
approvalstatistics
);
this
.
statisticsApproval
();
},
methods
:
{
statisticsApproval
()
{
const
params
=
{};
if
(
this
.
approvalUploadTime
instanceof
Array
)
{
params
.
uploadEndDate
=
parseTime
(
new
Date
(),
"
{y}-{m}-{d}
"
);
params
.
uploadStartDate
=
parseTime
(
new
Date
(),
"
{y}-{m}-{d}
"
);
}
dangerCriteria
(
params
).
then
((
res
)
=>
{
const
data1
=
[];
for
(
const
key
in
res
)
{
console
.
log
(
key
);
data1
.
push
({
name
:
key
,
value
:
res
[
key
],
});
}
data1
.
map
(
function
(
val
)
{
if
(
val
.
name
===
"
dangerJobReportEnterpriseNum
"
)
{
val
.
name
=
"
已上传危险作业备案企业数量
"
;
}
else
if
(
val
.
name
===
"
dangerJobReportFileNum
"
)
{
val
.
name
=
"
已上传危险作业备案文件数量
"
;
}
});
this
.
echartsdom
.
setOption
({
title
:
{
text
:
"
危险作业备案统计
"
,
left
:
"
center
"
,
},
tooltip
:
{
trigger
:
"
item
"
,
formatter
:
"
{a} <br/>{b} : {c}
"
,
},
series
:
[
{
name
:
"
危险作业备案
"
,
type
:
"
pie
"
,
radius
:
"
50%
"
,
data
:
data1
,
emphasis
:
{
itemStyle
:
{
shadowBlur
:
10
,
shadowOffsetX
:
0
,
shadowColor
:
"
rgba(0, 0, 0, 0.5)
"
,
},
},
},
],
});
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.hwapproval-statistics-wrapper
{
.hwapproval-statistics-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
30px
;
box-shadow
:
0
0
9px
1px
#eee
;
.hwapproval-tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
30px
;
box-shadow
:
0
0
9px
1px
#eee
;
.hwapproval-tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
30px
;
box-shadow
:
0
0
9px
1px
#eee
;
}
.hwapproval-statistics
{
margin
:
30px
auto
;
width
:
50vw
;
height
:
50vh
;
}
}
.hwapproval-statistics
{
margin
:
30px
auto
;
width
:
50vw
;
height
:
50vh
;
}
}
</
style
>
\ No newline at end of file
src/views/nested/menu2/index.vue
View file @
5d2f8010
<
template
>
<div
style=
"padding:30px;"
>
<el-alert
:closable=
"false"
title=
"二级菜单"
/>
<div
class=
"test"
>
<el-row
:gutter=
"20"
>
<el-col
class=
"center"
:span=
"22"
>
<el-card
shadow=
"always"
>
111
<el-row
:gutter=
"22"
>
<el-col
class=
"center"
:span=
"22"
>
<el-card
shadow=
"always"
>
<el-input
style=
"margin-right: 30px; width: 50%"
placeholder=
"请输入企业名称"
v-model=
"searchEnterName"
clearable
>
</el-input>
<el-button
type=
"success"
@
click=
"searchEnters"
>
查找
</el-button>
</el-card>
</el-col>
</el-row>
<el-row
:gutter=
"22"
>
<el-col
class=
"center"
:span=
"22"
>
<el-card
shadow=
"always"
>
<el-table
:data=
"enterCertifyList"
border
style=
"width: 100%"
>
<el-table-column
prop=
"companyName"
label=
"企业名称"
>
</el-table-column>
<el-table-column
prop=
"emergencyPlan"
label=
"应急预案证书数量"
>
</el-table-column>
<el-table-column
prop=
"dualSystem"
label=
"双体系证书数量"
></el-table-column>
<el-table-column
prop=
"standardization"
label=
"标准化证书数量"
></el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
@
click=
"handleClick(scope.row)"
type=
"text"
size=
"small"
>
详情
</el-button
>
</
template
>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
</el-card>
</el-col>
</el-row>
</div>
</template>
<
script
>
import
{
certifyEnters
}
from
"
@/api/certify.js
"
;
export
default
{
data
()
{
return
{
searchEnterName
:
""
,
enterCertifyList
:
[
{
companyName
:
"
威海兴茂置业有限公司
"
,
companyId
:
71522
,
emergencyPlan
:
20
,
dualSystem
:
10
,
standardization
:
10
,
},
{
companyName
:
"
中国石油天然气股份有限公司山东威海销售分公司
"
,
companyId
:
71520
,
emergencyPlan
:
20
,
dualSystem
:
10
,
standardization
:
10
,
},
{
companyName
:
"
威海经济技术开发区洪氏家居生活馆
"
,
companyId
:
71519
,
emergencyPlan
:
15
,
dualSystem
:
12
,
standardization
:
11
,
},
{
companyName
:
"
威海市教育局经济技术开发区教育服务中心
"
,
companyId
:
71517
,
emergencyPlan
:
8
,
dualSystem
:
3
,
standardization
:
1
,
},
],
};
},
methods
:
{
searchEnters
()
{
console
.
log
(
1
);
},
handleClick
(
row
)
{
console
.
log
(
row
);
this
.
$router
.
push
(
"
/train/entercertifymanage/
"
+
row
.
companyId
);
},
},
};
</
script
>
<
style
scoped
>
.center
{
margin
:
20px
auto
;
}
[
class
*=
"el-col-"
]
{
float
:
none
;
}
</
style
>
\ No newline at end of file
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