fetch:工作危害分析功能

kongyeqing
kongyeqing 2023-06-20 09:14:29 +08:00
parent 12d1d4aad2
commit b956f31151
16 changed files with 2538 additions and 371 deletions

View File

@ -5,9 +5,9 @@ VUE_APP_TITLE = 汉邦唐全真数字服务平台
# 网关地址 # 网关地址
VUE_APP_GATEWAY_URL="/dev-api" VUE_APP_GATEWAY_URL="/dev-api"
# 服务地址 # 服务地址
VUE_APP_BASE_API_URL="http://192.168.1.19:8081/" VUE_APP_BASE_API_URL="http://192.168.2.187:8081/"
# 服务前-- 请严格遵守格式 不允许换行 # 服务前-- 请严格遵守格式 不允许换行
VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file-zy","prevention":"/prevention-yx"}' VUE_APP_SERVICE_PREFIX= '{"system":"/system","file":"/file-zy","prevention":"/prevention-zy"}'
# 是否显示全部菜单 # 是否显示全部菜单
VUE_APP_ALL_MENU = false VUE_APP_ALL_MENU = false
# 微前端地址 # 微前端地址

View File

@ -5,7 +5,7 @@ VUE_APP_TITLE = 汉邦唐全真数字服务平台
# 网关地址 # 网关地址
VUE_APP_GATEWAY_URL="/prod-api" VUE_APP_GATEWAY_URL="/prod-api"
# 服务地址 # 服务地址
VUE_APP_BASE_API_URL="http://192.168.2.3:8081" VUE_APP_BASE_API_URL="http://192.168.2.187:8080"
# 服务前-- 请严格遵守格式 不允许换行 # 服务前-- 请严格遵守格式 不允许换行
VUE_APP_SERVICE_PREFIX= '{"knowledge":"/knowledge","system":"/system"}' VUE_APP_SERVICE_PREFIX= '{"knowledge":"/knowledge","system":"/system"}'
# 是否显示全部菜单 # 是否显示全部菜单

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

184
src/mock/lecRisk.ts 100644
View File

@ -0,0 +1,184 @@
const L_LECCOLUMN:any=[
{
key:"grade",
name:"分值",
width:"80px",
},
{
key:"name",
name:"事故、事件或偏差发生的可能性",
},
];
const L_LECVALUE:any=[
{
index:1,
grade:10,
name:"完全可以预料",
},
{
index:2,
grade:6,
name:"相当可能;或危害的发生不能被发现(没有监测系统);或在现场没有采取防范、监测、保护、控制措施;或在正常情况下经常发生此类事故、事件或偏差",
},
{
index:3,
grade:3,
name:"可能,但不经常;或危害的发生不容易被发现;现场没有检测系统或保护措施(如没有保护装置、没有个人防护用品等),也未作过任何监测;或未严格按操作规程执行;或在现场有控制措施,但未有效执行或控制措施不当;或危害在预期情况下发生",
},
{
index:4,
grade:1,
name:"可能性小,完全意外;或危害的发生容易被发现;现场有监测系统或曾经作过监测;或过去曾经发生类似事故、事件或偏差;或在异常情况下发生过类似事故、事件或偏差",
},
{
index:5,
grade:0.5,
name:"很不可能,可以设想;危害一旦发生能及时发现,并能定期进行监测",
},
{
index:6,
grade:0.2,
name:"极不可能;有充分、有效的防范、控制、监测、保护措施;或员工安全卫生意识相当高,严格执行操作规程"
},
{
index:7,
grade:0.1,
name:"实际不可能"
}
];
const E_COLUMN:any=[
{
key:"grade",
name:"分值",
width:"80px",
},
{
key:"name",
name:"频繁程度",
},
];
const E_VALUE:any=[
{
index:1,
grade:10,
name:"连续暴露"
},
{
index:2,
grade:6,
name:"每天工作时间内暴露"
},
{
index:3,
grade:3,
name:"每周一次或偶然暴露"
},
{
index:4,
grade:2,
name:"每月一次暴露"
},
{
index:5,
grade:1,
name:"每年几次暴露"
},
{
index:6,
grade:0.5,
name:"非常罕见地暴露"
},
];
const C_COLUMN:any=[
{
key:"grade",
name:"分值",
width:"80px",
},
{
key:"condition",
name:"法律、法规及其他要求",
},
{
key:"person",
name:"人员伤亡",
},
{
key:"losses",
name:"直接经济损失(万元)",
},
{
key:"stopwork",
name:"停工",
},
{
key:"business",
name:"公司形象",
},
];
const C_VALUE:any=[
{
index:1,
grade:100,
condition:"严重违反法律法规和标准",
person:"10人以上死亡或50人以上重伤",
losses:"5000以上",
stopwork:"公司停产",
business:"重大国际、国内影响",
},
{
index:2,
grade:40,
condition:"违反法律法规和标准",
person:"3人以上10人以下死亡或10人以上50人以下重伤",
losses:"1000以上",
stopwork:"装置停工",
business:"行业内、省内影响",
},
{
index:3,
grade:15,
condition:"潜在违反法规和标准",
person:"3人以下死亡或10人以下重伤",
losses:"100以上",
stopwork:"部分装置停工",
business:"地区影响",
},
{
index:4,
grade:7,
condition:"不符合上级或行业的安全方针、制度、规定等",
person:"丧失劳动力、截肢、骨折、听力丧失、慢性病",
losses:"10万以上",
stopwork:"部分设备停工",
business:"公司及周边范围",
},
{
index:5,
grade:2,
condition:"不符合公司的安全操作程序、规定",
person:"轻微受伤、间歇不舒服",
losses:"1万以上",
stopwork:"1套设备停工",
business:"引人关注,不利于基本的安全卫生要求",
},
{
index:6,
grade:1,
condition:"完全符合",
person:"无伤亡",
losses:"1万以下",
stopwork:"没有停工",
business:"形象没有受损",
},
];
export { L_LECCOLUMN,L_LECVALUE,E_COLUMN,E_VALUE,C_COLUMN,C_VALUE }

131
src/mock/lsRisk.ts 100644
View File

@ -0,0 +1,131 @@
const L_COLUMN:any=[
// {
// key:"index",
// name:"序号",
// width:"80px",
// },
{
key:"grade",
name:"等级",
width:"80px",
},
{
key:"name",
name:"标准",
},
]
const L_VALUE:any=[
{
index:1,
grade:5,
name:"在现场没有采取防范、监测、保护、控制措施,或危害的发生不能被发现(没有监测系统),或在正常情况下经常发生此类事故或事件。",
},
{
index:2,
grade:4,
name:"危害的发生不容易被发现,现场没有检测系统,也未发生过任何监测,或在现场有控制措施,但未有效执行或控制措施不当,或危害发生或预期情况下发生。",
},
{
index:3,
grade:3,
name:"没有保护措施(如没有保护装置、没有个人防护用品等),或未严格按操作程序执行,或危害的发生容易被发现(现场有监测系统),或曾经作过监测,或过去曾经发生类似事故或事件。",
},
{
index:4,
grade:2,
name:"危害一旦发生能及时发现,并定期进行监测,或现场有防范控制措施,并能有效执行,或过去偶尔发生事故或事件。",
},
{
index:5,
grade:1,
name:"有充分、有效的防范、控制、监测、保护措施,或员工安全卫生意识相当高,严格执行操作规程。极不可能发生事故或事件。",
},
];
const S_COLUMN:any=[
// {
// key:"index",
// name:"序号",
// width:"80px",
// },
{
key:"grade",
name:"等级",
width:"80px",
},
{
key:"condition",
name:"法律、法规及其他要求",
},
{
key:"person",
name:"人员",
},
{
key:"losses",
name:"直接经济损失",
},
{
key:"stopwork",
name:"停工",
},
{
key:"business",
name:"企业形象",
},
]
const S_VALUE:any=[
{
index:1,
grade:5,
condition:"违反法律、法规和标准",
person:"死亡",
losses:"100万元以上",
stopwork:"部分装置(>2 套)或设备",
business:"重大国际影响",
},
{
index:2,
grade:4,
condition:"潜在违反法规和标准",
person:"丧失劳动能力",
losses:"50万元以上",
stopwork:"2套装置停工、或设备停工",
business:"行业内、省内影响",
},
{
index:3,
grade:3,
condition:"不符合上级公司或行业的安全方针、制度、规定等",
person:"截肢、骨折、听力丧失、慢性病",
losses:"1万元以上",
stopwork:"1 套装置停工或设备",
business:"地区影响",
},
{
index:4,
grade:2,
condition:"不符合企业的安全操作程序、规定",
person:"轻微受伤、间歇不舒服",
losses:"1万元以下",
stopwork:"受影响不大,几乎不停工",
business:"公司及周边范围",
},
{
index:5,
grade:1,
condition:"完全符合",
person:"无伤亡",
losses:"无损失",
stopwork:"没有停工",
business:"形象没有受损",
},
];
export { L_COLUMN,L_VALUE,S_COLUMN,S_VALUE }

View File

@ -6,11 +6,40 @@ export default class JobHazardService extends BaseService<any>{
super() super()
} }
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{ public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.system+'/user/list'; const url = this.prefix.prevention+'/job/anal/getList';
return this.get(url,params,true) return this.get(url,params,true)
} }
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{ public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.system+'/user/list';
const url = this.prefix.prevention+'/job/anal/delete';
return this.deleteBatch(url,params,{},true) return this.deleteBatch(url,params,{},true)
} }
public selectById(id):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/job/anal/detail?id='+id;
return this.get(url,null,true)
}
// 新增或更新
public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
if(add){
const url = this.prefix.prevention+'/job/anal/add';
return this.post(url,params,{},showLoading)
}else{
const url = this.prefix.prevention+'/job/anal/update';
return this.put(url,params,{},showLoading)
}
}
// 存草稿
public addOrDraft(params: any, add: boolean,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/job/anal/addDraft';
if(add){
return this.post(url,params,{},showLoading)
}else{
return this.put(url,params,{},showLoading)
}
}
} }

View File

@ -5,79 +5,79 @@
import AreaService from '@/service/area.service'; import AreaService from '@/service/area.service';
import UnitService from '@/service/unit.service'; import UnitService from '@/service/unit.service';
import SystemService from 'hbt-common/service/system.service'; import SystemService from 'hbt-common/service/system.service';
import { Component,Vue } from 'vue-property-decorator'; import { Component, Vue } from 'vue-property-decorator';
@Component @Component
export default class BlankComponent extends Vue { export default class BlankComponent extends Vue {
public systemService = new SystemService(); public systemService = new SystemService();
public areaService = new AreaService(); public areaService = new AreaService();
public unitService = new UnitService(); public unitService = new UnitService();
created(){ created() {
Promise.all([ Promise.all([
this.systemService.getDeptTree(), this.systemService.getDeptTree(),
this.systemService.getDeptList(), this.systemService.getDeptList(),
this.systemService.getUserList({pageSize:0}), this.systemService.getUserList({ pageSize: 0 }),
this.systemService.getPostList({pageSize:1000}), this.systemService.getPostList({ pageSize: 1000 }),
this.systemService.getDictData("common_yes_no"), this.systemService.getDictData("common_yes_no"),
this.systemService.getDictData("prevention_dangrous_level"), this.systemService.getDictData("prevention_dangrous_level"),
this.systemService.getDictData("prevention_risk_level"), this.systemService.getDictData("prevention_risk_level"),
this.systemService.getDictData("prevention_safe_reason"), this.systemService.getDictData("prevention_safe_reason"),
this.systemService.getDictData("prevention_dangrous_type") this.systemService.getDictData("prevention_dangrous_type")
]).then(((results:any)=>{ ]).then(((results: any) => {
this.$store.commit("setDeptTreeList",results[0].data); this.$store.commit("setDeptTreeList", results[0].data);
this.$store.commit("setUserList",results[2].data.datas.map((item)=>{ this.$store.commit("setUserList", results[2].data.datas.map((item) => {
return { return {
name:item.nickName, name: item.nickName,
value:item.userId value: item.userId
} }
})) }))
this.$store.commit("setPostList",results[3].rows.map((item)=>{ this.$store.commit("setPostList", results[3].rows.map((item) => {
return { return {
name:item.postName, name: item.postName,
value:item.postId value: item.postId
} }
})) }))
this.$store.commit("set_common_yes_no",results[4].data.map(item=>{ this.$store.commit("set_common_yes_no", results[4].data.map(item => {
return { return {
name:item.dictLabel, name: item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue
} }
})) }))
this.$store.commit("set_prevention_dangrous_level",results[5].data.map(item=>{ this.$store.commit("set_prevention_dangrous_level", results[5].data.map(item => {
return { return {
name:item.dictLabel, name: item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue
} }
})) }))
this.$store.commit("set_prevention_risk_level",results[6].data.map(item=>{ this.$store.commit("set_prevention_risk_level", results[6].data.map(item => {
return { return {
name:item.dictLabel, name: item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue
} }
})) }))
this.$store.commit("set_prevention_safe_reason",results[7].data.map(item=>{ this.$store.commit("set_prevention_safe_reason", results[7].data.map(item => {
return { return {
name:item.dictLabel, name: item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue
} }
})) }))
this.$store.commit("set_prevention_dangrous_type",results[8].data.map(item=>{ this.$store.commit("set_prevention_dangrous_type", results[8].data.map(item => {
return { return {
name:item.dictLabel, name: item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue
} }
})) }))
this.$store.commit("setDeptList",results[1].data.map((item)=>{ this.$store.commit("setDeptList", results[1].data.map((item) => {
return { return {
name:item.deptName, name: item.deptName,
value:item.deptId value: item.deptId
} }
})) }))

View File

@ -27,18 +27,11 @@ export default class HomeComponent extends Vue {
// //
public barChart:any public barChart:any
// or
B = 2;
// or
private C = 3;
// or
protected D = 4;
// //
mounted(){ mounted(){
window.addEventListener("resize",this.resize) window.addEventListener("resize",this.resize)
} }
beforeDestory(){ beforeDestory(){
console.log(123)
window.removeEventListener("resize",this.resize) window.removeEventListener("resize",this.resize)
} }

View File

@ -11,7 +11,7 @@ import DrawComponent from '@/components/draw.component.vue';
import DeviceService from '@/service/device.service'; import DeviceService from '@/service/device.service';
@Component({ @Component({
template, template,
components:{ components: {
FormComponent, FormComponent,
TableComponent, TableComponent,
DrawComponent, DrawComponent,
@ -59,107 +59,176 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
}] }]
public formActions = [{ public formActions = [{
name:"查询", name: "查询",
value:"search", value: "search",
icon:"el-icon-search", icon: "el-icon-search",
type:"primary" type: "primary"
},{ }, {
name:"清空", name: "清空",
icon:"el-icon-tickets", icon: "el-icon-tickets",
value:"reset" value: "reset"
}]; }];
public tableActions = [{ public tableActions = [{
name:"添加", name: "添加",
value:"add", value: "add",
icon:"el-icon-plus", icon: "el-icon-plus",
type:"primary" type: "primary"
},{ }, {
name:"批量删除", name: "批量删除",
value:"delete", value: "delete",
plain:true, plain: true,
icon:"el-icon-delete", icon: "el-icon-delete",
type:"danger" type: "danger"
}]; }];
public footerActions = [{ public footerActions = [{
name:"选择全部", name: "选择全部",
value:"selectAll", value: "selectAll",
type:"primary" type: "primary"
},{ }, {
name:"反向选择", name: "反向选择",
value:"reverse" value: "reverse"
}]; }];
public formOptions:FormOption<BtnOption>[] = [{ public formOptions: FormOption<BtnOption>[] = [{
name:"区域名称", name: "区域名称",
key:"areaId", key: "areaId",
type:"text", type: "text",
},{ }, {
name:"单元名称", name: "单元名称",
key:"unitId", key: "unitId",
type:"text", type: "text",
}];
public updateOptions: FormOption<BtnOption>[] = [{
name: "选择区域",
key: "areaId",
type: "select",
require: true,
width: "calc(50% - 20px)",
}, {
name: "选择单元",
key: "unitId",
type: "select",
require: true,
width: "calc(50% - 20px)",
}, {
name: "责任部门",
key: "deptId",
type: "select",
require: true,
width: "calc(50% - 20px)",
datas: [{
name: "部门1",
value: 0
}, {
name: "部门2",
value: 1
}]
}, {
name: "责任人",
key: "person",
type: "select",
require: true,
width: "calc(50% - 20px)",
datas: [{
name: "人员1",
value: 0
}, {
name: "人员2",
value: 1
}]
}, {
name: "设备名称",
key: "devicename",
type: "text",
require: true,
width: "calc(50% - 20px)",
}, {
name: "设备类型",
key: "devicetype",
type: "select",
require: true,
width: "calc(50% - 20px)",
}, {
name: "涉及岗位",
key: "job",
require: true,
type: "select",
width: "calc(50% - 20px)",
}, {
name: "安全因素",
key: "safeKey",
require: true,
type: "select",
width: "calc(50% - 20px)",
}]; }];
public showUpdate = false; public showUpdate = false;
public updateParams = {} as any; public updateParams = {} as any;
public selectData = []; public selectData = [];
created(){ created() {
} }
// //
public handleNodeClick(data){ public handleNodeClick(data) {
console.log(data) console.log(data)
} }
public buildTable(){ public buildTable() {
this.tableColumn.push({name:'序号',key:"index"}); this.tableColumn.push({ name: '序号', key: "index" });
this.tableColumn.push({name:'区域名称',key:"deptName",width:"200px"}); this.tableColumn.push({ name: '区域名称', key: "deptName", width: "200px" });
this.tableColumn.push({name:'风险分析单元',key:"deptName",width:"200px"}); this.tableColumn.push({ name: '风险分析单元', key: "deptName", width: "200px" });
this.tableColumn.push({name:'设备名称',key:"person"}); this.tableColumn.push({ name: '设备名称', key: "person" });
this.tableColumn.push({name:'设备类别',key:"person"}); this.tableColumn.push({ name: '设备类别', key: "person" });
this.tableColumn.push({name:'检查项目',key:"status",render:(data)=>{ this.tableColumn.push({
if(data.status==0){ name: '检查项目', key: "status", render: (data) => {
if (data.status == 0) {
return "<span class='noDraw'>未绘制</span>" return "<span class='noDraw'>未绘制</span>"
}else{ } else {
return "<span>已绘制</span>" return "<span>已绘制</span>"
} }
}}); }
this.tableColumn.push({name:'责任人',key:"person"}); });
this.tableColumn.push({name:'责任部门',key:"person"}); this.tableColumn.push({ name: '责任人', key: "person" });
this.tableColumn.push({name:'涉及岗位',key:"person"}); this.tableColumn.push({ name: '责任部门', key: "person" });
this.tableColumn.push({ name: '涉及岗位', key: "person" });
} }
public callback(data){ public callback(data) {
// //
if(data.value==="search"){ if (data.value === "search") {
this.getTableData() this.getTableData()
// //
}else if(data.value === "reset"){ } else if (data.value === "reset") {
this.reset() this.reset()
// //
}else if(data.value === "reverse"){ } else if (data.value === "reverse") {
this.toggleAll() this.toggleAll()
// //
}else if(data.value === "selectAll"){ } else if (data.value === "selectAll") {
this.selectAll() this.selectAll()
}else if(data.value === "delete"){ } else if (data.value === "delete") {
this.deleteData(this.selectData.map((item:any)=>item.id)) this.deleteData(this.selectData.map((item: any) => item.id))
} else if (data.value === "add") {
this.showUpdate = true
} }
} }
// //
public reset(){ public reset() {
this.params = { this.params = {
pageNum:1, pageNum: 1,
pageSize:20, pageSize: 20,
} as any; } as any;
} }
public showUpdateModel(id){ public showUpdateModel(id) {
this.showUpdate = true this.showUpdate = true
} }
public handleClose(){ public handleClose() {
this.showUpdate = false; this.showUpdate = false;
} }
@ -167,20 +236,20 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
public toggleAll() { public toggleAll() {
(this.$refs.multipleTable as any).toggleAllSelection(); (this.$refs.multipleTable as any).toggleAllSelection();
} }
public selectAll(){ public selectAll() {
if(!this.selectData.length){ if (!this.selectData.length) {
this.toggleAll() this.toggleAll()
}else{ } else {
this.tableData.datas.forEach((item,index)=>{ this.tableData.datas.forEach((item, index) => {
const find = this.selectData.find((data:any)=>data.userId === item.userId); const find = this.selectData.find((data: any) => data.userId === item.userId);
if(!find){ if (!find) {
(this.$refs.multipleTable as any).toggleRowSelection(item); (this.$refs.multipleTable as any).toggleRowSelection(item);
} }
}) })
} }
} }
public handleSelectionChange(data){ public handleSelectionChange(data) {
this.selectData = data; this.selectData = data;
} }
} }

View File

@ -37,6 +37,42 @@
</div> </div>
</div> </div>
<el-dialog :close-on-click-modal="false" :title="currentId>0?'详情':currentId===-1?'新增':'编辑'"
:visible.sync="showUpdate" width="952px" :before-close="handleClose">
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
@actionCallback="callback" :actions="updateActions" :full-btn="true" btnPosition="center">
<div class="sub-title">作业步骤</div>
<TableComponent :tableData="tableData" :tableColumn="subTableColumn" @actionCallback="callback($event)"
:actions="subTableActions" actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="tableData.datas" tooltip-effect="dark" height="250" border
row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" label="全选" width="40">
</el-table-column>
<template v-for="item in subTableColumn">
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
:width="item.width" :key="item.key">
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
</el-table-column>
<el-table-column v-else :prop="item.key" :show-overflow-tooltip="item.showTip"
:label="item.name" :width="item.width" :key="item.key">
</el-table-column>
</template>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button type="text" @click="showUpdateModel(scope.row.userId)">修改</el-button>
<el-button type="text" @click="deleteData([scope.row])">删除</el-button>
</template>
</el-table-column>
</el-table>
</TableComponent>
</FormComponent>
</el-dialog>
<el-dialog :close-on-click-modal="false" :title="currentId>0?'详情':currentId===-1?'新增':'编辑'" <el-dialog :close-on-click-modal="false" :title="currentId>0?'详情':currentId===-1?'新增':'编辑'"
:visible.sync="showUpdate" width="952px" :before-close="handleClose"> :visible.sync="showUpdate" width="952px" :before-close="handleClose">
<FormComponent :options="updateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right" <FormComponent :options="updateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right"

View File

@ -118,7 +118,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
} }
// //
public handleNodeClick(data){ public handleNodeClick(data){
console.log(data) console.log('data',data)
} }
public buildTable(){ public buildTable(){

View File

@ -5,7 +5,7 @@
<div class="common-content-box dis-flex flex-col flex-1"> <div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box"> <div class="search-box">
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions" <FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
:full-btn="false" @change="callback" btn-position="end"></FormComponent> :full-btn="false" @change="changes" btn-position="end"></FormComponent>
</div> </div>
<div class="table-box flex-1"> <div class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)" <TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@ -25,9 +25,9 @@
</template> </template>
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showUpdateModel(scope.row.userId)">查看</el-button> <el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
<el-button type="text" @click="showUpdateModel(scope.row.userId)">修改</el-button> <el-button type="text" @click="showUpdateModel(scope.row,false,true)">修改</el-button>
<el-button type="text" @click="deleteData([scope.row])">删除</el-button> <el-button type="text" @click="deleteData([scope.row.id])">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -36,16 +36,16 @@
</div> </div>
</div> </div>
<el-dialog :close-on-click-modal="false" :title="currentId>0?'详情':currentId===-1?'新增':'编辑'" <el-dialog :close-on-click-modal="false" :title="!updateParams.id?'新增':isReadonly?'详情':'编辑'"
:visible.sync="showUpdate" width="952px" :before-close="handleClose"> :visible.sync="showUpdate" width="952px" :before-close="handleClose">
<FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams" <FormComponent :options="updateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
@actionCallback="callback" :actions="updateActions" :full-btn="true" btnPosition="center"> :isReadonly="isReadonly" @actionCallback="callback" @change="changes">
<div class="sub-title">工作危害分析法</div> <div class="sub-title">工作危害分析法</div>
<TableComponent :tableData="currentStepTableData" :tableColumn="subTableColumn"
@actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start"
:showFooter="false" style="margin-bottom: 20px;">
<TableComponent :tableData="tableData" :tableColumn="subTableColumn" @actionCallback="callback($event)" <el-table ref="multipleTable" :data="updateParams.steps" tooltip-effect="dark" height="250" border
:actions="subTableActions" actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="tableData.datas" tooltip-effect="dark" height="250" border
row-key="checked" @selection-change="handleSelectionChange" style="width: 100%"> row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" label="全选" width="40"> <el-table-column type="selection" label="全选" width="40">
</el-table-column> </el-table-column>
@ -60,22 +60,152 @@
</template> </template>
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="">查看</el-button> <el-button v-if="isReadonly" type="text"
<el-button type="text" @click="">修改</el-button> @click="showSubModel(scope.row,isReadonly)">查看</el-button>
<el-button type="text" @click="">评价</el-button> <el-button v-if="isModifyonly" type="text" @click="showSubModel(scope.row)">修改</el-button>
<el-button v-if="!isReadonly && !isModifyonly" type="text"
@click="showSubModel(scope.row)">评价</el-button>
</template>
</el-table-column>
</el-table>
</TableComponent>
</FormComponent>
<FormComponent :options="subBasicRiskOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
:isReadonly="isReadonly" @actionCallback="callback" @change="changes"
:actions="isReadonly? []:updateActions" :full-btn="true" btnPosition="center">
</FormComponent>
</el-dialog>
<!-- 评估矩阵 -->
<el-dialog :close-on-click-modal="false" :visible.sync="showMatrixModal" :title="'区域风险等级判定准则'">
<img style="width:100%" src="../../../../assets/images/5.png" alt="">
</el-dialog>
<!-- 危害分析评价 -->
<el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="880px"
:before-close="handleAnalyClose">
<div class="sub-title">基本信息</div>
<FormComponent :options="subBasicOptions" labelWidth="110px" labelAlign="right"
:data.sync="analysisUpdateParams" @actionCallback="callback" :isReadonly="analyIsReadonly">
</FormComponent>
<div class="sub-title">风险评估</div>
<FormComponent :options="subRiskOptions" labelWidth="110px" labelAlign="right" :data.sync="analysisUpdateParams"
@actionCallback="callback" @change="handleRiskChange" :isReadonly="analyIsReadonly">
</FormComponent>
<div class="sub-title">管控措施</div>
<FormComponent labelWidth="110px" labelAlign="right" :data.sync="analysisUpdateParams"
@actionCallback="measureCallback" :isReadonly="analyIsReadonly">
<TableComponent :tableData="currentMeasureData.datas" :tableColumn="triTableColumn"
@actionCallback="measureCallback($event)" :actions="analyIsReadonly ? []:triTableActions"
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="currentMeasureData.datas" tooltip-effect="dark" height="250" border
row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" label="全选" width="40">
</el-table-column>
<template v-for="item in triTableColumn">
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
:width="item.width" :key="item.key">
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
</el-table-column>
<el-table-column v-else :prop="item.key" :show-overflow-tooltip="item.showTip"
:label="item.name" :width="item.width" :key="item.key">
</el-table-column>
</template>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="showMeasureModel(scope.row,true)">查看</el-button>
<el-button type="text" @click="showMeasureModel(scope.row)">编辑</el-button>
<el-button type="text" @click="deleteMeasure(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</TableComponent> </TableComponent>
</FormComponent> </FormComponent>
<div class="sub-title">残余风险评估</div>
<FormComponent :options="subRemnantsOptions" labelWidth="110px" labelAlign="right"
:data.sync="analysisUpdateParams" @actionCallback="analyCallback" :actions="analyIsReadonly ? []:triActions"
:full-btn="true" btnPosition="center" @change="handleSubRiskChange" :isReadonly="analyIsReadonly">
</FormComponent>
</el-dialog> </el-dialog>
<!-- 风险评估方法 -->
<el-dialog :close-on-click-modal="false" :visible.sync="showRiskUpdate" width="800px" :before-close="handleClose">
<FormComponent :options="riskType === 'ls'? riskLSUpdateOptions:riskLECUpdateOptions " labelWidth="110px"
labelAlign="right" :data.sync="methodUpdateParams" @actionCallback="methodCallback" :actions="triActions"
:full-btn="true" btnPosition="center">
</FormComponent>
<div v-if="riskType === 'ls'">
<img style="width:90%" src="../../../../assets/images/3.png" alt="">
<img style="width:80%" src="../../../../assets/images/2.png" alt="">
</div>
<div v-if="riskType === 'lec'">
<img style="width:100%" src="../../../../assets/images/6.png" alt="">
</div>
</el-dialog>
<!-- 风险评估取值 -->
<div v-if="showRiskValueUpdate">
<el-dialog :close-on-click-modal="false" :title="riskTitle" :visible.sync="showRiskValueUpdate" width="750px"
:before-close="handleClose" :show-close="false">
<TableComponent :tableData="riskTableData" :tableColumn="riskTableColumn" @tabCallback="popCallback($event)"
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;"
:data.sync="methodUpdateParams">
<el-table ref="singleTable" :data="riskTableData" tooltip-effect="dark" border row-key="checked"
highlight-current-row @current-change="handleCurrentChange" style="width: 100%">
<template v-for="item in riskTableColumn">
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
<div slot-scope="scope" style="pointer-events: none;" @click="addVal($event,scope.row)"
v-html="item.render(scope.row)"></div>
</el-table-column>
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key">
</el-table-column>
</template>
</el-table>
</TableComponent>
<ButtonListComponent :actions="triActions" @callback="popCallback" btn-position="center" :full-btn="true">
</ButtonListComponent>
</el-dialog>
</div>
<!-- <el-dialog :close-on-click-modal="false" :title="currentId>0?'详情':currentId===-1?'新增':'编辑'" <!--管控措施-->
:visible.sync="showUpdate" width="952px" :before-close="handleClose"> <el-dialog :close-on-click-modal="false" :title="'管控措施制定'" :visible.sync="showTriUpdate" width="750px"
<FormComponent :options="updateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right" :before-close="handleMeasureClose">
:data.sync="updateParams"></FormComponent> <FormComponent :options="triUpdateOptions" labelWidth="110px" labelAlign="right"
</el-dialog> --> :data.sync="measureUpdataParams" :isReadonly="measureIsReadonly" :actions="subActions"
@actionCallback="measureCallback($event)" :full-btn="true" btnPosition="center" @change="measureChange">
<div class="sub-title">排查任务制定</div>
<TableComponent :tableData="currentTaskData.datas" :tableColumn="taskTableColumn"
@actionCallback="measureCallback($event)" :actions="!measureIsReadonly?fourTableActions:[]"
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="currentTaskData.datas" tooltip-effect="dark" height="250" border
row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
<template v-for="item in taskTableColumn">
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
:width="item.width" :key="item.key">
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
</el-table-column>
<el-table-column v-else :prop="item.key" :show-overflow-tooltip="item.showTip"
:label="item.name" :width="item.width" :key="item.key">
</el-table-column>
</template>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="showTaskModel(scope.row,true)">查看</el-button>
<el-button :v-if="!measureIsReadonly" type="text"
@click="showTaskModel(scope.row)">编辑</el-button>
<el-button :v-if="!measureIsReadonly" type="text"
@click="deleteTask(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</TableComponent>
</FormComponent>
</el-dialog>
<!-- 排查任务 -->
<el-dialog :close-on-click-modal="false" :title="taskCurrentId === -1 ? '新增':taskIsReadonly?'详情':'编辑'"
:visible.sync="showFourUpdate" width="700px" :before-close="handleCloseTask">
<FormComponent :options="taskUpdateOptions" :isReadonly="taskIsReadonly" labelWidth="110px" labelAlign="right"
:data.sync="taskUpdataParams" :actions="subActions" :full-btn="true" btnPosition="center"
@actionCallback="taskCallback" @change="taskSelectChange">
</FormComponent>
</el-dialog>
</div> </div>

File diff suppressed because it is too large Load Diff