flx:提交企业后台安全风险库模块
This commit is contained in:
parent
1b93d1dd78
commit
1f1fb967ff
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* api接口统一管理 安全检查
|
||||
*/
|
||||
import {post, get} from '../http'
|
||||
import { post, get } from '../http'
|
||||
|
||||
//检查项管理
|
||||
export const getCheckPointsListApi = data => post('xmgl/securityCheckPoints/list', data); //获取 列表
|
||||
@ -101,4 +101,56 @@ export const deleteSafeRegionListApi = data => post('xmgl/hiddenDangerInspectReg
|
||||
export const entryCodeApi = data => post('xmgl/workerInfo/selectWorkerInfoByIdCard', data);
|
||||
export const reduceScoreListApi = data => get('xmgl/xzDeductScoreRecord/list', data);
|
||||
|
||||
|
||||
// 安全风险清单库
|
||||
// 树形查询风险清单库信息
|
||||
export const getRiskListLibraryTreePageApi = data => get('xmgl/riskListLibrary/tree/page', data);
|
||||
// 分页列表查询风险清单库信息
|
||||
export const getRiskListLibraryPageApi = data => get('xmgl/riskListLibrary/page', data);
|
||||
// 列表查询风险清单库信息
|
||||
export const getRiskListLibraryApi = data => get('xmgl/riskListLibrary/list', data);
|
||||
// 添加风险清单库信息
|
||||
export const addRiskListLibraryApi = data => post('xmgl/riskListLibrary/add', data);
|
||||
// 修改风险清单库信息
|
||||
export const editRiskListLibraryApi = data => post('xmgl/riskListLibrary/edit', data);
|
||||
// 删除风险清单库信息
|
||||
export const deleteRiskListLibraryApi = data => post('xmgl/riskListLibrary/delete', data);
|
||||
// 分页列表查询风险清单详情信息
|
||||
export const getRiskListDetailPageApi = data => get('xmgl/riskListDetail/page', data);
|
||||
// 添加风险清单详情信息
|
||||
export const addRiskListDetailApi = data => post('xmgl/riskListDetail/add', data);
|
||||
// 修改风险清单详情信息
|
||||
export const editRiskListDetailApi = data => post('xmgl/riskListDetail/edit', data);
|
||||
// 删除风险清单详情信息
|
||||
export const deleteRiskListDetailApi = data => post('xmgl/riskListDetail/delete', data);
|
||||
// 批量删除风险清单详情信息
|
||||
export const deleteBatchRiskListDetailApi = data => post('xmgl/riskListDetail/deleteBatch', data);
|
||||
|
||||
// 安全风险清单设置
|
||||
// 列表查询安全风险评估计算规则条件项信息
|
||||
export const getRiskListRuleItemListApi = data => get('xmgl/riskListRuleItem/list', data);
|
||||
// 添加安全风险评估计算规则条件项信息
|
||||
export const addRiskListRuleItemApi = data => post('xmgl/riskListRuleItem/add', data);
|
||||
// 修改安全风险评估计算规则条件项信息
|
||||
export const editRiskListRuleItemApi = data => post('xmgl/riskListRuleItem/edit', data);
|
||||
// 删除安全风险评估计算规则条件项信息
|
||||
export const deleteRiskListRuleItemApi = data => post('xmgl/riskListRuleItem/delete', data);
|
||||
// 列表查询安全风险评估计算规则信息
|
||||
export const getRiskListRuleApi = data => get('xmgl/riskListRule/list', data);
|
||||
// 添加安全风险评估计算规则信息
|
||||
export const saveRiskListRuleApi = data => post('xmgl/riskListRule/save', data);
|
||||
// 删除安全风险评估计算规则信息
|
||||
export const deleteRiskListRuleApi = data => post('xmgl/riskListRule/delete', data);
|
||||
|
||||
// 潜在事故类型
|
||||
// 分页列表查询风险清单的潜在事故类型信息
|
||||
export const getRiskListPotentialAccidentTypePageApi = data => get('xmgl/riskListPotentialAccidentType/page', data);
|
||||
// 列表查询风险清单的潜在事故类型信息
|
||||
export const getRiskListPotentialAccidentTypeApi = data => get('xmgl/riskListPotentialAccidentType/list', data);
|
||||
// 添加风险清单的潜在事故类型信息
|
||||
export const addRiskListPotentialAccidentTypeApi = data => post('xmgl/riskListPotentialAccidentType/add', data);
|
||||
// 修改风险清单的潜在事故类型信息
|
||||
export const editRiskListPotentialAccidentTypeApi = data => post('xmgl/riskListPotentialAccidentType/edit', data);
|
||||
// 删除风险清单的潜在事故类型信息
|
||||
export const deleteRiskListPotentialAccidentTypeApi = data => post('xmgl/riskListPotentialAccidentType/delete', data);
|
||||
// 批量删除风险清单的潜在事故类型信息
|
||||
export const deleteBatchRiskListPotentialAccidentTypeApi = data => post('xmgl/riskListPotentialAccidentType/deleteBatch', data);
|
||||
@ -4093,6 +4093,33 @@ const routes2 = [{
|
||||
"../views/companyAdmin/qualityAndSafety/hiddenDangerLibrary.vue"
|
||||
),
|
||||
},
|
||||
// 安全风险清单库
|
||||
{
|
||||
path: "/companyAdmin/qualityAndSafety/safetyRiskList",
|
||||
name: "safetyRiskList",
|
||||
component: () =>
|
||||
import (
|
||||
"../views/companyAdmin/qualityAndSafety/safetyRiskList.vue"
|
||||
),
|
||||
},
|
||||
// 安全风险清单类型
|
||||
{
|
||||
path: "/companyAdmin/qualityAndSafety/safetyRiskListType",
|
||||
name: "safetyRiskListType",
|
||||
component: () =>
|
||||
import (
|
||||
"../views/companyAdmin/qualityAndSafety/safetyRiskListType.vue"
|
||||
),
|
||||
},
|
||||
// 安全风险清单设置
|
||||
{
|
||||
path: "/companyAdmin/qualityAndSafety/safetyRiskListSet",
|
||||
name: "safetyRiskListSet",
|
||||
component: () =>
|
||||
import (
|
||||
"../views/companyAdmin/qualityAndSafety/safetyRiskListSet.vue"
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "/companyAdmin/qualityAndSafety/qualityCheckTypes",
|
||||
name: "qualityCheckTypes",
|
||||
|
||||
2000
src/views/companyAdmin/qualityAndSafety/safetyRiskList.vue
Normal file
2000
src/views/companyAdmin/qualityAndSafety/safetyRiskList.vue
Normal file
File diff suppressed because it is too large
Load Diff
1801
src/views/companyAdmin/qualityAndSafety/safetyRiskListDetail.vue
Normal file
1801
src/views/companyAdmin/qualityAndSafety/safetyRiskListDetail.vue
Normal file
File diff suppressed because it is too large
Load Diff
569
src/views/companyAdmin/qualityAndSafety/safetyRiskListSet.vue
Normal file
569
src/views/companyAdmin/qualityAndSafety/safetyRiskListSet.vue
Normal file
@ -0,0 +1,569 @@
|
||||
<template>
|
||||
<div class="fullHeight">
|
||||
<div class="rightPanel whiteBlock" v-if="!safetyRiskDetailShow">
|
||||
<div class="sidebar_btn">
|
||||
<p class="pageTitle">风险管控设置</p>
|
||||
</div>
|
||||
<div class="tables">
|
||||
<div class="table_box" @click="onDetail">
|
||||
<div>安全风险评估计算</div>
|
||||
<i class="el-icon-arrow-right"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="whiteBlock fullHeight" v-else>
|
||||
<SafetyRiskListSetDetail @updateValue="handleValue"></SafetyRiskListSetDetail>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getDictionaryItemApi } from "@/assets/js/api/companyDiagram";
|
||||
import SafetyRiskListSetDetail from '@/views/companyAdmin/qualityAndSafety/safetyRiskListSetDetail.vue'
|
||||
export default {
|
||||
components: {
|
||||
SafetyRiskListSetDetail,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageInfo: {
|
||||
pageNo: 1, //页数
|
||||
pageSize: 10, //条数
|
||||
total: 0, //总条数
|
||||
},
|
||||
riskListForm: {
|
||||
region: "",
|
||||
name: "",
|
||||
},
|
||||
defaultExpandAll: false,
|
||||
projectSn: "",
|
||||
projectTypeList: [],
|
||||
riskDialogVisible: false,
|
||||
riskDialogLoading: false,
|
||||
riskDialogTitle: "",
|
||||
riskDialogForm: {
|
||||
nodeName: "",
|
||||
driverType: 3,
|
||||
},
|
||||
riskDialogFormRules: {
|
||||
nodeName: [{ required: true, message: "请输入节点名称", trigger: "blur" }],
|
||||
},
|
||||
safetyRiskDetailShow: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.projectSn = this.$route.query.projectSn;
|
||||
// this.getDicProjectTypeList();
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
handleValue(val) {
|
||||
this.safetyRiskDetailShow = val;
|
||||
},
|
||||
onDetail() {
|
||||
this.safetyRiskDetailShow = true;
|
||||
},
|
||||
// 获取字典工程类别列表
|
||||
getDicProjectTypeList() {
|
||||
getDictionaryItemApi({
|
||||
dictionaryEncoding: "project_type",
|
||||
projectSn: this.projectSn,
|
||||
}).then((res) => {
|
||||
if (res.result.length > 0) {
|
||||
this.projectTypeList = res.result;
|
||||
}
|
||||
});
|
||||
},
|
||||
SizeChange(val) {
|
||||
this.pageInfo.pageSize = val;
|
||||
// this.getListData();
|
||||
},
|
||||
CurrentChange(val) {
|
||||
console.log(val);
|
||||
this.pageInfo.pageNo = val;
|
||||
// this.getListData();
|
||||
},
|
||||
},
|
||||
watch: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.tables {
|
||||
.table_box:nth-child(odd) {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
.table_box {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.check_box {
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
> .el-button {
|
||||
padding: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
> .el-button:first-child {
|
||||
color: #eb4047;
|
||||
}
|
||||
}
|
||||
.dialog-style {
|
||||
.el-input {
|
||||
width: 220px;
|
||||
}
|
||||
.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
.sidebar_btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 8px;
|
||||
padding-left: 15px;
|
||||
.el-button + .el-button {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
.el-form-item--mini.el-form-item {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.flex() {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.treeStyle() {
|
||||
/deep/.el-tree {
|
||||
font-size: 15px;
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
.el-tree-node {
|
||||
white-space: normal;
|
||||
&:focus > .el-tree-node__content {
|
||||
background-color: transparent;
|
||||
}
|
||||
&.is-current > .el-tree-node__content {
|
||||
background-color: rgba(81, 129, 246, 0.14);
|
||||
color: #5181f6;
|
||||
}
|
||||
}
|
||||
.el-tree-node__content {
|
||||
// height: 32px;
|
||||
padding: 7px 0;
|
||||
height: auto;
|
||||
line-height: 16px;
|
||||
position: relative;
|
||||
// margin-bottom: 7px;
|
||||
&:hover {
|
||||
background-color: rgba(81, 129, 246, 0.14);
|
||||
color: #5181f6;
|
||||
}
|
||||
|
||||
.videoName {
|
||||
font-size: 14px;
|
||||
}
|
||||
.projectName {
|
||||
font-size: 14px;
|
||||
width: calc(100% - 55px);
|
||||
display: inline-block;
|
||||
}
|
||||
.companyName2 {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
display: inline-block;
|
||||
width: 192px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.el-tree-node__expand-icon {
|
||||
font-size: 16px;
|
||||
padding: 0 6px;
|
||||
&.is-leaf {
|
||||
color: transparent !important;
|
||||
}
|
||||
}
|
||||
.treeTitle {
|
||||
background-color: #f7f7f7;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.custom-tree-node {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.projectName {
|
||||
// color: #191e3d;
|
||||
// font-size: 15px;
|
||||
// margin-bottom: 8px;
|
||||
// font-weight: 500;
|
||||
}
|
||||
|
||||
.el-icon-view {
|
||||
font-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: 10px;
|
||||
vertical-align: top;
|
||||
display: none;
|
||||
position: absolute;
|
||||
bottom: 10px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
.avatar-uploader {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
// overflow: hidden;
|
||||
height: 178px;
|
||||
}
|
||||
|
||||
.avatar-uploader:hover {
|
||||
border-color: #409eff;
|
||||
}
|
||||
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
line-height: 178px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 178px;
|
||||
height: 178px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.imgBox {
|
||||
position: relative;
|
||||
.el-icon-error {
|
||||
font-size: 20px;
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
top: -10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .projectDialog .el-dialog {
|
||||
margin-top: 20px !important;
|
||||
margin-bottom: 0;
|
||||
.el-input--medium .el-input__inner {
|
||||
// height: 65px;
|
||||
}
|
||||
}
|
||||
.el-icon-setting {
|
||||
font-size: 15px;
|
||||
color: #8eb0fa;
|
||||
}
|
||||
.tableBtns .el-icon-setting {
|
||||
margin-right: 6px;
|
||||
}
|
||||
.CheckboxTitle {
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
padding: 15px;
|
||||
}
|
||||
.zdy-checkbox {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
> label {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
.el-checkbox {
|
||||
width: 46%;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.areaTreeBox {
|
||||
float: left;
|
||||
position: relative;
|
||||
.treeStyle();
|
||||
}
|
||||
|
||||
.areaTreeInner {
|
||||
// background-color: rgba(0, 0, 0, 0.7);
|
||||
width: 300px;
|
||||
padding: 20px 15px;
|
||||
height: calc(100% - 40px);
|
||||
}
|
||||
.treeBox {
|
||||
height: calc(100% - 42px - 66px - 32px);
|
||||
background-color: rgba(216, 216, 216, 0.2);
|
||||
padding-top: 10px;
|
||||
}
|
||||
.rightPanel {
|
||||
float: left;
|
||||
width: calc(100%);
|
||||
padding: 20px 0;
|
||||
height: calc(100% - 40px);
|
||||
.tabs-content {
|
||||
height: calc(100% - 95px);
|
||||
/deep/.el-tabs__content {
|
||||
height: calc(100% - 50px);
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.pagerBox {
|
||||
margin-top: 18px;
|
||||
}
|
||||
.pageTitle {
|
||||
padding-left: .9375rem;
|
||||
}
|
||||
}
|
||||
.operateBtns {
|
||||
float: right; //向右浮动
|
||||
|
||||
i {
|
||||
margin-right: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.plusBtn {
|
||||
float: right;
|
||||
background-color: #409eff;
|
||||
color: white;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
margin-top: -6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.operation-style {
|
||||
.flex();
|
||||
justify-content: center;
|
||||
.operationText:not(:last-child) {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.add {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
:nth-child(2) {
|
||||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
.select {
|
||||
display: flex;
|
||||
width: 500px;
|
||||
max-height: 380px;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
// div{
|
||||
// margin: 3px 15px;
|
||||
// }
|
||||
.el-tag {
|
||||
margin: 5px 10px;
|
||||
}
|
||||
}
|
||||
.select::-webkit-scrollbar {
|
||||
background-color: rgb(132, 132, 133);
|
||||
width: 4px;
|
||||
}
|
||||
.select::-webkit-scrollbar-thumb {
|
||||
background-color: rgb(80, 78, 252);
|
||||
}
|
||||
/deep/ .el-transfer__buttons {
|
||||
display: none;
|
||||
}
|
||||
/deep/ .el-transfer-panel {
|
||||
width: 200px;
|
||||
margin: 5px 22px;
|
||||
}
|
||||
.leftSelect {
|
||||
width: 230px;
|
||||
height: 300px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin: 5px 15px 5px 0;
|
||||
border: 1px solid #f4f2f4;
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding-left: 20px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.el-autocomplete {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 25px;
|
||||
right: 30px;
|
||||
/deep/ .el-input--medium .el-input__inner {
|
||||
border-radius: 10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.el-checkbox-group {
|
||||
height: 190px;
|
||||
width: 90%;
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
top: 95px;
|
||||
left: 25px;
|
||||
.el-checkbox {
|
||||
display: block;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
.el-checkbox-group::-webkit-scrollbar {
|
||||
background-color: #fff;
|
||||
width: 4px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.el-checkbox-group::-webkit-scrollbar-thumb {
|
||||
background-color: #e0e1e3;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
.rightSelect {
|
||||
width: 230px;
|
||||
height: 300px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin: 5px 10px 5px 0;
|
||||
border: 1px solid #f4f2f4;
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding-left: 20px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.rightAllSelect {
|
||||
width: 100%;
|
||||
height: 230px;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
.selectItem {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
span {
|
||||
margin-left: 30px;
|
||||
}
|
||||
img {
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
.selectItem:hover {
|
||||
background-color: #ecf4fd;
|
||||
}
|
||||
.selectItem:hover img {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.rightAllSelect::-webkit-scrollbar {
|
||||
background-color: #fff;
|
||||
width: 4px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.rightAllSelect::-webkit-scrollbar-thumb {
|
||||
background-color: #e0e1e3;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
.select-content {
|
||||
box-sizing: border-box;
|
||||
height: 34px;
|
||||
line-height: 34px !important;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #d7dbe9;
|
||||
padding: 0 15px;
|
||||
position: relative;
|
||||
.tip-text {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
}
|
||||
.select-list {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 34px;
|
||||
left: -3px;
|
||||
z-index: 10;
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
box-shadow: 4px 4px 10px #e3e3e3;
|
||||
padding-top: 10px;
|
||||
&-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 账号审核弹框样式
|
||||
.auditDialog /deep/ .el-dialog__body {
|
||||
padding: 0px;
|
||||
}
|
||||
.dialog_content {
|
||||
padding: 0px;
|
||||
.dialog_content-part {
|
||||
padding: 0px 25px;
|
||||
.dialog-tip {
|
||||
.flex();
|
||||
margin-bottom: 5px;
|
||||
.el-icon-warning-outline {
|
||||
color: #eb474f;
|
||||
}
|
||||
span {
|
||||
color: #eb4047;
|
||||
margin-left: 3px;
|
||||
}
|
||||
}
|
||||
.dialog-search {
|
||||
.flex();
|
||||
span {
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
color: #272d45;
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.dialog-tree {
|
||||
margin: 10px 0px;
|
||||
.treeStyle();
|
||||
/deep/.el-tree-node__content {
|
||||
position: relative;
|
||||
}
|
||||
/deep/.el-tree-node__content > label.el-checkbox {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.relative-group {
|
||||
height: 60px;
|
||||
line-height: 60px;
|
||||
border-top: 1px solid #d8dbe8;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
1700
src/views/companyAdmin/qualityAndSafety/safetyRiskListSetDetail.vue
Normal file
1700
src/views/companyAdmin/qualityAndSafety/safetyRiskListSetDetail.vue
Normal file
File diff suppressed because it is too large
Load Diff
306
src/views/companyAdmin/qualityAndSafety/safetyRiskListType.vue
Normal file
306
src/views/companyAdmin/qualityAndSafety/safetyRiskListType.vue
Normal file
@ -0,0 +1,306 @@
|
||||
<template>
|
||||
<div class="fullHeight">
|
||||
<div class="table_wrap1 whiteBlock">
|
||||
<div class="sidebar_btn">
|
||||
<p class="pageTitle">潜在事故类型</p>
|
||||
<el-form
|
||||
:inline="true" size="medium"
|
||||
class="demo-form-inline"
|
||||
ref="riskListForm"
|
||||
:model="riskListForm"
|
||||
>
|
||||
<el-form-item label="潜在事故类型">
|
||||
<el-input v-model="riskListForm.type" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="queryBtn" size="medium" type="primary" plain>查询</el-button>
|
||||
<el-button @click="refreshBtn" size="medium" type="warning" plain>刷新</el-button>
|
||||
<el-button size="medium" type="primary" @click="addBefore"
|
||||
>{{ $t("message.workType.operate.add") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
:disabled="$refs.multipleTable && $refs.multipleTable.selection.length == 0"
|
||||
type="danger" plain
|
||||
@click="deleteAttendanceBatch"
|
||||
>批量删除</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="check_box">
|
||||
<div>已选{{ $refs.multipleTable ? $refs.multipleTable.selection.length : 0}}项</div>
|
||||
<el-button @click="toggleSelection" type="text" style="color: #eb4047">取消</el-button>
|
||||
<el-button @click="toggleSelection(true)" type="text">全选</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table class="tables" ref="multipleTable" :data="workerList">
|
||||
<el-table-column type="selection" align="center" width="55"></el-table-column>
|
||||
<el-table-column
|
||||
type="index"
|
||||
align="center"
|
||||
:label="$t('message.personnelPosition.beaconManage.table.index')"
|
||||
></el-table-column>
|
||||
<el-table-column align="center" prop="type" label="潜在事故类型"></el-table-column>
|
||||
<el-table-column align="center" width="200" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div class="tableBtns">
|
||||
<div @click="editBefore(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
||||
<span>{{ $t("message.workType.edit") }}</span>
|
||||
</div>
|
||||
<div @click="deleteBefore(scope.row)" class="operationText">
|
||||
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||
<span>{{ $t("message.workType.delete") }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
class="pagerBox"
|
||||
@size-change="SizeChange"
|
||||
@current-change="CurrentChange"
|
||||
:current-page="pageInfo.pageNo"
|
||||
:page-sizes="$store.state.PAGESIZRS"
|
||||
:page-size="pageInfo.pageSize"
|
||||
layout="total, sizes, prev, pager, next"
|
||||
:total="Number(pageInfo.total)"
|
||||
background
|
||||
></el-pagination>
|
||||
</div>
|
||||
<!--:title="type==='add'?'添加工种':type==='edit'?'编辑工种':type==='delete'?'删除工种':''"-->
|
||||
<el-dialog
|
||||
:modal-append-to-body="false"
|
||||
:title="$t('message.workType.operate')[type]"
|
||||
:visible.sync="dialogVisible"
|
||||
width="667px"
|
||||
>
|
||||
<div class="dialog_content">
|
||||
<el-form
|
||||
label-width="120px"
|
||||
size="medium"
|
||||
class="dialogFormBox"
|
||||
ref="addEditForm"
|
||||
:model="workerInfo"
|
||||
>
|
||||
<el-form-item
|
||||
:label="'类型名称'"
|
||||
prop="type"
|
||||
:rules="[{ required: true, message: '请输入', trigger: 'blur' }]"
|
||||
>
|
||||
<el-input
|
||||
v-model="workerInfo.type"
|
||||
:placeholder="$t('message.workType.placeholder')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<div class="dialog-footer">
|
||||
<el-button
|
||||
class="cancleBtn"
|
||||
@click="dialogVisible = false"
|
||||
icon="el-icon-circle-close"
|
||||
size="medium"
|
||||
>{{ $t("message.personnelPosition.cancel") }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-circle-check"
|
||||
@click="addWorker"
|
||||
size="medium"
|
||||
>{{ $t("message.personnelPosition.determine") }}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
addRiskListPotentialAccidentTypeApi,
|
||||
editRiskListPotentialAccidentTypeApi,
|
||||
deleteRiskListPotentialAccidentTypeApi,
|
||||
getRiskListPotentialAccidentTypePageApi,
|
||||
deleteBatchRiskListPotentialAccidentTypeApi
|
||||
} from "@/assets/js/api/safeManage";
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
this.getWorkerList();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
type: "add",
|
||||
workerInfo: { type: "", description: "" },
|
||||
workerList: [],
|
||||
riskListForm: {
|
||||
type: "",
|
||||
},
|
||||
dialogVisible: false,
|
||||
pageInfo: {
|
||||
pageNo: 1, //页数
|
||||
pageSize: 10, //条数
|
||||
total: 0, //总条数
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
addWorker() {
|
||||
if (this.type === "add") {
|
||||
this.$refs["addEditForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
addRiskListPotentialAccidentTypeApi({
|
||||
sn: this.$store.state.userInfo.headquartersSn,
|
||||
type: this.workerInfo.type,
|
||||
// description: this.workerInfo.description,
|
||||
}).then((result) => {
|
||||
if (result.success) {
|
||||
this.dialogVisible = false;
|
||||
this.$message.success(result.message);
|
||||
this.getWorkerList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else if (this.type === "edit") {
|
||||
this.$refs["addEditForm"].validate((valid) => {
|
||||
if (valid) {
|
||||
editRiskListPotentialAccidentTypeApi(this.workerInfo).then((result) => {
|
||||
if (result.success) {
|
||||
this.dialogVisible = false;
|
||||
this.$message.success(result.message);
|
||||
this.getWorkerList();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
console.log("error submit!!");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} else if (this.type === "delete") {
|
||||
deleteRiskListPotentialAccidentTypeApi({ id: this.workerInfo.id }).then(
|
||||
(result) => {
|
||||
if (result.success) {
|
||||
this.$message.success(result.message);
|
||||
this.getWorkerList();
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
},
|
||||
PopupBefore(type, worker) {
|
||||
this.dialogVisible = true;
|
||||
this.type = type;
|
||||
this.workerInfo = {
|
||||
...worker,
|
||||
};
|
||||
},
|
||||
addBefore() {
|
||||
this.PopupBefore("add", { type: "" });
|
||||
},
|
||||
editBefore(worker) {
|
||||
this.PopupBefore("edit", worker);
|
||||
},
|
||||
deleteBefore(worker) {
|
||||
this.type = "delete";
|
||||
this.workerInfo = worker;
|
||||
this.$confirm(
|
||||
this.$t("message.personnelPosition.beaconManage.table.confirmText") +
|
||||
"【" +
|
||||
worker.type +
|
||||
"】?",
|
||||
this.$t("message.personnelPosition.beaconManage.table.Tips"),
|
||||
{
|
||||
confirmButtonText: this.$t("message.personnelPosition.confirmButtonText"),
|
||||
cancelButtonText: this.$t("message.personnelPosition.cancelButtonText"),
|
||||
type: "warning",
|
||||
}
|
||||
).then(() => {
|
||||
this.addWorker();
|
||||
});
|
||||
},
|
||||
toggleSelection(flag) {
|
||||
if(flag) {
|
||||
this.$refs.multipleTable.toggleAllSelection(true)
|
||||
} else {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
}
|
||||
},
|
||||
// 批量删除考勤人员
|
||||
deleteAttendanceBatch() {
|
||||
if (this.$refs.multipleTable.selection.length === 0)
|
||||
return this.$message.warning("请勾选需要删除的数据!");
|
||||
this.$confirm("删除后操作不可恢复,请谨慎操作!", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
const ids = this.$refs.multipleTable.selection.map((item) => item.id).join(",");
|
||||
console.log(this.$refs.multipleTable.selection);
|
||||
deleteBatchRiskListPotentialAccidentTypeApi({ ids }).then((res) => {
|
||||
this.queryBtn();
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
queryBtn() {
|
||||
this.pageInfo.pageNo = 1;
|
||||
this.getWorkerList();
|
||||
},
|
||||
refreshBtn() {
|
||||
this.riskListForm.type = "";
|
||||
this.queryBtn();
|
||||
},
|
||||
getWorkerList() {
|
||||
getRiskListPotentialAccidentTypePageApi({
|
||||
sn: this.$store.state.userInfo.headquartersSn,
|
||||
pageNo: this.pageInfo.pageNo,
|
||||
pageSize: this.pageInfo.pageSize,
|
||||
type: this.riskListForm.type,
|
||||
}).then((result) => {
|
||||
if(result.success) {
|
||||
this.workerList = result.result.records;
|
||||
this.pageInfo.total = result.result.total;
|
||||
}
|
||||
});
|
||||
},
|
||||
SizeChange(val) {
|
||||
this.pageInfo.pageSize = val;
|
||||
this.getWorkerList();
|
||||
},
|
||||
CurrentChange(val) {
|
||||
console.log(val);
|
||||
this.pageInfo.pageNo = val;
|
||||
this.getWorkerList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.check_box {
|
||||
display: flex;
|
||||
font-size: 14px;
|
||||
> .el-button {
|
||||
padding: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
> .el-button:first-child {
|
||||
color: #eb4047;
|
||||
}
|
||||
}
|
||||
.table_wrap1 {
|
||||
padding: 15px 0;
|
||||
.sidebar_btn {
|
||||
padding: 0 15px;
|
||||
.el-form-item {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
> div:last-child {
|
||||
font-size: 14px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -259,8 +259,8 @@
|
||||
</template>
|
||||
</el-form>
|
||||
<div slot="footer" style="text-align: center">
|
||||
<el-button type="primary" @click="submitDealForm">确认</el-button>
|
||||
<el-button @click="dealFormCancel">取消</el-button>
|
||||
<el-button type="primary" @click="submitDealForm">保存</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user