Compare commits
2 Commits
a1f21e2e5d
...
7179e8d416
Author | SHA1 | Date |
---|---|---|
|
7179e8d416 | 2 weeks ago |
|
030e718896 | 2 weeks ago |
27 changed files with 995 additions and 56 deletions
@ -0,0 +1,9 @@ |
|||
import request from "@/utils/request"; |
|||
|
|||
// 查询项目人员名单信息列表
|
|||
export function statisticsOfNormal(proNo) { |
|||
return request({ |
|||
url: `/site/deviceInformation/statisticsOfNormal/${proNo}`, |
|||
method: "get", |
|||
}); |
|||
} |
@ -0,0 +1,9 @@ |
|||
import request from "@/utils/request"; |
|||
|
|||
// 查询项目人员名单信息列表
|
|||
export function statisticsOfOverweightEquipment(proNo) { |
|||
return request({ |
|||
url: `/site/deviceInformation/statisticsOfOverweightEquipment/${proNo}`, |
|||
method: "get", |
|||
}); |
|||
} |
@ -0,0 +1,10 @@ |
|||
import request from "@/utils/request"; |
|||
|
|||
// 查询项目人员名单信息列表
|
|||
export function getMaterialOutputStatistics(params) { |
|||
return request({ |
|||
url: `/site/monitoring/getMaterialOutputStatistics`, |
|||
method: "get", |
|||
params: params |
|||
}); |
|||
} |
@ -0,0 +1,10 @@ |
|||
import request from "@/utils/request"; |
|||
|
|||
// 查询项目人员名单信息列表
|
|||
export function typeStatistics(params) { |
|||
return request({ |
|||
url: `/site/personnel/typeStatistics`, |
|||
method: "post", |
|||
params: params, |
|||
}); |
|||
} |
@ -0,0 +1,205 @@ |
|||
<template> |
|||
<!-- 图片管理--> |
|||
<div class="app-container"> |
|||
<el-form :model="queryParams" ref="queryForm" :inline="true"> |
|||
<el-form-item label="隐患名称" prop="hazardName"> |
|||
<el-input |
|||
v-model="queryParams.cv.value" |
|||
placeholder="请输入隐患名称" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
> |
|||
<el-button |
|||
type="primary" |
|||
slot="append" |
|||
icon="el-icon-search" |
|||
size="small" |
|||
@click="handleQuery" |
|||
></el-button> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<el-form-item> |
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
|||
>重置</el-button |
|||
> |
|||
</el-form-item> |
|||
</el-form> |
|||
|
|||
<el-table |
|||
v-loading="loading" |
|||
:data="accList" |
|||
tooltip-effect="dark myTooltips" |
|||
> |
|||
<el-table-column |
|||
label="序号" |
|||
type="index" |
|||
width="50" |
|||
align="center" |
|||
fixed |
|||
/> |
|||
<el-table-column |
|||
label="项目名称" |
|||
align="left" |
|||
prop="entryName" |
|||
min-width="200" |
|||
/> |
|||
<el-table-column |
|||
label="隐患名称" |
|||
align="left" |
|||
prop="hazardName" |
|||
min-width="200" |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="文档附件" |
|||
align="left" |
|||
prop="hazardAttachment" |
|||
min-width="180" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<template v-if="scope.row.hazardAttachment"> |
|||
<div |
|||
v-for="(item, index) in JSON.parse(scope.row.hazardAttachment)" |
|||
:key="item.id + index" |
|||
> |
|||
<i class="el-icon-document"></i> |
|||
{{ item.name }} |
|||
<i |
|||
class="el-icon-download" |
|||
@click="downloadFile1(scope, index)" |
|||
style="cursor: pointer" |
|||
></i> |
|||
</div> |
|||
</template> |
|||
<template v-else> |
|||
<span>暂无附件</span> |
|||
</template> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="操作" |
|||
align="right" |
|||
class-name="small-padding fixed-width" |
|||
min-width="100" |
|||
fixed="right" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleView(scope.row)" |
|||
>查看</el-button |
|||
> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
|
|||
<pagination |
|||
v-show="total > 0" |
|||
:total="total" |
|||
:page.sync="queryParams.pageNum" |
|||
:limit.sync="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
</div> |
|||
</template> |
|||
<script> |
|||
import { listRecord } from "@/api/build/hazardRecord"; |
|||
export default { |
|||
name: "PhotoManagement", |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: {}, |
|||
cv: { |
|||
name: "hazardName", |
|||
type: "like", |
|||
value: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}, |
|||
// 总条数 |
|||
total: 0, |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 竣工验收表格数据 |
|||
accList: [], |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
this.handleQuery(); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: {}, |
|||
cv: { |
|||
name: "hazardName", |
|||
type: "like", |
|||
value: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 查询竣工验收列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
this.queryParams.data.proNo = ""; |
|||
this.queryParams.data.proCode = ""; |
|||
listRecord(this.queryParams).then((response) => { |
|||
this.accList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
handleView(row) { |
|||
console.log(row); |
|||
if (!row.proNo) { |
|||
this.$message.warning("暂无项目信息"); |
|||
return; |
|||
} |
|||
this.$router.push({ |
|||
path: `/building/projectInfo/projectProcess?baseDataId=${row.proNo}&activeName=missIdentification` , |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/css/dialog.scss"; |
|||
</style> |
@ -0,0 +1,92 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div ref="equipmentMonitoring" style="width: 100%; height: 500px"></div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import * as echarts from "echarts"; |
|||
import { statisticsOfNormal } from "@/api/site/equipmentMonitoring"; |
|||
export default { |
|||
name: "equipmentMonitoring", |
|||
props: ["proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
nameTypeOptions: [], |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getDicts("device_name").then((response) => { |
|||
this.nameTypeOptions = response.data; |
|||
}); |
|||
}, |
|||
mounted() { |
|||
this.getequipmentMonitoring(); |
|||
}, |
|||
methods: { |
|||
nameTypeFormat(name) { |
|||
return this.selectDictLabel(this.nameTypeOptions, name); |
|||
}, |
|||
getequipmentMonitoring() { |
|||
statisticsOfNormal(this.proNo).then((res) => { |
|||
console.log("equipmentMonitoring", res); |
|||
this.chartInit(res.data); |
|||
}); |
|||
}, |
|||
chartInit(dataList) { |
|||
let xAxisData = []; |
|||
let seriesData = [ |
|||
{ |
|||
name: "正常", |
|||
type: "bar", |
|||
data: [], |
|||
}, |
|||
{ |
|||
name: "异常", |
|||
type: "bar", |
|||
data: [], |
|||
}, |
|||
]; |
|||
|
|||
dataList.forEach((item) => { |
|||
xAxisData.push(this.nameTypeFormat(item.model)); |
|||
seriesData[0].data.push(item.normal_count || 0); |
|||
seriesData[1].data.push(item.no_normal_count || 0); |
|||
}); |
|||
|
|||
let myChart = echarts.init(this.$refs.equipmentMonitoring); |
|||
let option = { |
|||
tooltip: { |
|||
trigger: "axis", |
|||
axisPointer: { |
|||
type: "shadow", |
|||
}, |
|||
}, |
|||
legend: {}, |
|||
grid: { |
|||
left: "3%", |
|||
right: "4%", |
|||
bottom: "3%", |
|||
containLabel: true, |
|||
}, |
|||
xAxis: { |
|||
type: "category", |
|||
data: xAxisData, |
|||
}, |
|||
yAxis: { |
|||
type: "value", |
|||
boundaryGap: [0, 1], |
|||
minInterval: 1, |
|||
}, |
|||
series: seriesData, |
|||
}; |
|||
|
|||
option && myChart.setOption(option); |
|||
window.addEventListener("resize", function () { |
|||
myChart.resize(); |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped></style> |
@ -0,0 +1,93 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div ref="equipmentOperationWarning" style="width: 100%; height: 500px"></div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import * as echarts from "echarts"; |
|||
import { statisticsOfOverweightEquipment } from "@/api/site/equipmentOperationWarning"; |
|||
export default { |
|||
name: "equipmentOperationWarning", |
|||
props: ["proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
nameTypeOptions: [], |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getDicts("device_name").then((response) => { |
|||
this.nameTypeOptions = response.data; |
|||
}); |
|||
}, |
|||
mounted() { |
|||
this.getequipmentOperationWarning(); |
|||
}, |
|||
methods: { |
|||
nameTypeFormat(name) { |
|||
return this.selectDictLabel(this.nameTypeOptions, name); |
|||
}, |
|||
getequipmentOperationWarning() { |
|||
statisticsOfOverweightEquipment(this.proNo).then((res) => { |
|||
console.log("equipmentOperationWarning", res); |
|||
this.chartInit(res.data); |
|||
}); |
|||
}, |
|||
chartInit(dataList) { |
|||
let xAxisData = []; |
|||
let seriesData = [ |
|||
{ |
|||
name: "统计总数", |
|||
type: "bar", |
|||
data: [], |
|||
}, |
|||
{ |
|||
name: "超重报警数", |
|||
type: "bar", |
|||
data: [], |
|||
}, |
|||
]; |
|||
|
|||
dataList.forEach((item) => { |
|||
xAxisData.push(this.nameTypeFormat(item.model)); |
|||
seriesData[0].data.push(item.total || 0); |
|||
seriesData[1].data.push(item.non_overweight_count |
|||
|| 0); |
|||
}); |
|||
|
|||
let myChart = echarts.init(this.$refs.equipmentOperationWarning); |
|||
let option = { |
|||
tooltip: { |
|||
trigger: "axis", |
|||
axisPointer: { |
|||
type: "shadow", |
|||
}, |
|||
}, |
|||
legend: {}, |
|||
grid: { |
|||
left: "3%", |
|||
right: "4%", |
|||
bottom: "3%", |
|||
containLabel: true, |
|||
}, |
|||
xAxis: { |
|||
type: "category", |
|||
data: xAxisData, |
|||
}, |
|||
yAxis: { |
|||
type: "value", |
|||
boundaryGap: [0, 1], |
|||
minInterval: 1, |
|||
}, |
|||
series: seriesData, |
|||
}; |
|||
|
|||
option && myChart.setOption(option); |
|||
window.addEventListener("resize", function () { |
|||
myChart.resize(); |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped></style> |
@ -0,0 +1,107 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form :model="queryParams" ref="queryForm" :inline="true"> |
|||
<el-form-item label="统计时间" prop="timeType"> |
|||
<el-select |
|||
v-model="queryParams.timeType" |
|||
placeholder="请选择统计时间" |
|||
@change="getproductionOutputStatistics" |
|||
> |
|||
<el-option label="年" value="1"></el-option> |
|||
<el-option label="月" value="2"></el-option> |
|||
<el-option label="日" value="3"></el-option> </el-select |
|||
></el-form-item> |
|||
</el-form> |
|||
<div |
|||
ref="productionOutputStatistics" |
|||
style="width: 100%; height: 500px" |
|||
></div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import * as echarts from "echarts"; |
|||
import { getMaterialOutputStatistics } from "@/api/site/productionOutputStatistics"; |
|||
export default { |
|||
name: "productionOutputStatistics", |
|||
props: ["proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
queryParams: { |
|||
proNo: this.proNo, |
|||
timeType: "1", |
|||
}, |
|||
}; |
|||
}, |
|||
created() {}, |
|||
mounted() { |
|||
this.getproductionOutputStatistics(); |
|||
}, |
|||
methods: { |
|||
getproductionOutputStatistics() { |
|||
getMaterialOutputStatistics(this.queryParams).then((res) => { |
|||
console.log("productionOutputStatistics", res); |
|||
this.chartInit(res.data); |
|||
}); |
|||
}, |
|||
chartInit(dataList) { |
|||
let xAxisData = []; |
|||
let seriesData = [ |
|||
{ |
|||
type: "bar", |
|||
data: [], |
|||
}, |
|||
]; |
|||
|
|||
let titleText = |
|||
this.queryParams.timeType == 1 |
|||
? "本年物料生产量" |
|||
: this.queryParams.timeType == 2 |
|||
? "本月物料生产量" |
|||
: "本日物料生产量"; |
|||
|
|||
dataList.forEach((item) => { |
|||
xAxisData.push(item.time || 0); |
|||
seriesData[0].data.push(item.materialYield || 0); |
|||
}); |
|||
|
|||
let myChart = echarts.init(this.$refs.productionOutputStatistics); |
|||
let option = { |
|||
title: { |
|||
left: "center", |
|||
text: titleText, |
|||
}, |
|||
tooltip: { |
|||
trigger: "axis", |
|||
axisPointer: { |
|||
type: "shadow", |
|||
}, |
|||
}, |
|||
legend: {}, |
|||
grid: { |
|||
left: "3%", |
|||
right: "4%", |
|||
bottom: "3%", |
|||
containLabel: true, |
|||
}, |
|||
xAxis: { |
|||
type: "category", |
|||
data: xAxisData, |
|||
}, |
|||
yAxis: { |
|||
type: "value", |
|||
boundaryGap: [0, 1], |
|||
minInterval: 1, |
|||
}, |
|||
series: seriesData, |
|||
}; |
|||
|
|||
option && myChart.setOption(option); |
|||
window.addEventListener("resize", function () { |
|||
myChart.resize(); |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped></style> |
@ -0,0 +1,149 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form :model="queryParams" ref="queryForm" :inline="true"> |
|||
<el-form-item label="统计类型" prop="type"> |
|||
<el-select |
|||
v-model="queryParams.type" |
|||
placeholder="请选择统计类型" |
|||
@change="getprojectPersonnelStatistics" |
|||
> |
|||
<el-option label="岗位" value="post"></el-option> |
|||
<el-option label="位置" value="position"></el-option> |
|||
<el-option |
|||
label="资质证书" |
|||
value="qualification_certificate" |
|||
></el-option> |
|||
<el-option |
|||
label="是否进场" |
|||
value="enter_arena" |
|||
></el-option> </el-select |
|||
></el-form-item> |
|||
</el-form> |
|||
<div |
|||
ref="projectPersonnelStatistics" |
|||
style="width: 100%; height: 500px" |
|||
></div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import * as echarts from "echarts"; |
|||
import { typeStatistics } from "@/api/site/projectPersonnelStatistics"; |
|||
export default { |
|||
name: "projectPersonnelStatistics", |
|||
props: ["proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
queryParams: { |
|||
proNo: this.proNo, |
|||
type: "post", |
|||
}, |
|||
// 岗位 |
|||
postOptions: [], |
|||
// 位置 |
|||
positionOptions: [], |
|||
// 资质证书 |
|||
qualification_certificateOptions: [], |
|||
// 是否进场 |
|||
enter_arenaOptions: [], |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getDicts("post").then((response) => { |
|||
this.postOptions = response.data; |
|||
}); |
|||
this.getDicts("risk_address").then((response) => { |
|||
this.positionOptions = response.data; |
|||
}); |
|||
this.getDicts("qualifications").then((response) => { |
|||
this.qualification_certificateOptions = response.data; |
|||
}); |
|||
this.getDicts("sys_yes_no").then((response) => { |
|||
this.enter_arenaOptions = response.data; |
|||
}); |
|||
}, |
|||
mounted() { |
|||
this.getprojectPersonnelStatistics(); |
|||
}, |
|||
methods: { |
|||
dataFormat(data, type) { |
|||
return this.selectDictLabel(data, type); |
|||
}, |
|||
getprojectPersonnelStatistics() { |
|||
typeStatistics(this.queryParams).then((res) => { |
|||
console.log("projectPersonnelStatistics", res); |
|||
this.chartInit(res.data); |
|||
}); |
|||
}, |
|||
chartInit(dataList) { |
|||
let xAxisData = []; |
|||
let seriesData = [ |
|||
{ |
|||
type: "bar", |
|||
data: [], |
|||
}, |
|||
]; |
|||
|
|||
let titleText = |
|||
this.queryParams.type == "post" |
|||
? "工区人员分布统计" |
|||
: this.queryParams.type == "position" |
|||
? "项目人员组成统计" |
|||
: this.queryParams.type == "qualification_certificate" |
|||
? "人员资质情况统计" |
|||
: "人员进退场统计"; |
|||
|
|||
dataList.forEach((item) => { |
|||
xAxisData.push( |
|||
this.dataFormat( |
|||
this[`${this.queryParams.type}Options`], |
|||
item[this.queryParams.type] |
|||
) || 0 |
|||
); |
|||
seriesData[0].data.push(item.count || 0); |
|||
}); |
|||
|
|||
console.log("xAxisData", xAxisData); |
|||
|
|||
console.log("seriesData", seriesData); |
|||
|
|||
let myChart = echarts.init(this.$refs.projectPersonnelStatistics); |
|||
let option = { |
|||
title: { |
|||
left: "center", |
|||
text: titleText, |
|||
}, |
|||
tooltip: { |
|||
trigger: "axis", |
|||
axisPointer: { |
|||
type: "shadow", |
|||
}, |
|||
}, |
|||
legend: {}, |
|||
grid: { |
|||
left: "3%", |
|||
right: "4%", |
|||
bottom: "3%", |
|||
containLabel: true, |
|||
}, |
|||
xAxis: { |
|||
type: "category", |
|||
data: xAxisData, |
|||
}, |
|||
yAxis: { |
|||
type: "value", |
|||
boundaryGap: [0, 1], |
|||
minInterval: 1, |
|||
}, |
|||
series: seriesData, |
|||
}; |
|||
|
|||
option && myChart.setOption(option); |
|||
window.addEventListener("resize", function () { |
|||
myChart.resize(); |
|||
}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped></style> |
Loading…
Reference in new issue