Commit 92b47d99 authored by 罗新东's avatar 罗新东
Browse files

修改了‘隐患详情’隐患认定字段内容显示错误,缺少“隐患认定信息”,且只显示了最后一次认定的结果

parent 6b4a1524
Loading
Loading
Loading
Loading
+84 −66
Original line number Diff line number Diff line
@@ -122,54 +122,55 @@
          {{ reportOpenText }}
        </div>
      </div>

      <div class="confirm-wrap" v-if="hdConfirm">
      <!-- {{hdConfirm}} -->
      <div class="journal-wrap" v-if="hdConfirm.length > 0">
        <p>隐患认定</p>
        <van-cell-group inset>
          <van-steps direction="vertical" :active="99999">
            <van-step v-for="(item, index) in hdConfirm" :key="index">
              <div class="step-wrap">
                <van-row>
                  <van-col span="24"
                    ><div class="info-title">隐患认定</div></van-col
                  >
                </van-row>
                <van-row gutter="">
                  <van-col span="7"
                    ><span class="field-title">隐患整改人:</span></van-col
                  >
            <van-col span="17">{{ hdConfirm.rectificationUser }}</van-col>
                  <van-col span="17">{{ item.rectificationUser }}</van-col>
                </van-row>
                <van-row gutter="">
                  <van-col span="7"
                    ><span class="field-title">隐患复查人:</span></van-col
                  >
            <van-col span="17">{{ hdConfirm.rectificationReview }}</van-col>
                  <van-col span="17">{{ item.rectificationReview }}</van-col>
                </van-row>
                <van-row gutter="">
            <van-col span="7"
                  <van-col span="8"
                    ><span class="field-title">整改截止时间:</span></van-col
                  >
            <van-col span="17">{{ hdConfirm.endTime }}</van-col>
          </van-row>
          <van-row gutter="">
            <van-col span="7"><span class="field-title">意见:</span></van-col>
            <van-col span="17">{{ hdConfirm.confirmOpinion }}</van-col>
                  <van-col span="16">{{ item.endTime }}</van-col>
                </van-row>

          <!-- <div v-show="confirmOpen">hdMajorApproveList
                <van-row gutter="">
                  <van-col span="7"
                ><span class="field-title">隐患确认信息:</span></van-col
                    ><span class="field-title">意见:</span></van-col
                  >
              <van-col span="17">{{ hdConfirm.confirmOpinion }}</van-col>
                  <van-col span="17">{{ item.confirmOpinion }}</van-col>
                </van-row>
          </div> -->
              </div>
            </van-step>
          </van-steps>
        </van-cell-group>
        <!-- <div class="more" @click="confirmReverse">
        <div class="more" @click="confirmReverse">
          {{ confirmOpenText }}
        </div> -->
        </div>
      </div>

      <div class="journal-wrap" v-if="hdMajorApproveList.length > 0">
        <p>审批信息</p>
        <van-cell-group inset>
          <van-steps
            direction="vertical"
            :active="99999"
          >
          <van-steps direction="vertical" :active="99999">
            <van-step v-for="(item, index) in hdMajorApproveList" :key="index">
              <div class="step-wrap">
                <van-row>
@@ -187,7 +188,9 @@
                  <van-col span="5"
                    ><span class="field-title">结果:</span></van-col
                  >
                  <van-col span="19">{{ item.isResult == 1 ? "通过" : "退回"}}</van-col>
                  <van-col span="19">{{
                    item.isResult == 1 ? "通过" : "退回"
                  }}</van-col>
                </van-row>
                <van-row>
                  <van-col span="5"
@@ -205,22 +208,32 @@
                  <van-col span="9"
                    ><span class="field-title">认定隐患级别:</span></van-col
                  >
                  <van-col span="10
                  ">{{ item.thinkHdLev }}</van-col>
                  <van-col
                    span="10
                  "
                    >{{ item.thinkHdLev }}</van-col
                  >
                </van-row>
                <van-row v-if="item.details">
                  <van-col span="8"
                    ><span class="field-title">审批意见:</span></van-col
                  >
                  <van-col span="16
                  ">{{ item.details }}</van-col>
                  <van-col
                    span="16
                  "
                    >{{ item.details }}</van-col
                  >
                </van-row>
              </div>
            </van-step>
          </van-steps>
        </van-cell-group>
        <!-- 展开 -->
        <div class="more" @click="majorReverse" v-show="hdMajorApproveList.length > 0">
        <div
          class="more"
          @click="majorReverse"
          v-show="hdMajorApproveList.length > 0"
        >
          {{ majorOpenText }}
        </div>
      </div>
@@ -327,7 +340,9 @@
              <div class="step-wrap">
                <van-row>
                  <van-col span="24"
                    ><div class="info-title">{{item.createTime}}</div></van-col
                    ><div class="info-title">
                      {{ item.createTime }}
                    </div></van-col
                  >
                </van-row>
                <van-row>
@@ -354,11 +369,10 @@
                  >
                  <van-col span="19">{{ item.deptName }}</van-col>
                </van-row>
               
              </div>
            </van-step>
          </van-steps>
          <div style="text-align: center;" v-if="hdLogList.length == 0">
          <div style="text-align: center" v-if="hdLogList.length == 0">
            暂无数据
          </div>
        </van-cell-group>
@@ -411,7 +425,7 @@
            </van-step>
          </van-steps>

          <div style="text-align: center;" v-if="instructionsList.length == 0">
          <div style="text-align: center" v-if="instructionsList.length == 0">
            暂无数据
          </div>
        </van-cell-group>
@@ -433,7 +447,7 @@ import LHeader from "@/components/header.vue";
import { standBookDetail } from "@/service/danger";
export default {
  components: {
    LHeader
    LHeader,
  },
  data() {
    return {
@@ -451,7 +465,7 @@ export default {
      majorOpenText: "展开 ▼",

      hdReport: "",
      hdConfirm: "",
      hdConfirm: [],
      hdMajorApproveList: [], // 重大隐患审批
      beifenhdMajorList: [],
      hdRectificationList: [],
@@ -459,18 +473,17 @@ export default {
      hdLogList: [],
      beifenhdLogList: [],
      instructionsList: [],
      beifeninstructionsList: []
      beifeninstructionsList: [],
    };
  },
  created() {
    if (this.$route.params.detailTitle) {
      this.text=this.$route.params.detailTitle
      this.text = this.$route.params.detailTitle;
    }
    this.id = this.$route.params.id;
    if (this.id) {
      this.postDetail();
    }
    
  },
  methods: {
    // 请求台账信息
@@ -479,13 +492,14 @@ export default {
        message: "加载中...",
        forbidClick: true,
        loadingType: "spinner",
        duration: 0
        duration: 0,
      });
      standBookDetail(`/hdreport/hdDetailsApp/${this.id}`)
        .then(res => {
        .then((res) => {
          this.$toast.clear();
          this.hdReport = res.data.hdReport;
          this.hdConfirm = res.data.hdConfirm;
          this.hdLogListAll= res.data.hdConfirm
          this.hdConfirm = this.hdLogListAll.slice(-1);
          this.hdRectificationList = res.data.hdRectificationList;
          this.hdReviewList = res.data.hdReviewList;
          this.beifenhdMajorList = res.data.hdMajorApproveList;
@@ -514,12 +528,16 @@ export default {
    confirmReverse() {
      this.confirmOpen = !this.confirmOpen;
       if (this.confirmOpen) {
        //   显示所有数据
        this.confirmOpenText = "收起 ▲";
        // 显示所有数据
        this.hdConfirm = this.hdLogListAll;
      } else {
        this.confirmOpenText = "展开 ▼";
        // 只显示第一个数据
        this.hdConfirm = this.hdLogListAll.slice(-1);
      }
    },

    // 重大隐患信息显示或隐藏
    majorReverse() {
      this.majorOpen = !this.majorOpen;
@@ -561,8 +579,8 @@ export default {
        this.superviseOpenText = "展开 ▼";
        this.instructionsList = this.beifeninstructionsList.slice(-1);
      }
    }
  }
    },
  },
};
</script>
<style lang="less" scoped>