check3.vue 7.3 KB
<template>
  <div class="content">
    <div style="width: 100%;text-align: center;font-weight: 600;">每日压力容器安全检查记录</div>
    <table>
      <tr>
        <th>序号:</th>
        <th style="width: 19%;">检查因素:</th>
        <th style="width: 19%;">检查项目:</th>
        <th>检查内容:</th>
        <th>检查结果</th>
      </tr>
      <tr v-for="(item, index) in people" :key="index">
        <td class="font">{{ index + 1 }}</td>
        <td class="font">{{ item.checkFactors }}</td>
        <td class="font">{{ item.inspectionItems }}</td>
        <td class="font">{{ item.inspectionContent }}</td>

        <td :class="'text-center'">
          <select v-model="item.ischeck">
            <option value="1">✓</option>
            <option value="0" selected>✕</option>
          </select>
        </td>
      </tr>
      <tr>
        <td colspan="5">
          检查情况记录:
          <button @click="ww">清空</button>
          <br/>
          <textarea style="width: 98%;" name="" id="" cols="30" rows="10" v-model="record"> </textarea>
        </td>
      </tr>
      <tr>
        <td colspan="3">设备编号:
          <a-select
            show-search
            placeholder="请选择设备编号"
            option-filter-prop="children"
            :filter-option="filterOption"
            v-model="cloum20" style="width: 150px"
          >
            <a-select-option v-for="item in dictModel" :key="item.title" :value="item.value">{{
                item.text
              }}
            </a-select-option>
          </a-select>
        </td>
        <td colspan="3">特种设备安全员:
          <a-input v-model="recorder" style="width: 40%"></a-input>
        </td>
      </tr>
      <tr>
        <td colspan="3">检查日期:
          <j-date v-model="recordDate"></j-date>
        </td>
      </tr>
      <tr style="height: 5px;">
        <td colspan="5" style="text-align: center;">
          <button style="width: 20rem;height: 3rem;" @click="submit">提交</button>
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
import {addCheck, getDeviceDict} from '@/api/api'

export default {
  data() {
    return {
      recordDate: '',
      recorder: '',
      record: '',
      cloum20: '',
      dictModel: [],
      people: [
        {
          checkFactors: '设备因素',
          inspectionItems: '严重振动',
          inspectionContent: `压力容器与管道发生严重振动出现泄漏,危及安全运行的`,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '变形及裂缝',
          inspectionContent: `压力容器在运行时出现超温、超压,致使主要受压元件出现下列 危及安全的现象:
                                        1)主要受压元件母材异常变形、发生裂缝;
                                        2)焊接接头发生裂缝失效等
                                        `,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '材质劣化',
          inspectionContent: `压力容器运行时由于超温,致使主要受压元件材质劣化等危及安全的情况`,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '异常情况',
          inspectionContent: `压力容器在运行时出现工作压力、工作温度、液位超过规定值, 采取措施后仍不能得到有效控制的现象`,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '测温仪表',
          inspectionContent: `1)测温仪表的定期校验和检修符合规定;
                                        2)测温仪表的量程与其检测的温度范围匹配;
                                        3)测温仪表及其二次仪表的外观符合规定
                                        `,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '爆破片',
          inspectionContent: `1)爆破片选型正确,符合运行要求;
                                        2)爆破片装置的安装方向正确,运行中无渗漏;
                                        3)爆破片未超过规定使用期限,使用过程中不存在未超压爆破 或者超压未爆破的情况;
                                        4)爆破片和压力容器之间装设的截止阀处于全开状态,铅封完
                                        好 ;
                                        5)爆破片和安全阀串联使用,如果爆破片装在安全阀的进口
                                        侧,爆破片和安全阀之间装设的压力表有压力显示,打开截止阀
                                        无气体排出;
                                        6)与爆破片夹持器相连的放空管通畅,放空管内无存水(或者 冰),防水帽、防雨片完好
                                        `,
          ischeck: 1,
        },
      ],
    }
  },
  created() {
    this.loadFrom()
  },
  methods: {
    ww() {
      this.record = ''
    },
    loadFrom() {
      let params = {
        "type": 3
      }
      getDeviceDict(params).then((res) => {
        this.dictModel = res.result
      })
    },
    submit() {
      let params = {
        'cloum1': this.people.length > 0 ? this.people[0].ischeck : null,
        'cloum2': this.people.length > 0 ? this.people[1].ischeck : null,
        'cloum3': this.people.length > 0 ? this.people[2].ischeck : null,
        'cloum4': this.people.length > 0 ? this.people[3].ischeck : null,
        'cloum5': this.people.length > 0 ? this.people[4].ischeck : null,
        'cloum6': this.people.length > 0 ? this.people[5].ischeck : null,
        'type': 3,
        'record': this.record,
        'recordDate': this.recordDate,
        'recorder': this.recorder,
        'cloum20': this.cloum20,
      }
      addCheck(params).then((res) => {
        if (res.success) {
          this.$message.success("提交成功!")
        }
      })
    },
  },
  mounted() {
  },

}
</script>

<style scoped>
.app-body {
  width: 100%;
  height: 100%;
}

.content {
  width: 99.1%;
  height: 100%;
  border: 1px solid yellowgreen;
  margin: 0 auto;
  overflow: auto;
}

body {
  font-size: 1rem;
}

table,
td,
th {
  border-collapse: collapse;
  border-spacing: 0;
}

table {
  width: 100%;
  margin-top: 10px;
}

td,
th {
  border: 2px solid #000000;
  padding: 5px 10px;
}

th {
  background: #42b983;
  /* font-size: 3vw; */
  font-weight: 400;
  color: #fff;
  cursor: pointer;
}

@media screen and (max-width: 400px) {
  .font {
    font-size: 2.8vw;
  }

  td,
  th {
    border: 2px solid #000000;
    padding: 5px 10px;
  }

  th {
    background: #42b983;
    font-size: 3vw;
    font-weight: 400;
    color: #fff;
    cursor: pointer;
  }
}

tr:nth-of-type(odd) {
  background: #fff;
}

tr:nth-of-type(even) {
  background: #eee;
}

button {
  outline: none;
  padding: 5px 8px;
  color: #fff;
  border: 1px solid #bcbcbc;
  border-radius: 3px;
  background-color: #009a61;
  cursor: pointer;
}

button:hover {
  opacity: 0.8;
}

.text-center {
  text-align: center;
}
</style>

<style lang="less">
.app_container {
  width: 100%;
  height: 100%;
  background: #ffff !important;
}
</style>