Commit 9dc7f639 authored by 李苏's avatar 李苏 💬

逐年月隐患统计

parent 36a89fe1
import request from 'common/src/utils/request'
/* query逐年月隐患统计 */
export function queryYhhz(query) {
return request({
url: '/aqgl/yhgl/yhjl/yhtj',
method: 'post',
data: query||{}
})
}
/* 更新 */
......@@ -118,12 +118,12 @@
},
{
prop: 'fxrq',
label: '起始时间',
label: '未处理完毕数量',
width: 300
},
{
prop: 'yqzgsj',
label: '结束时间',
label: '超期数量',
width:300
}
]
......
<template>
<RelDialog :type='type' :editApp='editApp' :app='app' >
<!-- 填写表单内容,slot=form必写-->
<el-form slot="form" ref="form" :model="form" label-width="80px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="检验项目" ref="userid" prop="userid">
<el-input :readonly="readonly" v-toUpperCase v-model="form.userid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患等级" ref="username" prop="username">
<el-select style="width: 100%;" >
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item :span="12" label="处罚金额">
<el-input :readonly="readonly" v-toUpperCase v-model="form.userid"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="考核分数">
<el-input :readonly="readonly" v-model="form.phone"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="检验内容">
<el-input type="textarea" :readonly="readonly" v-model="form.bz"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<!-- 按钮重写, -->
<!-- <div slot="reFooter">
<span slot="footer">
重写按钮写在这里,根据需要重写 slot(reFooter,foorer) 节点样式 重写方法需要在此页重新定义
</span>
</div> -->
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
this.app.apiTreeQuery({}).then(res=>{
this.bmList=res.data.records
})
},
/* 组件名称*/
name: 'roleManagementEdit',
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
/* 额外初始化,根据需求*/
bmList: [],
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
bmid:'',
userid: '',
username: '',
phone:'',
email:'',
bz: "",
},
/* form提交时的规则,具体规则参考官网*/
rules: {
userid: [{
required: true,
trigger: 'blur'
}, ],
username: [{
required: true,
trigger: 'blur'
}, ]
}
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<div>隐患逐年月统计</div>
<div class="min_full">
<!-- 查询条件-->
<div class="search" v-condition>
<SearchButton :app='app'></SearchButton>
<el-row :gutter="20" class="search-row-1">
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">年:</span>
<!-- <el-input v-model="queryParams.year"></el-input> -->
<el-select style="width: 100%;" v-model="queryParams.year" placeholder="请选择">
<el-option
v-for="item in yearsToNow"
:key="item"
:label="item+'年'"
:value="item">
</el-option>
</el-select>
</div>
</el-col>
<el-col :span="6" class="search-col">
<div class="search-item">
<span class="search-span">月:</span>
<el-select style="width: 100%;" v-model="queryParams.month" placeholder="请选择">
<el-option
v-for="item in 12"
:key="item"
:label="item+'月份'"
:value="item">
</el-option>
</el-select>
</div>
</el-col>
</el-row>
</div>
<!-- 按钮操作-->
<!-- 表格-->
<div class="tablePagers">
<TablePager :delButton='false' @getData='getData' :ref="'TablePager'" :app='app' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
</div>
</template>
<script>
/* 引入需要的接口*/
import {
queryYhhz
} from "@/api/dangerManagement/yhznytj.js";
console.log(queryYhhz)
/* edit页面*/
import Edit from './edit'
import {
tableMixin
} from 'common'
export default {
mixins: [tableMixin],
name: 'appVersion',
/* 初始额外赋值*/
async mounted() {
this.getYearsToNow()
this.$refs['TablePager'].pageQuery()
},
data() {
return {
yearsToNow:[],
/*需要的额外参数 */
/* 基础url*/
baseUrl: 'aqgl/yhgl/yhjl/yhtj',
/* 查询参数*/
queryParams: {
year:'',
month:''
},
getYearsToNow() {
// this.yearsToNow=[2020,2021,2022]
//获取到从那一年开始
let smallYears = 2000
//获取当前时间
let date = new Date
let nowYears = date.getFullYear()
let Years = nowYears - smallYears
let arrYear = []
for (let i = 0; i <= Years; i++) {
arrYear.push(nowYears--)
}
arrYear.forEach(item => {
//下拉框的数组
this.yearsToNow.push(item)
})
},
/* 表格标题对应参数*/
tableTitle: [
{
prop: 'year',
label: '年份',
width:292
},
{
prop: 'month',
label: '月份',
width:292
},
{
prop: 'allCount',
label: '隐患数量',
width: 300
},
{
prop: 'wclCount',
label: '未处理完毕数量',
width: 100
},
{
prop: 'cqCount',
label: '超期数量',
width: 300
},
// {
// prop: 'yqzgsj',
// label: '统计日期',
// width:300
// }
]
}
},
methods: {
/* 基础查询*/
query: queryYhhz,
/* 初始化赋值操作*/
init() {
},
},
components: {
Edit,
}
}
</script>
<style>
<style scoped>
</style>
......@@ -3,19 +3,12 @@
<el-form v-show="details.hasOwnProperty('id')" ref="form" label-width='auto' >
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="部门或分厂">
<RelSelect style="width: 100%;" :readonly="true" src='/kzzx/bm/query' filterable clearable :match="{value:'id',label:'bmmc'}" v-model='details.bmid' ></RelSelect>
<el-form-item label="公司">
<RelSelect style="width: 100%;" :readonly="true" src='jcsj/common/bm/queryGs' filterable clearable :match="{value:'id',label:'bmmc'}" v-model='details.bmid' ></RelSelect>
<!-- <el-input :value="details.bmid" > -->
<!-- </el-input> -->
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车间">
<CjSelect :readonly="true" :dyApp='this' v-model='details.cjid' style="width: 100%;" ></CjSelect>
<!-- <el-input :value="details.cjid" > -->
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="岗位">
<RelSelect style='width: 100%;' :readonly="true" src='aqgl/jcsj/scgw/query' :match="{value:'id',label:'name'}" v-model='details.gwid' ></RelSelect>
......
......@@ -143,24 +143,28 @@
{label: "岗位", prop: "gwName", fieldType: "ftString",width:192},
{label: "风险地点", prop: "fxpcdd", fieldType: "ftString",width:300},
{label: "风险点", prop: "fxdName", fieldType: "ftString",width:300},
/* 假*/
{label: "检查部位", prop: "jcbw", fieldType: "ftString",width:300},
{label: "事故后果", prop: "sghg", fieldType: "ftString",width:300},
{label: "固有风险等级", prop: "gyfxdj", fieldType: "ftString",width:300},
/* 检查部位 事故后果 固有风险等级 现有风险等级*/
{label: "事故类型", prop: "sglx", fieldType: "ftString",width:192},
// {label: "事故类型", prop: "sglx", fieldType: "ftString",width:192},
{label: "危险等级", prop: "wxdj", fieldType: "ftString",width:160,transform:{
url:'/aqgl/fxyk/fxpc/init/wxdj',label:'name',value:'id'
}},
{label: "分值", prop: "fz", fieldType: "float"},
{label: "风险类型", prop: "fxlx", fieldType: "ftString",width:192},
{label: "管控落实后等级", prop: "lsdj", fieldType: "ftString",width:160},
{label: "管理层级", prop: "glcj",width:160,transform:{
url:'/aqgl/fxyk/fxpc/init/glcj',label:'name',value:'id'
}},
{label: "拍照选项", prop: "pzxx", fieldType: "ftString",width:160,transform:{
url:'/aqgl/fxyk/fxpc/init/pzxx',label:'name',value:'id'
}},
{label: "序号", prop: "xh", fieldType: "int"},
{label: "图形编号", prop: "txcode", fieldType: "ftString",width:180},
{label: "措施类型", prop: "cslx", fieldType: "ftString",width:192},
// {label: "分值", prop: "fz", fieldType: "float"},
// {label: "风险类型", prop: "fxlx", fieldType: "ftString",width:192},
// {label: "管控落实后等级", prop: "lsdj", fieldType: "ftString",width:160},
// {label: "管理层级", prop: "glcj",width:160,transform:{
// url:'/aqgl/fxyk/fxpc/init/glcj',label:'name',value:'id'
// }},
// {label: "拍照选项", prop: "pzxx", fieldType: "ftString",width:160,transform:{
// url:'/aqgl/fxyk/fxpc/init/pzxx',label:'name',value:'id'
// }},
// {label: "序号", prop: "xh", fieldType: "int"},
// {label: "图形编号", prop: "txcode", fieldType: "ftString",width:180},
// {label: "措施类型", prop: "cslx", fieldType: "ftString",width:192},
// {label: "基准精度", prop: "jzjd", fieldType: "ftString",width:160},
// {label: "基准维度", prop: "jzwd", fieldType: "ftString",width:160},
// {label: "检查要点", prop: "jcyd", fieldType: "ftString",width:300},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment