From 5e19b759566b2bf0aed0771206cea54aaba0874e Mon Sep 17 00:00:00 2001
From: 叶松 <2217086471@qq.com>
Date: 星期二, 28 十一月 2023 11:28:37 +0800
Subject: [PATCH] bug修改

---
 web/src/views/SecureManage/NipCheck/NipTips.vue |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/web/src/views/SecureManage/NipCheck/NipTips.vue b/web/src/views/SecureManage/NipCheck/NipTips.vue
index 34aead1..07d4fc9 100644
--- a/web/src/views/SecureManage/NipCheck/NipTips.vue
+++ b/web/src/views/SecureManage/NipCheck/NipTips.vue
@@ -38,7 +38,7 @@
         <el-table-column label="操作" align="center" width="250">
           <template #default="{ row }">
             <el-button class="table_btn" size="mini" v-if="showButton('update')" @click="updateProp(row)">修改</el-button>
-            <el-button class="delete_btn" size="mini" v-if="showButton('delete')" @click="deleteInfo(row)">删除</el-button>
+            <!-- <el-button class="delete_btn" size="mini" v-if="showButton('delete')" @click="deleteInfo(row)">删除</el-button> -->
             <el-button class="table_btn" size="mini" v-if="showButton('update')&&row.auditStatus!==1" @click="checkHidden(row)">审核</el-button>
           </template>
         </el-table-column>
@@ -74,7 +74,14 @@
             </el-date-picker>
         </el-form-item>
         <el-form-item label="隐患地点:" prop="dangerLocation">
-          <el-input v-model="ruleForm.dangerLocation" :size="size" clearable placeholder="请输入隐患地点"  :disabled="disabled"></el-input>
+          <el-select v-model="ruleForm.dangerLocation" placeholder="请选择隐患地点" clearable  :disabled="disabled">
+                <el-option
+                    v-for="item in positonOptions"
+                    :key="item.dictId"
+                    :label="item.dictName"
+                    :value="item.dictId">
+                </el-option>
+            </el-select>
         </el-form-item>
         <el-form-item label="隐患标题" prop="title">
           <el-input v-model="ruleForm.title" :size="size" type="textarea" :rows="5" clearable placeholder="请输入隐患标题"  :disabled="disabled"></el-input>
@@ -128,7 +135,9 @@
         total: 0,
         disabled:false,
         loading: false,
+        userId:null,//创建人
         dataList: [], //举报隐患信息列表
+        positonOptions:[],//隐患地点
         imageList:[],
         asyncTitle: true, // 对话框title 新增:true  修改:false
         asyncVisible: false, // 添加 修改对话框
@@ -152,7 +161,7 @@
           dangerLocation: [{
             required: true,
             message: '请输入隐患地点',
-            trigger: 'blur'
+            trigger: 'change'
           }],
           title: [{
             required: true,
@@ -183,6 +192,7 @@
         optionsType:[],//设备类型
         optionsDevice:[],//设备名称
         optionsUser:[],//负责人
+        dictId:null,
       }
     },
     watch: {
@@ -200,8 +210,23 @@
         that.size = changeSize();
       }
       that.searchButtonInfo(true);
+      that.searchPositionInfos()
     },
     methods: {
+      //获取隐患地点
+      searchPositionInfos(){
+        let params = {
+            pageNum: 1,
+            pageSize: 100000000
+        }
+        this.$api.Dictionary.searchDictionary(params).then(res=>{
+            if(res.statusMsg === 'ok'){
+                this.positonOptions = res.data.list.filter(item =>item.dictType === 'danger_region')
+            }else{
+                this.$message.warning(res.statusMsg)
+            }
+        })
+      },
       // 查询按钮列表信息
       searchButtonInfo(bol) {
         if(bol) {
@@ -231,6 +256,7 @@
     },
       // 审核按钮
       checkHidden(row) {
+        this.userId = row.createUser
         this.asyncTitle = true;
         this.imageList = []
         this.asyncVisible = true;
@@ -284,6 +310,7 @@
         this.$api.Safety.detailsHiddenInfo({id: row.id}).then(res=>{
             if(res.statusMsg === 'ok'){
                 this.ruleForm = res.data
+                this.dictId = res.data.dictId
                 res.data.imgEntities.map(item=>{
                     this.imageList.push({
                         id: this.imageList.length + 1,
@@ -329,6 +356,7 @@
                 arrTitle.push({imgPath:item.name})
             })
             params.imgEntities = arrTitle
+            params.createUser = this.userId
             this.$api.Safety.checkHiddenInfo(params).then((res) => {
               if(res.statusMsg === 'ok') {
                 this.asyncVisible = false;
@@ -351,6 +379,7 @@
                 arrTitle.push({imgPath:item.name})
             })
             params.imgEntities = arrTitle
+            params.dictId = this.dictId
             this.$api.Safety.updateHiddenInfo(params).then((res) => {
               if(res.statusMsg === 'ok') {
                 this.asyncVisible = false;

--
Gitblit v1.9.3