From dfc35ece9ae09ad910538f0b181275e0e6c8a00c Mon Sep 17 00:00:00 2001
From: lct123456 <lucht>
Date: Thu, 21 Apr 2022 21:59:41 +0800
Subject: [PATCH] 巡检记录和巡检数据
---
src/views/doublePreventAction/riskLevelManage/controlAction/index.vue | 43 +++++++++++++++++++++++++++++++++++++------
1 files changed, 37 insertions(+), 6 deletions(-)
diff --git a/src/views/doublePreventAction/riskLevelManage/controlAction/index.vue b/src/views/doublePreventAction/riskLevelManage/controlAction/index.vue
index 2987144..cecbb5b 100644
--- a/src/views/doublePreventAction/riskLevelManage/controlAction/index.vue
+++ b/src/views/doublePreventAction/riskLevelManage/controlAction/index.vue
@@ -7,18 +7,20 @@
</el-input>
</div>
<el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button>
- <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showRiskControlMeasureForm('','新增')">新增</el-button>
+ <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showRiskControlMeasureForm('','新增')" v-show="showCurrent">新增</el-button>
</div>
<div class="table_content">
<el-table
v-loading="listLoading"
:key="tableKey"
+ @selection-change="handleSelectionChange"
:data="riskControlMeasureData"
border
fit
highlight-current-row
style="width: 100%;"
>
+ <!-- <el-table-column type="selection" width="55"></el-table-column> -->
<el-table-column label="安全风险事件名称" prop="riskEventId" align="center">
</el-table-column>
<el-table-column label="管控方式" prop="dataSrc" align="center">
@@ -45,8 +47,9 @@
</el-table-column>
<el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
<template slot-scope="scope">
- <el-button type="text" @click="showRiskControlMeasureForm(scope.row,'编辑')">编辑</el-button>
- <el-button type="text" style="color: red" @click="deleteById(scope.row)">删除</el-button>
+ <el-button type="text" @click="giveValue(scope.row,)" v-show="showOther">选择</el-button>
+ <el-button type="text" @click="showRiskControlMeasureForm(scope.row,'编辑')" v-show="showCurrent">编辑</el-button>
+ <el-button type="text" style="color: red" @click="deleteById(scope.row)" v-show="showCurrent">删除</el-button>
</template>
</el-table-column>
</el-table>
@@ -65,7 +68,7 @@
/>
<br>
</div>
- <el-dialog :title="title" :visible.sync="riskControlMeasureVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="600px">
+ <el-dialog :title="title" :visible.sync="riskControlMeasureVisible" append-to-body :close-on-click-modal="false" width="600px">
<el-form ref="riskControlMeasureForm" :rules="riskControlMeasureFormRules" :model="riskControlMeasureForm" label-position="right" label-width="160px">
<el-form-item label="安全风险事件名称" prop="riskEventId">
<el-select v-model="riskControlMeasureForm.riskEventId" class="analyseUnit_input">
@@ -118,8 +121,8 @@
</el-form-item>
</el-form>
<div align="right">
- <el-button @click="unitFormVisible = false">取消</el-button>
- <el-button type="primary" @click="submitAnalyseUnit()">确认</el-button>
+ <el-button @click="riskControlMeasureVisible = false">取消</el-button>
+ <el-button type="primary" @click="submitAnalyseUnit()" v-show="ifShowSelf">确认</el-button>
</div>
</el-dialog>
</div>
@@ -155,7 +158,11 @@
DataSrcList:[],
classifyOneList:[],
classifyTwoList:[],
+ riskCcntrolMeasureIdList:[],
listLoading: false,
+ showCurrent:true,
+ showOther:false,
+ ifShowSelf:true,
pageSize: 10,
recordTotal: 0,
currentPage: 1,
@@ -383,6 +390,30 @@
this.listQuery.pageIndex = val
this.getRiskControlMeasureData()
},
+
+ ifShowButton (){
+ this.showCurrent = false
+ this.showOther = true
+ },
+
+ handleSelectionChange(val){
+ this.riskControlMeasureIdList = val
+ },
+
+ giveValue(value){
+ // this.$emit('giveRiskControlId',this.riskControlMeasureIdList)
+ this.$emit('giveRiskControlId',value)
+ },
+ showMeasureDetail(value){
+ this.riskControlMeasureVisible = true
+ this.getRiskControlMeasureData().then( ()=>{
+ let riskControlMeasureForm = this.riskControlMeasureData.find(item => item.id === value.measureId)
+ this.riskControlMeasureForm = riskControlMeasureForm
+ this.$emit('closeDialog')
+ })
+
+
+ }
}
}
</script>
--
Gitblit v1.9.2