cqf
2022-05-12 67df85b16e6a6fde0a026672a8a2924429b610cb
src/views/hiddenDangerManagement/fillRectificationAdd.vue
@@ -106,7 +106,7 @@
                    <el-row style="margin-bottom: 20px">
                        <el-col :span="9">
                            <el-button type="primary" class="btns" @click="addDanger">新增隐患</el-button>
                            <el-button type="primary" class="btns" v-show="!update" @click="addDanger">新增隐患</el-button>
                        </el-col>
                    </el-row>
@@ -134,6 +134,7 @@
                                        >编辑
                                        </el-button>
                                        <el-button
                                            v-if="!update"
                                            size="mini"
                                            @click="deleteDanger(scope.row, scope.$index)"
                                        >删除
@@ -149,7 +150,8 @@
                        <el-col :span="22">
                            <el-form-item style="text-align: center">
                                <el-button type="primary" class="btns" @click="submitForm('ruleForm')"
                                >保存</el-button
                                >保存
                                </el-button
                                >
                                <el-button @click="close()">关闭</el-button>
                            </el-form-item>
@@ -180,7 +182,8 @@
                    </el-col>
                    <el-col :span="9" :offset="4">
                        <el-form-item label="地点" prop="address">
                            <el-input v-model="dangerForm.address" rows="3" type="textarea" class="multiline"></el-input>
                            <el-input v-model="dangerForm.address" rows="3" type="textarea"
                                      class="multiline"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
@@ -188,12 +191,14 @@
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="隐患内容" prop="ht_content">
                            <el-input v-model="dangerForm.ht_content" rows="3" type="textarea" class="multiline"></el-input>
                            <el-input v-model="dangerForm.ht_content" rows="3" type="textarea"
                                      class="multiline"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9" :offset="4">
                        <el-form-item label="整改措施" prop="measure">
                            <el-input v-model="dangerForm.measure" rows="3" type="textarea" class="multiline"></el-input>
                            <el-input v-model="dangerForm.measure" rows="3" type="textarea"
                                      class="multiline"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
@@ -212,7 +217,8 @@
                    </el-col>
                    <el-col :span="9" :offset="4">
                        <el-form-item label="关联危险源" prop="DTRisk_bankId">
                            <el-select v-model="dangerForm.DTRisk_bankId" placeholder="请选择" @change="changeWxy" filterable>
                            <el-select v-model="dangerForm.DTRisk_bankId" placeholder="请选择" @change="changeWxy"
                                       filterable>
                                <el-option
                                    v-for="item in dangerList"
                                    :key="item.id"
@@ -306,7 +312,8 @@
                    <el-col :span="22">
                        <el-form-item style="text-align: center">
                            <el-button type="primary" class="btns" @click="submitDanger('form')"
                            >保存</el-button
                            >保存
                            </el-button
                            >
                            <el-button @click="dialogVisible=false">关闭</el-button>
                        </el-form-item>
@@ -321,8 +328,21 @@
<script>
    import Titlename from "../../components/Titlename/index.vue";
    import {initJCBM ,initYHLX, initBC ,initJCLB ,initYHBM ,initYHJB,initLlr,initReformStatus,initYwks,initWxy} from "@/api/sgyhpczl/initSelect";
import {
    initJCBM,
    initYHLX,
    initBC,
    initJCLB,
    initYHBM,
    initYHJB,
    initLlr,
    initReformStatus,
    initYwks,
    initWxy
} from "@/api/sgyhpczl/initSelect";
    import {initDangerRebound} from '@/api/sgyhpczl/hiddenDangerRegistration'
import {getDangerDetails} from "@/api/sgyhpczl/recheckCancellationNumber";
    import {saveSelfDanger} from '@/api/sgyhpczl/hiddenDangerManagement'
    import {deepClone} from '@/utils'
@@ -358,6 +378,7 @@
                llrList:[],
                statusList:[],
                YWKSList:[],
            update: false,
                reboundList:[],
                ruleForm: {},
                rules: {
@@ -372,6 +393,20 @@
            };
        },
        mounted(){
        if (this.$route.query != null) {
            console.log(11111)
            getDangerDetails(this.$route.query.id).then(res => {
                console.log(res)
                if (res.data.ok) {
                    this.tableData.push(res.data.data);
                    this.ruleForm.check_date = res.data.data.check_date
                    this.ruleForm.check_class = res.data.data.check_class
                    this.ruleForm.check_man = res.data.data.check_man
                    this.update = true;
                }
            })
        }
            this.initBC()
            //this.initJCLB()
            this.initYHJB()
@@ -553,8 +588,8 @@
            },
            submitForm(formName) {
            if (!this.update) {
                this.$refs[formName].validate((valid) => {
                    if (valid) {
                        if(this.tableData==null || this.tableData.length==0){
@@ -577,6 +612,9 @@
                        return false;
                    }
                });
            } else {
                console.log(this.tableData)
            }
            },
            close(){
                this.$router.push({