Merge commit '0608cdd7c003db20d840cb5b82153d5ccc373cb4' into dev

# Conflicts:
#	.env.development
#	src/store/index.ts
#	src/views/blank.component.vue
kongyeqing
吴延福 2023-06-20 16:24:05 +08:00
commit 088c113af0
19 changed files with 3011 additions and 532 deletions

View File

@ -7,7 +7,7 @@ VUE_APP_GATEWAY_URL="/dev-api"
# 服务地址
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
# 微前端地址

View File

@ -5,7 +5,7 @@ VUE_APP_TITLE = 汉邦唐全真数字服务平台
# 网关地址
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"}'
# 是否显示全部菜单

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,28 @@ export default class DeviceService extends BaseService<any>{
super()
}
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.system+'/user/list';
return this.get(url,params,true)
const url = this.prefix.prevention+'/device/inventory/getList';
return this.post(url,params)
}
public selectById(id):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.prevention+'/device/inventory/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+'/device/inventory/add';
return this.post(url,params,{},showLoading)
}else{
const url = this.prefix.prevention+'/device/inventory/update';
return this.put(url,params,{},showLoading)
}
}
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
const url = this.prefix.system+'/user/list';
const url = this.prefix.prevention +'/device/inventory/delete';
return this.deleteBatch(url,params,{},true)
}
}

View File

@ -6,11 +6,40 @@ export default class JobHazardService extends BaseService<any>{
super()
}
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)
}
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)
}
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

@ -19,7 +19,8 @@ export default new Vuex.Store({
prevention_danger_resource:[],
prevention_danger_type:[],
prevention_occur_step:[],
prevention_major_type:[]
prevention_major_type:[],
prevention_device_type:[]
},
getters: {
dept_map:(state)=>{
@ -92,6 +93,13 @@ export default new Vuex.Store({
})
return map
},
prevention_device_type_map:(state)=>{
const map = {};
state.prevention_device_type.forEach((item:any)=>{
map[item.value] = item.name
})
return map
},
prevention_danger_type_map:(state)=>{
const map = {};
state.prevention_danger_type.forEach((item:any)=>{
@ -169,6 +177,9 @@ export default new Vuex.Store({
set_prevention_occur_step(state,data){
state.prevention_occur_step = data;
},
set_prevention_device_type(state,data){
state.prevention_device_type = data;
}
},
actions: {
},

View File

@ -5,19 +5,19 @@
import AreaService from '@/service/area.service';
import UnitService from '@/service/unit.service';
import SystemService from 'hbt-common/service/system.service';
import { Component,Vue } from 'vue-property-decorator';
import { Component, Vue } from 'vue-property-decorator';
@Component
export default class BlankComponent extends Vue {
public systemService = new SystemService();
public areaService = new AreaService();
public unitService = new UnitService();
created(){
created() {
Promise.all([
this.systemService.getDeptTree(),
this.systemService.getDeptList(),
this.systemService.getUserList({pageSize:0}),
this.systemService.getPostList({pageSize:1000}),
this.systemService.getUserList({ pageSize: 0 }),
this.systemService.getPostList({ pageSize: 1000 }),
this.systemService.getDictData("common_yes_no"),
this.systemService.getDictData("prevention_dangrous_level"),
this.systemService.getDictData("prevention_risk_level"),
@ -33,48 +33,54 @@ export default class BlankComponent extends Vue {
this.$store.commit("setDeptTreeList",results[0].data);
this.$store.commit("setUserList",results[2].data.datas.map((item)=>{
return {
name:item.nickName,
value:item.userId
name: item.nickName,
value: item.userId
}
}))
this.$store.commit("setPostList",results[3].rows.map((item)=>{
this.$store.commit("setPostList", results[3].rows.map((item) => {
return {
name:item.postName,
value:item.postId
name: item.postName,
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 {
name:item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue
name: item.dictLabel,
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 {
name:item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue
name: item.dictLabel,
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 {
name:item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue
name: item.dictLabel,
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 {
name:item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue
name: item.dictLabel,
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 {
name:item.dictLabel,
value:isNaN(+item.dictValue)?item.dictValue:+item.dictValue
name: item.dictLabel,
value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue
}
}))
this.$store.commit("set_prevention_device_type", results[9].data.map(item => {
return {
name: item.dictLabel,
value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue
}
}))
this.$store.commit("set_prevention_cycle_unit",results[9].data.map(item=>{
@ -114,12 +120,10 @@ export default class BlankComponent extends Vue {
}
}))
this.$store.commit("setDeptList",results[1].data.map((item)=>{
this.$store.commit("setDeptList", results[1].data.map((item) => {
return {
name:item.deptName,
value:item.deptId
name: item.deptName,
value: item.deptId
}
}))

View File

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

View File

@ -1,7 +1,6 @@
<div class="common-box dis-flex ">
<div class="common-tree-box" v-if="treeData">
<el-tree :data="treeData" :expand-on-click-node="false" default-expand-all highlight-current @node-click="handleNodeClick">
</el-tree>
<div class="common-tree-box">
<UnitTreeComponent @callback="handleNodeClick"></UnitTreeComponent>
</div>
<div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box">
@ -17,17 +16,23 @@
@selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" label="全选" width="40">
</el-table-column>
<el-table-column label="序号" width="60">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<template v-for="item in tableColumn">
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
<div slot-scope="scope" v-html="item.render(scope.row)" @click="showPros($event,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-column label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="showUpdateModel(scope.row.userId)">查看</el-button>
<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)">修改</el-button>
<el-button type="text" @click="deleteData([scope.row])">删除</el-button>
</template>
</el-table-column>
@ -37,9 +42,63 @@
</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" :isReadonly="true" labelWidth="110px" labelAlign="right"
:data.sync="updateParams"></FormComponent>
<el-dialog :close-on-click-modal="false" :title=" isReadonly?'详情':currentId>0?'编辑':'新增'" :visible.sync="showUpdate"
width="952px" :before-close="handleClose">
<FormComponent :options="updateOptions" :isReadonly="isReadonly" labelWidth="110px" labelAlign="right"
:data.sync="updateParams" @change="changes" :actions="updateActions" @actionCallback="callback"
:full-btn="true" btnPosition="center">
<div class="sub-title">检查项目</div>
<TableComponent :tableData="tableData" :tableColumn="subTableColumn"
@actionCallback="projectCallback($event)" :actions="!isReadonly?tableActions:[]"
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="updateParams.items" tooltip-effect="dark" height="250" border
@selection-change="handleSelectionChange" style="width: 100%">
<el-table-column type="selection" label="全选" width="40" v-if="!isReadonly">
</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" v-if="!isReadonly">
<template slot-scope="scope">
<el-button type="text" @click="showSubmodal(scope.row,true)">查看</el-button>
<el-button type="text" @click="showSubmodal(scope.row)">修改</el-button>
<el-button type="text" @click="deleteProData([scope.row.index - 1])">删除</el-button>
</template>
</el-table-column>
</el-table>
</TableComponent>
</FormComponent>
</el-dialog>
<el-dialog :close-on-click-modal="false" :title="proIsReadonly?'详情':updateProParams.index ?'编辑' :'新增'"
:visible.sync="showProject" width="700px" :before-close="handleProClose">
<FormComponent :options="projectOptions" :isReadonly="proIsReadonly" labelWidth="110px" labelAlign="right"
:data.sync="updateProParams" :actions="proIsReadonly ? [] :updateActions" @actionCallback="subCallback"
:full-btn="true" btnPosition="center">
</FormComponent>
</el-dialog>
<el-dialog :close-on-click-modal="false" title="检查项目" :visible.sync="showProtable" width="800"
:before-close="handleClosePro">
<TableComponent :tableData="currentProTableData" :tableColumn="subTableColumn" :showFooter="false"
style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="currentProTableData.datas" tooltip-effect="dark" height="250" border
style="width: 100%">
<template v-for="item in subTableColumn">
<el-table-column :prop="item.key" :show-overflow-tooltip="item.showTip" :label="item.name"
:width="item.width" :key="item.key">
</el-table-column>
</template>
</el-table>
</TableComponent>
</el-dialog>
</div>

View File

@ -1,6 +1,6 @@
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { Component, Watch } from 'vue-property-decorator';
import template from "./device.component.html"
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue"
import FormComponent from "hbt-common/components/common/form.component.vue"
@ -8,158 +8,404 @@ import TableComponent from "hbt-common/components/common/table.component.vue"
import FormOption from "hbt-common/models/formOptions"
import BtnOption from "hbt-common/models/btnOptions"
import DrawComponent from '@/components/draw.component.vue';
import UnitTreeComponent from '@/components/tree.component.vue';
import DeviceService from '@/service/device.service';
import UnitService from '@/service/unit.service';
import AreaService from '@/service/area.service';
@Component({
template,
components:{
components: {
FormComponent,
TableComponent,
DrawComponent,
UnitTreeComponent,
},
})
export default class DeviceManagerComponent extends BaseRecordComponent<any> {
public tableService = new DeviceService();
public unitService = new UnitService();
public areaService = new AreaService();
public params = {} as any;
public params = {
areaName: "",
unitName: "",
} as any;
public isReadonly = false;
public currentId = -1;
public treeData = [{
label: '一级 1',
children: [{
label: '二级 1-1',
children: [{
label: '三级 1-1-1'
}]
}]
}, {
label: '一级 2',
children: [{
label: '二级 2-1',
children: [{
label: '三级 2-1-1'
}]
}, {
label: '二级 2-2',
children: [{
label: '三级 2-2-1'
}]
}]
}, {
label: '一级 3',
children: [{
label: '二级 3-1',
children: [{
label: '三级 3-1-1'
}]
}, {
label: '二级 3-2',
children: [{
label: '三级 3-2-1'
}]
}]
}]
public treeData = [] as any;
public areaList = [];
public unitList = [];
public subTableColumn = [] as any;
//
public showProject = false;
public updateProParams = {} as any;
public proIsReadonly = false;
public showProtable = false;
public currentProTableData = {
datas: []
} as any;
public formActions = [{
name:"查询",
value:"search",
icon:"el-icon-search",
type:"primary"
},{
name:"清空",
icon:"el-icon-tickets",
value:"reset"
name: "查询",
value: "search",
icon: "el-icon-search",
type: "primary"
}, {
name: "清空",
icon: "el-icon-tickets",
value: "reset"
}];
public tableActions = [{
name:"添加",
value:"add",
icon:"el-icon-plus",
type:"primary"
},{
name:"批量删除",
value:"delete",
plain:true,
icon:"el-icon-delete",
type:"danger"
name: "添加",
value: "add",
icon: "el-icon-plus",
type: "primary"
}, {
name: "批量删除",
value: "delete",
plain: true,
icon: "el-icon-delete",
type: "danger"
}];
public footerActions = [{
name:"选择全部",
value:"selectAll",
type:"primary"
},{
name:"反向选择",
value:"reverse"
name: "选择全部",
value: "selectAll",
type: "primary"
}, {
name: "反向选择",
value: "reverse"
}];
public formOptions:FormOption<BtnOption>[] = [{
name:"区域名称",
key:"areaId",
type:"text",
},{
name:"单元名称",
key:"unitId",
type:"text",
public formOptions: FormOption<BtnOption>[] = [{
name: "区域名称",
key: "areaName",
type: "text",
}, {
name: "单元名称",
key: "unitName",
type: "text",
}];
public updateActions = [{
name: "取消",
value: "cancel"
}, {
name: "保存并继续添加",
value: "saveAndContinue",
type: "primary"
}, {
name: "保存",
value: "save",
type: "primary"
}];
public updateOptions: FormOption<BtnOption>[] = [] as any;
public buildUpdateForm() {
this.updateOptions = [{
name: "选择区域",
key: "areaId",
format: "areaName",
type: "select",
require: true,
width: "calc(50% - 20px)",
showError: false,
datas: this.areaList
}, {
name: "选择单元",
key: "unitId",
format: "unitName",
type: "select",
require: true,
width: "calc(50% - 20px)",
showError: false,
datas: this.unitList
}, {
name: "责任部门",
key: "chargeDeptId",
format: "chargeDeptName",
type: "treeSelect",
require: true,
width: "calc(50% - 20px)",
expandLevel: Infinity,
showError: false,
datas: this.$store.state.deptTreeList,
}, {
name: "责任人",
key: "chargeUserId",
format: "chargeUserName",
type: "select",
require: true,
width: "calc(50% - 20px)",
showError: false,
datas: this.$store.state.userList
}, {
name: "设备名称",
key: "name",
type: "text",
require: true,
width: "calc(50% - 20px)",
}, {
name: "设备类型",
key: "type",
type: "select",
require: true,
width: "calc(50% - 20px)",
datas: this.$store.state.prevention_device_type
}, {
name: "涉及岗位",
key: "postCode",
format: "postName",
multiple: true,
require: true,
type: "select",
width: "calc(50% - 20px)",
datas: this.$store.state.postList
}, {
name: "安全因素",
key: "safetyFactor",
format: 'safetyFactorName',
require: true,
type: "select",
multiple: true,
width: "calc(50% - 20px)",
showError: false,
datas: this.$store.state.prevention_safe_reason
},
{
name: "辨识人",
key: "identifyUserId",
format: "identifyUserName",
type: "select",
width: "calc(50% - 20px)",
require: true,
showError: false,
datas: this.$store.state.userList
}, {
name: "辨识时间",
key: "identifyTime",
type: "date",
subType: "date",
width: "calc(50% - 20px)",
require: true,
showError: false,
format: "yyyy-MM-dd"
}
]
}
public projectOptions: FormOption<BtnOption>[] = [
{
name: "检查项目",
key: "name",
type: "textarea",
require: true,
width: "100%",
},
{
name: "检查标准",
key: "standard",
type: "textarea",
require: true,
width: "100%",
},
];
public showUpdate = false;
public updateParams = {} as any;
public updateParams = {
items: [],
} as any;
public selectData = [];
created(){
@Watch("$store.state.deptList", { immediate: true, deep: true })
onChanges() {
this.loadAreaData()
}
created() {
}
//
public loadAreaData() {
this.areaService.selectByPage({ pageSize: 1000 }).then((res: any) => {
this.areaList = res.data.datas.map(item => {
return {
name: item.name,
value: item.id
}
});
this.buildUpdateForm()
})
}
//
public loadUnitData(id?) {
this.unitService.selectByPage({ pageSize: 1000, areaId: id }, false).then((res: any) => {
this.unitList = res.data.datas.map(item => {
return {
name: item.name,
value: item.id
}
});
this.buildUpdateForm()
})
}
//
public handleNodeClick(data){
console.log(data)
public handleNodeClick(data) {
this.params.unitName = "";
this.params.areaName = "";
if (data.areaId) {
this.params.unitName = data.name
} else {
this.params.areaName = data.name
}
this.getTableData()
}
public buildTable(){
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:"person"});
this.tableColumn.push({name:'设备类别',key:"person"});
this.tableColumn.push({name:'检查项目',key:"status",render:(data)=>{
if(data.status==0){
return "<span class='noDraw'>未绘制</span>"
}else{
return "<span>已绘制</span>"
public buildTable() {
this.tableColumn.push({ name: '区域名称', key: "areaName", width: "200px" });
this.tableColumn.push({ name: '风险分析单元', key: "unitName", width: "200px" });
this.tableColumn.push({ name: '设备名称', key: "name" });
this.tableColumn.push({
name: '设备类别', key: "type", render: (data) => {
if (data.type) {
return this.$store.getters.prevention_device_type_map[data.type];
}
}
}});
this.tableColumn.push({name:'责任人',key:"person"});
this.tableColumn.push({name:'责任部门',key:"person"});
this.tableColumn.push({name:'涉及岗位',key:"person"});
});
this.tableColumn.push({
name: '检查项目', key: "itemNum", render: (data) => {
return "<span class='link'>" + (data.itemNum ? data.itemNum : 0) + "</span>"
}
});
this.tableColumn.push({ name: '责任人', key: "chargeUserName" });
this.tableColumn.push({ name: '责任部门', key: "chargeDeptName" });
this.tableColumn.push({ name: '涉及岗位', key: "postName" });
this.subTableColumn.push({ name: '序号', key: "index", width: "60" });
this.subTableColumn.push({ name: '检查项目', key: "name" });
this.subTableColumn.push({ name: '检查标准', key: "standard" });
}
public callback(data){
public showPros(el, data) {
const isTarget = el.target.classList.contains("link");
if (isTarget) {
this.showProtable = true;
this.currentProTableData.datas = data.items.map((item, index) => {
item.index = index + 1;
return item
})
}
}
public handleClosePro() {
this.showProtable = false;
}
public changes(data, item) {
//
if (item && item.key === "chargeDeptId") {
this.updateParams.chargeDeptName = this.$store.getters.dept_map[data];
}
//
if (item && item.key === 'chargeUserId') {
this.updateParams.chargeUserName = this.$store.getters.user_map[data];
}
//
if (item && item.key === "areaId") {
if (this.updateParams.unitId) {
this.updateParams.unitId = null;
}
this.loadUnitData(data)
}
//
if (item && item.key === "postCode") {
this.updateParams.postName = data.map(itm => this.$store.getters.post_map[itm]).join(";");
}
}
public callback(data) {
//
if(data.value==="search"){
if (data.value === "search") {
this.getTableData()
//
}else if(data.value === "reset"){
//
} else if (data.value === "reset") {
this.reset()
//
}else if(data.value === "reverse"){
//
} else if (data.value === "reverse") {
this.toggleAll()
//
}else if(data.value === "selectAll"){
//
} else if (data.value === "selectAll") {
this.selectAll()
}else if(data.value === "delete"){
this.deleteData(this.selectData.map((item:any)=>item.id))
} else if (data.value === "delete") {
this.deleteData(this.selectData)
} else if (data.value === "add") {
this.isReadonly = false;
this.currentId = -1;
this.updateParams = { items: [], } as any;
this.showUpdate = true
} else if (data && data.value.indexOf("save") >= 0) {
this.doSave(data.value !== "save")
} else if (data && data.value === "cancel") {
this.handleClose()
}
}
//
public reset(){
public reset() {
this.params = {
pageNum:1,
pageSize:20,
pageNum: 1,
pageSize: 20,
} as any;
}
public showUpdateModel(id){
this.showUpdate = true
public showUpdateModel(row, isReadonly) {
this.updateParams = { items: [], } as any;
this.currentId = row.id;
this.tableService.selectById(this.currentId).then((res: any) => {
if (isReadonly) {
this.isReadonly = true;
this.updateParams = Object.assign({
safetyFactorName: res.data.safetyFactor.split(";").map(item => this.$store.getters.prevention_safe_reason_map[item]).join(";"),
identifyUserName: this.$store.getters.user_map[res.data.identifyUserId],
}, res.data)
} else {
this.isReadonly = false
this.updateParams = res.data;
this.updateParams.safetyFactor = res.data.safetyFactor.split(";").map(item => parseInt(item))
this.updateParams.postCode = res.data.postCode.split(";").map(item => parseInt(item))
this.loadUnitData(res.data.areas)
}
this.updateParams.items.forEach((item, i) => {
item.index = i + 1
})
this.buildUpdateForm()
this.showUpdate = true;
})
}
public handleClose(){
public doSave(goOn?) {
//
this.updateParams.itemNum = this.updateParams.items.length;
this.updateParams.postCode = this.updateParams.postCode.join(";")
this.updateParams.safetyFactor = this.updateParams.safetyFactor.join(";")
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id ? false : true).then((res) => {
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
this.updateParams = {
items: [],
} as any
this.showUpdate = !!goOn;
this.getTableData();
})
}
public handleClose() {
this.showUpdate = false;
}
@ -167,22 +413,83 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
public toggleAll() {
(this.$refs.multipleTable as any).toggleAllSelection();
}
public selectAll(){
if(!this.selectData.length){
public selectAll() {
if (!this.selectData.length) {
this.toggleAll()
}else{
this.tableData.datas.forEach((item,index)=>{
const find = this.selectData.find((data:any)=>data.userId === item.userId);
if(!find){
} else {
this.tableData.datas.forEach((item, index) => {
const find = this.selectData.find((data: any) => data.userId === item.userId);
if (!find) {
(this.$refs.multipleTable as any).toggleRowSelection(item);
}
})
}
}
public handleSelectionChange(data){
public handleSelectionChange(data) {
this.selectData = data;
}
//
public projectCallback(data) {
if (data && data.value === 'add') {
this.showProject = true
} else if (data && data.value === 'delete') {
//
this.deleteProData(this.selectData.map((itm: any) => itm.index - 1))
}
}
//
public showSubmodal(row, isReadonly) {
this.proIsReadonly = false;
this.showProject = true
if (isReadonly) {
this.proIsReadonly = true
this.updateProParams = JSON.parse(JSON.stringify(row));
} else {
this.updateProParams = JSON.parse(JSON.stringify(row));
}
}
//
public deleteProData(indexs) {
for (let i = this.updateParams.items.length - 1; i >= 0; i--) {
if (indexs.includes(i)) {
this.updateParams.items.splice(i, 1)
}
}
this.updateParams.items.forEach((item, index) => {
item.index = index + 1;
});
}
public subCallback(data) {
if (data && data.value.indexOf("save") >= 0) {
this.doSaveProject(data.value !== "save")
} else if (data && data.value === "cancel") {
this.handleProClose()
}
}
public doSaveProject(goOn) {
//
if (this.updateProParams) {
//
if (!this.updateProParams.index) {
this.updateProParams.index = this.updateParams.items.length + 1;
this.updateParams.items.push(this.updateProParams);
} else {
this.updateParams.items.splice(this.updateParams.items.findIndex(item => item.index === this.updateProParams.index), 1, this.updateProParams)
}
this.updateProParams = {} as any;
this.showProject = !!goOn;
return
}
}
public handleProClose() {
this.showProject = false;
this.updateProParams = {} as any;
}
}
</script>
<style lang="scss" scoped src="../../../common.component.scss"></style>

View File

@ -37,6 +37,42 @@
</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?'新增':'编辑'"
:visible.sync="showUpdate" width="952px" :before-close="handleClose">
<FormComponent :options="updateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right"

View File

@ -11,7 +11,7 @@ import DrawComponent from '@/components/draw.component.vue';
import DeviceService from '@/service/device.service';
@Component({
template,
components:{
components: {
FormComponent,
TableComponent,
DrawComponent,
@ -20,170 +20,153 @@ import DeviceService from '@/service/device.service';
export default class DeviceAnalManagerComponent extends BaseRecordComponent<any> {
public tableService = new DeviceService();
public params = {} as any;
public params = {
areaName: "",
unitName: "",
} as any;
public treeData = [{
label: '一级 1',
children: [{
label: '二级 1-1',
children: [{
label: '三级 1-1-1'
}]
}]
}, {
label: '一级 2',
children: [{
label: '二级 2-1',
children: [{
label: '三级 2-1-1'
}]
}, {
label: '二级 2-2',
children: [{
label: '三级 2-2-1'
}]
}]
}, {
label: '一级 3',
children: [{
label: '二级 3-1',
children: [{
label: '三级 3-1-1'
}]
}, {
label: '二级 3-2',
children: [{
label: '三级 3-2-1'
}]
}]
}]
public treeData = [] as any;
public formActions = [{
name:"查询",
value:"search",
icon:"el-icon-search",
type:"primary"
},{
name:"清空",
icon:"el-icon-tickets",
value:"reset"
name: "查询",
value: "search",
icon: "el-icon-search",
type: "primary"
}, {
name: "清空",
icon: "el-icon-tickets",
value: "reset"
}];
public tableActions = [{
name:"添加",
value:"add",
icon:"el-icon-plus",
type:"primary"
},{
name:"批量删除",
value:"delete",
plain:true,
icon:"el-icon-delete",
type:"danger"
name: "添加",
value: "add",
icon: "el-icon-plus",
type: "primary"
}, {
name: "批量删除",
value: "delete",
plain: true,
icon: "el-icon-delete",
type: "danger"
}];
public footerActions = [{
name:"选择全部",
value:"selectAll",
type:"primary"
},{
name:"反向选择",
value:"reverse"
name: "选择全部",
value: "selectAll",
type: "primary"
}, {
name: "反向选择",
value: "reverse"
}];
public formOptions:FormOption<BtnOption>[] = [{
name:"区域名称",
key:"areaId",
type:"text",
},{
name:"单元名称",
key:"unitId",
type:"text",
},{
name:"作业活动",
key:"unitId",
type:"select",
datas:[{
name:"单元1",
value:0
},{
name:"单元2",
value:1
public formOptions: FormOption<BtnOption>[] = [{
name: "区域名称",
key: "areaId",
type: "text",
}, {
name: "单元名称",
key: "unitId",
type: "text",
}, {
name: "作业活动",
key: "unitId",
type: "select",
datas: [{
name: "单元1",
value: 0
}, {
name: "单元2",
value: 1
}]
}];
public showUpdate = false;
public updateParams = {} as any;
public updateParams = {} as any;
public selectData = [];
created(){
created() {
}
//
public handleNodeClick(data){
console.log(data)
public handleNodeClick(data) {
console.log('data', data)
this.params.unitName = "";
this.params.areaName = "";
if (data.areaId) {
this.params.unitName = data.name
} else {
this.params.areaName = data.name
}
this.getTableData()
}
public buildTable(){
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:"person"});
this.tableColumn.push({name:'设备类别',key:"person"});
this.tableColumn.push({name:'检查项目',key:"status",render:(data)=>{
if(data.status==0){
return "<span class='noDraw'>未绘制</span>"
}else{
return "<span>已绘制</span>"
public buildTable() {
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: "person" });
this.tableColumn.push({ name: '设备类别', key: "person" });
this.tableColumn.push({
name: '检查项目', key: "status", render: (data) => {
if (data.status == 0) {
return "<span class='noDraw'>未绘制</span>"
} else {
return "<span>已绘制</span>"
}
}
}});
this.tableColumn.push({name:'责任人',key:"person"});
this.tableColumn.push({name:'责任部门',key:"person"});
this.tableColumn.push({name:'风险等级',key:"status",render:(data)=>{
if(data.status==0){
return "<span class='noDraw'>未绘制</span>"
}else{
return "<span>已绘制</span>"
});
this.tableColumn.push({ name: '责任人', key: "person" });
this.tableColumn.push({ name: '责任部门', key: "person" });
this.tableColumn.push({
name: '风险等级', key: "status", render: (data) => {
if (data.status == 0) {
return "<span class='noDraw'>未绘制</span>"
} else {
return "<span>已绘制</span>"
}
}
}});
this.tableColumn.push({name:'残余风险等级',key:"status",render:(data)=>{
if(data.status==0){
return "<span class='noDraw'>未绘制</span>"
}else{
return "<span>已绘制</span>"
});
this.tableColumn.push({
name: '残余风险等级', key: "status", render: (data) => {
if (data.status == 0) {
return "<span class='noDraw'>未绘制</span>"
} else {
return "<span>已绘制</span>"
}
}
}});
});
}
public callback(data){
public callback(data) {
//
if(data.value==="search"){
if (data.value === "search") {
this.getTableData()
//
}else if(data.value === "reset"){
//
} else if (data.value === "reset") {
this.reset()
//
}else if(data.value === "reverse"){
//
} else if (data.value === "reverse") {
this.toggleAll()
//
}else if(data.value === "selectAll"){
//
} else if (data.value === "selectAll") {
this.selectAll()
}else if(data.value === "delete"){
this.deleteData(this.selectData.map((item:any)=>item.id))
} else if (data.value === "delete") {
this.deleteData(this.selectData.map((item: any) => item.id))
}
}
//
public reset(){
public reset() {
this.params = {
pageNum:1,
pageSize:20,
pageNum: 1,
pageSize: 20,
} as any;
}
public showUpdateModel(id){
public showUpdateModel(id) {
this.showUpdate = true
}
public handleClose(){
public handleClose() {
this.showUpdate = false;
}
@ -191,20 +174,20 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
public toggleAll() {
(this.$refs.multipleTable as any).toggleAllSelection();
}
public selectAll(){
if(!this.selectData.length){
public selectAll() {
if (!this.selectData.length) {
this.toggleAll()
}else{
this.tableData.datas.forEach((item,index)=>{
const find = this.selectData.find((data:any)=>data.userId === item.userId);
if(!find){
} else {
this.tableData.datas.forEach((item, index) => {
const find = this.selectData.find((data: any) => data.userId === item.userId);
if (!find) {
(this.$refs.multipleTable as any).toggleRowSelection(item);
}
})
}
}
public handleSelectionChange(data){
public handleSelectionChange(data) {
this.selectData = data;
}
}

View File

@ -5,7 +5,7 @@
<div class="common-content-box dis-flex flex-col flex-1">
<div class="search-box">
<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 class="table-box flex-1">
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
@ -25,9 +25,9 @@
</template>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="showUpdateModel(scope.row.userId)">查看</el-button>
<el-button type="text" @click="showUpdateModel(scope.row.userId)">修改</el-button>
<el-button type="text" @click="deleteData([scope.row])">删除</el-button>
<el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
<el-button type="text" @click="showUpdateModel(scope.row,false,true)">修改</el-button>
<el-button type="text" @click="deleteData([scope.row.id])">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -36,16 +36,16 @@
</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">
<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>
<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)"
:actions="subTableActions" actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
<el-table ref="multipleTable" :data="tableData.datas" tooltip-effect="dark" height="250" border
<el-table ref="multipleTable" :data="updateParams.steps" 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>
@ -60,22 +60,152 @@
</template>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button type="text" @click="">查看</el-button>
<el-button type="text" @click="">修改</el-button>
<el-button type="text" @click="">评价</el-button>
<el-button v-if="isReadonly" type="text"
@click="showSubModel(scope.row,isReadonly)">查看</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>
</el-table-column>
</el-table>
</TableComponent>
</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 :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">
<FormComponent :options="updateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right"
:data.sync="updateParams"></FormComponent>
</el-dialog> -->
<!--管控措施-->
<el-dialog :close-on-click-modal="false" :title="'管控措施制定'" :visible.sync="showTriUpdate" width="750px"
:before-close="handleMeasureClose">
<FormComponent :options="triUpdateOptions" labelWidth="110px" labelAlign="right"
: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>

File diff suppressed because it is too large Load Diff