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
f654b080
Commit
f654b080
authored
Jan 13, 2022
by
liuyuping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'trainimg'
parent
45dae4ce
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1469 additions
and
655 deletions
+1469
-655
dangerjob.js
src/api/dangerjob.js
+8
-0
hwapproval.js
src/api/hwapproval.js
+0
-3
trainimage.js
src/api/trainimage.js
+107
-0
routers.js
src/router/routers.js
+23
-0
index.vue
src/views/entercertifies/index.vue
+0
-16
index.vue
src/views/hiddendanger/index.vue
+657
-465
home1.vue
src/views/home1.vue
+9
-146
hwapproval.vue
src/views/hwapproval/hwapproval.vue
+48
-15
hwapprovals.vue
src/views/hwapproval/hwapprovals.vue
+86
-10
index.vue
src/views/trainimage/index.vue
+140
-0
statistics.vue
src/views/trainimage/statistics.vue
+243
-0
trainimg.vue
src/views/trainimage/trainimg.vue
+148
-0
No files found.
src/api/dangerjob.js
View file @
f654b080
...
...
@@ -22,4 +22,12 @@ export function dangerJobReportEnterprise(params) {//企业分页
method
:
'
get
'
,
params
})
}
export
function
postDangerJobReport
(
data
)
{
return
requestFile
({
url
:
'
/api/dangerJobReport
'
,
method
:
'
post
'
,
data
})
}
\ No newline at end of file
src/api/hwapproval.js
View file @
f654b080
...
...
@@ -26,7 +26,6 @@ export function postHwapproval(data) {
})
}
<<<<<<<
HEAD
export
function
findUploadEnterprise
()
{
return
request
({
url
:
'
/api/enterpriseCertificate/findUploadEnterprise
'
,
...
...
@@ -48,6 +47,4 @@ export function dangerJobReport(params) {
params
})
}
=======
>>>>>>>
5
d2f8010b5e0a42edca437d25d499712d91d7834
src/api/trainimage.js
0 → 100644
View file @
f654b080
import
request
from
'
@/utils/request
'
import
requestFile
from
'
@/utils/requestfile
'
import
qs
from
'
qs
'
// 查询企业
/**
* @param {
* name: 企业名称
* page: 页码
* size: 每页显示的数目
* sort: 排序
* } params
*/
export
function
searchEnterprise
(
params
)
{
return
request
({
url
:
'
api/trainImage/pageEnterprise
'
,
method
:
'
get
'
,
params
})
}
// 查询影像
/**
* @param {
* enterpriseId: 企业id
* page: 页码
* size: 每页显示的数目
* sort: 排序
* } params
*/
export
function
searchTrainImage
(
params
)
{
return
request
({
url
:
'
api/trainImage/pageTrainImage
'
,
method
:
'
get
'
,
params
})
}
/**
* 培训影像管理统计分析
* @returns
*/
export
function
analyzeTrainImg
()
{
return
request
({
url
:
'
api/trainImage/analyze
'
,
method
:
'
get
'
})
}
/**
* department string
* endTime yyyy-MM-dd HH:mm:ss
* industry string
* page num
* size num
* sort
* startTime yyyy-MM-dd HH:mm:ss
* train false
* @param {*} params
*/
// 统计企业列表、每个企业的总参与人次 权限标识: trainImage:analyze
export
function
trainImageAnalyze1
(
params
)
{
return
request
({
url
:
'
api/trainImage/analyze1
'
,
method
:
'
get
'
,
params
})
}
/**
*
*/
// 统计参与培训企业总数量、总参与人次、未参与培训的企业数量 权限标识: trainImage:analyze
export
function
trainImageAnalyze2
(
params
)
{
return
request
({
url
:
'
api/trainImage/analyze2
'
,
method
:
'
get
'
,
params
})
}
/**
* page
* size
* 获取所有应急行业主管部门
*/
export
function
getThIndustryChargeDept
(
params
)
{
return
request
({
url
:
'
api/thIndustryChargeDept
'
,
method
:
'
get
'
,
params
})
}
/**
* page
* size
* 获取所有行业
*/
export
function
getAllIndustry
(
params
)
{
return
request
({
url
:
'
api/thIndustry
'
,
method
:
'
get
'
,
params
})
}
src/router/routers.js
View file @
f654b080
...
...
@@ -68,6 +68,10 @@ const hwapprovalstatistics = () => import('../views/hwapproval/hwapprovalstatist
const
hwapprovalsearch
=
()
=>
import
(
'
../views/hwapproval/findapproval.vue
'
)
const
hwapprovals
=
()
=>
import
(
'
../views/hwapproval/hwapprovals.vue
'
)
const
trainimageenter
=
()
=>
import
(
'
../views/trainimage/index.vue
'
)
const
trainimg
=
()
=>
import
(
'
../views/trainimage/trainimg.vue
'
)
const
trainstatistics
=
()
=>
import
(
'
../views/trainimage/statistics.vue
'
)
Vue
.
use
(
Router
)
export
const
constantRouterMap
=
[
...
...
@@ -511,7 +515,26 @@ export const constantRouterMap = [
component
:
hwapprovals
,
name
:
'
危险作业备案列表
'
,
meta
:
{
title
:
'
危险作业备案列表
'
}
},
{
path
:
'
trainimage/trainimage
'
,
component
:
trainimageenter
,
name
:
'
企业培训影像管理
'
,
meta
:
{
title
:
'
企业培训影像管理
'
}
},
{
path
:
'
trainimage/trainimgstatic
'
,
component
:
trainstatistics
,
name
:
'
培训影像统计
'
,
meta
:
{
title
:
'
培训影像统计
'
}
},
{
path
:
'
trainimage/trainimg/:name
'
,
component
:
trainimg
,
name
:
'
培训影像
'
,
meta
:
{
title
:
'
培训影像
'
}
}
]
},
{
...
...
src/views/entercertifies/index.vue
View file @
f654b080
<
template
>
<div
class=
"enter-safe-manage-wrapper"
>
<div
class=
"enter-safe-tools-wrapper"
>
<!--
<el-select
v-model=
"queryEnter"
multiple
filterable
remote
reserve-keyword
placeholder=
"请输入关键词"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<el-option
v-for=
"item in enterList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
-->
<el-input
v-model=
"searchEnterName"
placeholder=
"请输入企业名称"
...
...
src/views/hiddendanger/index.vue
View file @
f654b080
This diff is collapsed.
Click to expand it.
src/views/home1.vue
View file @
f654b080
...
...
@@ -3677,13 +3677,13 @@ export default {
console
.
log
(
result
,
'
result reuslt _____________
'
)
for
(
let
i
=
0
;
i
<
result
.
length
;
i
++
)
{
if
(
result
[
i
].
dualSystemNum
>
0
)
{
this
.
dualSystemEnters
.
push
(
result
[
i
]
)
this
.
dualSystemEnters
.
push
(
{...
result
[
i
]}
)
}
if
(
result
[
i
].
emergencyPlanNum
>
0
)
{
this
.
emergencyPlanEnters
.
push
(
result
[
i
]
)
this
.
emergencyPlanEnters
.
push
(
{...
result
[
i
]}
)
}
if
(
result
[
i
].
standardizationNum
>
0
)
{
this
.
standardization
.
push
(
result
[
i
]
)
this
.
standardization
.
push
(
{...
result
[
i
]}
)
}
}
let
proArr2
=
[]
...
...
@@ -3694,6 +3694,7 @@ export default {
size
:
999
,
page
:
0
}).
then
(
res
=>
{
console
.
log
(
res
,
'
双体系证书 双体系证书 双体系证书
'
)
this
.
dualSystemEnters
[
i
].
certifies
=
[...
res
.
content
.
map
(
item
=>
{
const
index1
=
item
.
filePath
.
indexOf
(
'
\\
'
)
const
index2
=
item
.
filePath
.
indexOf
(
'
\\
'
,
index1
+
1
)
...
...
@@ -3711,6 +3712,7 @@ export default {
size
:
999
,
page
:
0
}).
then
(
res
=>
{
console
.
log
(
res
,
'
应急预案 应急预案 应急预案
'
)
this
.
emergencyPlanEnters
[
i
].
certifies
=
[...
res
.
content
.
map
(
item
=>
{
const
index1
=
item
.
filePath
.
indexOf
(
'
\\
'
)
const
index2
=
item
.
filePath
.
indexOf
(
'
\\
'
,
index1
+
1
)
...
...
@@ -3721,14 +3723,15 @@ export default {
})
proArr2
.
push
(
p1
)
}
for
(
let
i
=
0
;
i
<
this
.
standardization
Num
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
this
.
standardization
.
length
;
i
++
)
{
const
p1
=
enterHwapproval
({
companyId
:
this
.
standardization
Num
[
i
].
companyId
,
companyId
:
this
.
standardization
[
i
].
companyId
,
category
:
'
标准化
'
,
size
:
999
,
page
:
0
}).
then
(
res
=>
{
this
.
standardizationNum
[
i
].
certifies
=
[...
res
.
content
.
map
(
item
=>
{
console
.
log
(
res
,
'
标准化 标准化 标准化
'
)
this
.
standardization
[
i
].
certifies
=
[...
res
.
content
.
map
(
item
=>
{
const
index1
=
item
.
filePath
.
indexOf
(
'
\\
'
)
const
index2
=
item
.
filePath
.
indexOf
(
'
\\
'
,
index1
+
1
)
const
index3
=
item
.
filePath
.
indexOf
(
'
\\
'
,
index2
+
1
)
...
...
@@ -12018,146 +12021,6 @@ export default {
if
(
this
.
isCurCertifyIndex
===
3
)
{
this
.
certifies
=
item
.
certifies
}
// 判断当前的企业
// if (this.isCurCertifyIndex === 1) {
// if (item.companyName === "威海大庆特种材料制品有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify1/威海大庆特种材料制作有限公司-双体系.pdf",
// },
// ];
// }
// if (item.companyName === "威海大宇电子有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify1/威海大宇电子有限公司-双体系.jpg",
// },
// ];
// }
// if (item.companyName === "威海海马地毯集团有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify1/威海海马地毯集团有限公司-双体系1.pdf",
// },
// {
// filePath:
// "https://8.143.198.78/certify1/威海海马地毯集团有限公司-双体系2.pdf",
// },
// ];
// }
// if (item.companyName === "威海市金宇彩印有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify1/威海市金宇彩印有限公司-双体系1.jpg",
// },
// {
// filePath:
// "https://8.143.198.78/certify1/威海市金宇彩印有限公司-双体系2.jpg",
// },
// ];
// }
// }
// if (this.isCurCertifyIndex === 2) {
// if (item.companyName === "威海大庆特种材料制品有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify3/威海大庆特种材料制品有限公司-应急预案.pdf",
// },
// ];
// }
// if (item.companyName === "威海大宇电子有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify3/威海大宇电子有限公司-应急预案.jpg",
// },
// ];
// }
// if (item.companyName === "威海海马地毯集团有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify3/威海海马地毯集团有限公司-应急预案.pdf",
// },
// ];
// }
// if (item.companyName === "威海锦佳印刷有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify3/威海锦佳印刷有限公司-应急预案.jpg",
// },
// ];
// }
// if (item.companyName === "威海众恒医疗设备有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify3/威海众恒医疗设备有限公司-应急预案.jpg",
// },
// ];
// }
// }
// if (this.isCurCertifyIndex === 3) {
// if (item.companyName === "威海大庆特种材料制品有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify2/威海大庆特种材料制品有限公司-标准化.pdf",
// },
// ];
// }
// if (item.companyName === "威海大宇电子有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify2/威海大宇电子有限公司-标准化.jpg",
// },
// ];
// }
// if (item.companyName === "威海海马地毯集团有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify2/威海海马地毯集团有限公司-标准化.pdf",
// },
// ];
// }
// if (item.companyName === "威海锦佳印刷有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify2/威海锦佳印刷有限公司-标准化.jpg",
// },
// ];
// }
// if (item.companyName === "威海市金宇彩印有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify2/威海市金宇彩印有限公司-标准化.jpg",
// },
// ];
// }
// if (item.companyName === "威海众恒医疗设备有限公司") {
// this.certifies = [
// {
// filePath:
// "https://8.143.198.78/certify2/威海众恒医疗设备有限公司-标准化1.jpg",
// },
// {
// filePath:
// "https://8.143.198.78/certify2/威海众恒医疗设备有限公司-标准化2.jpg",
// },
// ];
// }
// }
return
;
}
const
AMap
=
window
.
AMap
||
{};
...
...
src/views/hwapproval/hwapproval.vue
View file @
f654b080
<
template
>
<div
class=
"hwapproval-wrapper"
>
<div
class=
"hwapproval-tools-wrapper"
>
<el-select
<
!--
<
el-select
v-model=
"searchEnter"
multiple
filterable
...
...
@@ -17,8 +17,9 @@
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
<el-button
type=
"success"
@
click=
""
>
查找
</el-button>
</el-select>
-->
<el-input
v-model=
"searchEnter"
placeholder=
"请输入企业名称"
style=
"width: 80%;"
></el-input>
<el-button
type=
"success"
@
click=
"clickToSearchEnter"
>
查找
</el-button>
</div>
<div
class=
"hwapproval-table-wrapper"
>
<el-table
:data=
"approvalList"
border
>
...
...
@@ -87,13 +88,13 @@
placeholder=
"选择日期时间"
/>
</el-form-item>
<el-form-item
prop=
"uploadTime"
label=
"上传时间"
>
<
!-- <
el-form-item prop="uploadTime" label="上传时间">
<el-date-picker
v-model="addFormInfo.uploadTime"
type="datetime"
placeholder="选择日期时间"
/>
</el-form-item>
</el-form-item>
-->
<el-form-item
prop=
"file"
label=
"文件"
>
<div>
<label
...
...
@@ -115,7 +116,8 @@
<
script
>
import
pdf
from
"
vue-pdf
"
;
import
{
dangerJobReportEnterprise
}
from
"
@/api/dangerjob.js
"
;
import
{
dangerJobReportEnterprise
,
postDangerJobReport
}
from
"
@/api/dangerjob.js
"
;
import
{
parseTime
}
from
'
../../utils
'
;
export
default
{
components
:
{
pdf
,
...
...
@@ -173,13 +175,13 @@ export default {
trigger
:
"
change
"
,
},
],
uploadTime
:
[
{
required
:
true
,
message
:
"
请选择上传时间
"
,
trigger
:
"
change
"
,
},
],
//
uploadTime: [
//
{
//
required: true,
//
message: "请选择上传时间",
//
trigger: "change",
//
},
//
],
file
:
[
{
required
:
true
,
...
...
@@ -220,8 +222,9 @@ export default {
chooseFile
()
{
this
.
addFormInfo
.
file
=
null
;
this
.
uploadFilePath
=
""
;
console
.
log
(
this
.
$refs
.
chosenfile
.
files
,
'
this.$refs.chosenfile.files this.$refs.chosenfile.files this.$refs.chosenfile.files
'
)
if
(
this
.
$refs
.
chosenfile
.
files
.
length
)
{
const
filePath
=
this
.
$refs
.
cho
oseF
ile
.
files
[
0
].
name
;
const
filePath
=
this
.
$refs
.
cho
senf
ile
.
files
[
0
].
name
;
if
(
!
(
filePath
.
endsWith
(
"
.pdf
"
)
||
...
...
@@ -234,7 +237,7 @@ export default {
return
;
}
this
.
uploadFilePath
=
filePath
;
this
.
addFormInfo
.
file
=
this
.
$refs
.
cho
oseF
ile
.
files
[
0
];
this
.
addFormInfo
.
file
=
this
.
$refs
.
cho
senf
ile
.
files
[
0
];
}
},
cancelHWapproval
()
{
...
...
@@ -243,6 +246,21 @@ export default {
submitHWapproval
()
{
this
.
$refs
.
addform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
const
formData
=
new
FormData
();
formData
.
append
(
'
companyId
'
,
this
.
addFormInfo
.
companyId
);
formData
.
append
(
'
name
'
,
this
.
addFormInfo
.
name
);
formData
.
append
(
'
file
'
,
this
.
addFormInfo
.
file
);
formData
.
append
(
'
time
'
,
parseTime
(
this
.
workTime
,
'
{y}-{m}-{d} {h}:{i}:{s}
'
))
postDangerJobReport
(
formData
).
then
(
res
=>
{
console
.
log
(
res
,
'
postDanegrJobReport postDangerJobReport
'
)
this
.
$message
({
type
:
'
success
'
,
message
:
'
上传成功
'
})
this
.
addDialogShow
=
false
}).
catch
(()
=>
{
this
.
$message
.
error
(
'
上传失败
'
)
})
}
});
},
...
...
@@ -258,6 +276,21 @@ export default {
},
viewApproval
(
prow
,
childrow
)
{},
downloadApproval
(
prow
,
childrow
)
{},
clickToSearchEnter
()
{
dangerJobReportEnterprise
({
enterpriseName
:
this
.
searchEnter
}).
then
(
res
=>
{
this
.
approvalList
=
[
...
res
.
content
.
map
((
item
)
=>
{
return
{
companyName
:
item
.
enterpriseName
,
companyId
:
item
.
enterpriseId
,
};
}),
];
})
},
},
};
</
script
>
...
...
src/views/hwapproval/hwapprovals.vue
View file @
f654b080
...
...
@@ -5,15 +5,6 @@
<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>
...
...
@@ -84,6 +75,35 @@
</el-table>
</div>
</div>
<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>
</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
class=
"certify-inner-wrapper"
>
<img
:src=
"curCertifyFilePath"
class=
"certify-img"
/>
<div
class=
"close-certify"
@
click=
"certifyShow = false"
></div>
</div>
</div>
</div>
</template>
...
...
@@ -97,6 +117,7 @@ export default {
},
data
()
{
return
{
certifyShow
:
false
,
hwapprovalsName
:
""
,
//企业名称
dangerName
:
""
,
//危险作业名称
uploadDate
:
""
,
//上传日期
...
...
@@ -186,12 +207,14 @@ export default {
});
},
viewHwapproval
(
row
)
{
// this.certifyShow = true;
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
);
this
.
curCertifyFilePath
=
this
.
curHwapprovalFilePath
if
(
this
.
curHwapprovalFilePath
.
endsWith
(
"
.pdf
"
))
{
// if (this.curHwapprovalFilePath.endsWith(".pdf")) {
this
.
loadingTask
=
pdf
.
createLoadingTask
(
this
.
curHwapprovalFilePath
);
...
...
@@ -218,6 +241,14 @@ export default {
window
.
URL
.
revokeObjectURL
(
link
.
href
);
},
},
computed
:
{
getFileType
()
{
if
(
this
.
curCertifyFilePath
.
endsWith
(
"
.pdf
"
))
{
return
true
;
}
return
false
;
},
},
mounted
()
{
// console.log(this.$route.params.name);
this
.
companyId
=
this
.
$route
.
params
.
name
.
split
(
"
&
"
)[
0
];
...
...
@@ -336,4 +367,49 @@ export default {
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-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
;
}
}
}
</
style
>
\ No newline at end of file
src/views/trainimage/index.vue
0 → 100644
View file @
f654b080
<
template
>
<div
class=
"train-image-wrapper"
>
<div
class=
"train-image-tools-wrapper"
>
<el-input
v-model=
"searchEntryName"
style=
"width: 80%;"
placeholder=
"请输入企业名称"
></el-input>
<el-button
type=
"primary"
style=
"margin-left: 20px;"
@
click=
"searchEntry"
>
查找
</el-button>
</div>
<div
class=
"train-image-list-wrapper"
>
<el-table
:data=
"enterList"
border
v-loading=
"isLoadingData"
>
<el-table-column
prop=
"name"
label=
"企业名称"
width=
"480"
></el-table-column>
<el-table-column
label=
"操作"
>
<template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"enterDetail(scope.row)"
>
详情
</el-button>
</
template
>
</el-table-column>
</el-table>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"curPageSize"
layout=
"total, prev, pager, next, jumper"
:total=
"totalSize"
></el-pagination>
</div>
</div>
</template>
<
script
>
import
{
searchEnterprise
}
from
'
@/api/trainimage.js
'
export
default
{
data
()
{
return
{
searchEntryName
:
''
,
enterList
:
[
{
name
:
'
威海晶合数字矿山有限公司
'
,
id
:
-
1
},
{
name
:
'
威海港盛船务有限公司
'
,
id
:
-
1
},
{
name
:
'
山东港口威海港有限公司
'
,
id
:
-
1
},
{
name
:
'
山东威海港国际客运有限公司
'
,
id
:
-
1
},
{
name
:
'
威海兴茂置业有限公司
'
}
],
currentPage
:
1
,
curPageSize
:
10
,
totalSize
:
100
,
isLoadingData
:
false
}
},
mounted
()
{
this
.
initData
()
},
methods
:
{
initData
()
{
this
.
isLoadingData
=
true
const
params
=
{
page
:
this
.
currentPage
-
1
,
size
:
this
.
curPageSize
}
if
(
this
.
searchEntryName
)
{
params
.
name
=
this
.
searchEntryName
}
searchEnterprise
(
params
).
then
(
res
=>
{
this
.
enterList
=
[...
res
.
content
]
this
.
totalSize
=
res
.
totalElements
this
.
isLoadingData
=
false
}).
catch
(()
=>
{
this
.
isLoadingData
=
false
})
},
enterDetail
(
row
)
{
console
.
log
(
row
,
'
enterDetail enterDetail enterDetail
'
)
this
.
$router
.
push
(
'
/train/trainimage/trainimg/
'
+
row
.
id
)
},
handleSizeChange
(
val
)
{
this
.
curPageSize
=
val
this
.
initData
()
},
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
this
.
initData
()
},
searchEntry
()
{
this
.
initData
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.train-image-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
30px
;
box-shadow
:
0
0
9px
1px
#eee
;
.train-image-tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
flex-start
;
}
.train-image-list-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
}
</
style
>
src/views/trainimage/statistics.vue
0 → 100644
View file @
f654b080
<
template
>
<div
class=
"trainimg-statistics-wrapper"
>
<div
class=
"trainimg-statistics-tools-wrapper"
>
<div
class=
"trainimg-statistics-tool"
>
<div
class=
"trainimg-statistics-tool-title"
>
行业-主管部门
</div>
<div
class=
"trainimg-statistics-tool-content"
>
<el-select
v-model=
"indus_manager"
placeholder=
"请选择行业-主管部门"
>
<el-option
v-for=
"item in industries"
:key=
"item.name"
:label=
"item.name"
:value=
"item.name"
></el-option>
</el-select>
</div>
</div>
<div
class=
"trainimg-statistics-tool"
>
<div
class=
"trainimg-statistics-tool-title"
>
日期
</div>
<div
class=
"trainimg-statistics-tool-content"
>
<el-date-picker
v-model=
"trainDateTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
>
</el-date-picker>
</div>
</div>
<div
class=
"trainimg-statistics-tool"
>
<div
class=
"trainimg-statistics-tool-title"
>
是否参加培训
</div>
<div
class=
"trainimg-statistics-tool-content"
>
<el-radio
v-model=
"train"
:label=
"true"
>
参加培训
</el-radio>
<el-radio
v-model=
"train"
:label=
"false"
>
未参加培训
</el-radio>
</div>
</div>
<div
style=
"display: flex;flex-direction: row;justify-content: flex-end;padding: 10px;margin: 20px auto; width: 80%;"
>
<el-button
type=
"primary"
@
click=
"findTrainImgStatistics"
>
查找
</el-button>
</div>
</div>
<div
class=
"trainimg-statistics-table-wrapper"
>
<el-table
:data=
"tableData"
border
v-loading=
"isLoadingData"
>
<el-table-column
prop=
"enterpriseName"
label=
"企业名称"
></el-table-column>
<el-table-column
prop=
"peopleNum"
label=
"参与人数"
></el-table-column>
</el-table>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"curPageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalElements"
>
</el-pagination>
</div>
<div
class=
"trainimg-statistics-census-wrapper"
>
<div
class=
"trainimg-statistics-census-item"
>
参与培训企业总数量:
<span
class=
"fontColorStatistics"
>
{{
trainEnterpriseNum
}}
</span></div>
<div
class=
"trainimg-statistics-census-item"
>
总参与人次:
<span
class=
"fontColorStatistics"
>
{{
peopleNum
}}
</span></div>
<div
class=
"trainimg-statistics-census-item"
>
未参与培训的企业数量:
<span
class=
"fontColorStatistics"
>
{{
notTrainEnterpriseNum
}}
</span></div>
</div>
</div>
</
template
>
<
script
>
import
{
trainImageAnalyze1
,
trainImageAnalyze2
,
getThIndustryChargeDept
,
getAllIndustry
}
from
'
@/api/trainimage.js
'
import
{
parseTime
}
from
'
@/utils/index.js
'
export
default
{
data
()
{
return
{
indus_manager
:
''
,
trainDateTime
:
''
,
startTime
:
''
,
endTime
:
''
,
industry
:
''
,
manager
:
''
,
train
:
false
,
industries
:
[],
tableData
:
[],
currentPage
:
1
,
curPageSize
:
10
,
totalElements
:
0
,
// 未参与培训企业数量
notTrainEnterpriseNum
:
0
,
// 总参与人次
peopleNum
:
0
,
// 参与培训企业总数
trainEnterpriseNum
:
0
,
// 是否正在加载表格数据
isLoadingData
:
false
}
},
mounted
()
{
let
params
=
{
page
:
0
,
size
:
999
}
getAllIndustry
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'
getAllIndustry getAllIndustry
'
)
this
.
industries
=
[...
res
.
content
.
map
(
item
=>
{
return
{
name
:
item
.
industryName
+
'
-
'
+
item
.
thIndustryChargeDept
.
icdName
}
})]
})
trainImageAnalyze2
().
then
(
res
=>
{
this
.
notTrainEnterpriseNum
=
res
.
notTrainEnterpriseNum
this
.
peopleNum
=
res
.
peopleNum
?
res
.
peopleNum
:
0
this
.
trainEnterpriseNum
=
res
.
trainEnterpriseNum
})
// console.log(this.$refs.statistics, 'this.$refs.statistics')
},
methods
:
{
handleSizeChange
(
val
)
{
this
.
curPageSize
=
val
},
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
},
findTrainImgStatistics
()
{
if
(
!
(
this
.
startTime
||
this
.
endTime
))
{
this
.
$message
.
error
(
'
请选择日期范围
'
)
return
}
if
(
!
(
this
.
industry
||
this
.
manager
))
{
this
.
$message
.
error
(
'
请选择行业-主管部门
'
)
return
}
let
params
=
{
department
:
this
.
manager
,
endtime
:
this
.
endTime
,
industry
:
this
.
industry
,
page
:
this
.
currentPage
,
size
:
this
.
curPageSize
,
startTime
:
this
.
startTime
,
train
:
this
.
train
}
this
.
isLoadingData
=
true
trainImageAnalyze1
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'
trainImageAnalyze1 trainImageAnalyze1
'
)
this
.
totalElements
=
res
.
totalElements
this
.
tableData
=
[...
res
.
content
]
this
.
isLoadingData
=
false
}).
catch
(()
=>
{
this
.
isLoadingData
=
false
})
}
},
watch
:
{
indus_manager
(
newVal
,
oldVal
)
{
/**
* industry: '',
manager: '',
*/
this
.
industry
=
newVal
.
split
(
'
-
'
)[
0
]
this
.
manager
=
newVal
.
split
(
'
-
'
)[
1
]
},
trainDateTime
(
newVal
,
oldVal
)
{
if
(
newVal
instanceof
Array
)
{
/**
* startTime: '',
* endTime: '',
*/
this
.
startTime
=
parseTime
(
newVal
[
0
])
this
.
endTime
=
parseTime
(
newVal
[
1
])
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.trainimg-statistics-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
30px
;
border-radius
:
30px
;
box-shadow
:
0
0
9px
1px
#eee
;
}
.trainimg-statistics-tools-wrapper
{
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.trainimg-statistics-tool
{
width
:
80%
;
margin
:
20px
auto
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
flex-start
;
align-items
:
center
;
padding
:
15px
;
.trainimg-statistics-tool-title
{
flex-basis
:
30%
;
flex-grow
:
0
;
flex-shrink
:
0
;
text-align
:
right
;
margin-right
:
13px
;
}
.trainimg-statistics-tool-content
{
flex-basis
:
70%
;
flex-grow
:
0
;
flex-shrink
:
0
;
}
}
}
.trainimg-statistics-table-wrapper
{
width
:
80%
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
margin
:
30px
auto
;
}
.trainimg-statistics-census-wrapper
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
flex-start
;
align-items
:
center
;
width
:
80%
;
margin
:
30px
auto
;
padding
:
20px
;
border-radius
:
20px
;
box-shadow
:
0
0
9px
1px
#eee
;
.trainimg-statistics-census-item
{
flex-basis
:
33%
;
.fontColorStatistics
{
color
:
#090d9c
;
}
}
}
</
style
>
src/views/trainimage/trainimg.vue
0 → 100644
View file @
f654b080
<
template
>
<div
class=
"trainimg-total-wrapper"
>
<el-table
:data=
"trainimgData"
border
v-loading=
"isLoadingData"
>
<el-table-column
prop=
"briefIntroduction"
label=
"培训简介"
></el-table-column>
<el-table-column
prop=
"location"
label=
"培训位置"
></el-table-column>
<el-table-column
prop=
"peopleNum"
label=
"培训人数"
></el-table-column>
<el-table-column
prop=
"time"
label=
"培训时间"
></el-table-column>
<el-table-column
prop=
"beforeImgPath"
label=
"培训前照片"
>
<template
slot-scope=
"scope"
>
<el-image
style=
"width: 70px; height: 70px"
:src=
"scope.row.beforeImgPath"
:preview-src-list=
"[scope.row.beforeImgPath]"
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
prop=
"trainingImgPath"
label=
"培训中照片"
>
<
template
slot-scope=
"scope"
>
<el-image
style=
"width: 70px; height: 70px"
:src=
"scope.row.trainingImgPath"
:preview-src-list=
"[scope.row.trainingImgPath]"
>
</el-image>
</
template
>
</el-table-column>
<el-table-column
prop=
"afterImgPath"
label=
"培训后照片"
>
<
template
slot-scope=
"scope"
>
<el-image
style=
"width: 70px; height: 70px"
:src=
"scope.row.afterImgPath"
:preview-src-list=
"[scope.row.afterImgPath]"
>
</el-image>
</
template
>
</el-table-column>
</el-table>
<el-pagination
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"currentPage"
:page-sizes=
"[10, 20, 30, 40]"
:page-size=
"curPageSize"
layout=
"total, sizes, prev, pager, next, jumper"
:total=
"totalSize"
>
</el-pagination>
</div>
</template>
<
script
>
import
{
searchTrainImage
}
from
'
@/api/trainimage.js
'
export
default
{
data
()
{
return
{
companyId
:
''
,
trainimgData
:
[
{
briefIntroduction
:
''
,
location
:
''
,
peopleNum
:
''
,
time
:
''
,
beforeImgPath
:
''
,
trainingImgPath
:
''
,
afterImgPath
:
''
}
],
currentPage
:
1
,
curPageSize
:
10
,
totalSize
:
100
,
isLoadingData
:
false
,
}
},
mounted
()
{
console
.
log
(
this
.
$route
.
params
.
name
,
'
this.$route.params.name this.$route.params.name
'
)
this
.
companyId
=
this
.
$route
.
params
.
name
this
.
initData
()
},
methods
:
{
handleSizeChange
(
val
)
{
this
.
curPageSize
=
val
this
.
initData
()
},
handleCurrentChange
(
val
)
{
this
.
currentPage
=
val
this
.
initData
()
},
initData
()
{
this
.
isLoadingData
=
true
let
params
=
{
enterpriseId
:
this
.
companyId
,
page
:
this
.
currentPage
,
size
:
this
.
curPageSize
,
sort
:
'
time,desc
'
}
searchTrainImage
(
params
).
then
(
res
=>
{
this
.
trainimgData
=
[...
res
.
content
.
map
(
item
=>
{
return
{
briefIntroduction
:
item
.
briefIntroduction
,
location
:
item
.
location
,
peopleNum
:
item
.
peopleNum
,
time
:
item
.
time
,
beforeImgPath
:
item
.
beforeImgPath
,
trainingImgPath
:
item
.
trainingImgPath
,
afterImgPath
:
item
.
afterImgPath
}
})]
this
.
totalSize
=
res
.
totalElements
this
.
isLoadingData
=
false
}).
catch
(()
=>
{
this
.
isLoadingData
=
false
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.trainimg-total-wrapper
{
width
:
80%
;
padding
:
30px
;
border-radius
:
30px
;
margin
:
30px
auto
;
box-shadow
:
0
0
9px
1px
#eee
;
}
</
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