check2.vue 8.27 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: `1)	吊钩、电磁吸盘、吊带、吊链、横梁等吊具悬挂牢固、可靠,无破损等缺陷。
                                        2)	吊钩设置防脱装置,并且有限。
                                        3)	吊钩、电磁吸盘、吊链不应补焊`,

          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '钢丝绳的固定',
          inspectionContent: `1)	钢丝绳绳端固定牢靠,用压板固定时,压板不少于2个(电动葫芦不少于3个)保留2圈钢丝绳作为安全圈,(塔式起重机、门座式起重机、流动式起重机、简易升降机不少于6圈)。
2)	卷筒上的绳端固定装置有防松或者自紧的性能;用金属压制接头固定时,接头无裂纹,楔套无裂纹,楔块无松动;用绳夹固定时,绳夹安装正确,绳夹数满足要求。
`,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '导绳器',
          inspectionContent: `配备导绳装置的卷筒在整个工作范围内有效排绳,无卡阻现象。`,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '运行行程限位器',
          inspectionContent: `起重机或起重小车在每个运动方向装设运行行程限位器,在达到设计规定的极限位置时自动切断前进方向的动力源。`,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '起重量限制器',
          inspectionContent: `设置起重量限制器,未被短接。`,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '导轨清扫器',
          inspectionContent: `当物料有可能积存在轨道上成为运行障碍时,对轨道上行驶的起重机或起重小车,在台车架(或者端梁)下面和小车架下面装设轨道清扫器,扫轨板底面与轨道顶面之间的间隙不大于10mm(塔式起重机不大于5mm)。`,
          ischeck: 1,
        },
        {
          checkFactors: '设备因素',
          inspectionItems: '防护罩、防护栏、隔热装置',
          inspectionContent: '检查起重机械上外露的有可能伤人的运动零部件防护罩、防护栏,检查隔热装置。',
          ischeck: 1,
        },
        {
          checkFactors: '环境因素',
          inspectionItems: '照明',
          inspectionContent: '照片完好,满足操作要求。',
          ischeck: 1,
        },
        {
          checkFactors: '环境因素',
          inspectionItems: '起重机运行轨道',
          inspectionContent: '起重机运行轨道无明显松动或影响其安全运行的明显缺陷。',
          ischeck: 1,
        },
        {
          checkFactors: '环境因素',
          inspectionItems: '安全通道',
          inspectionContent: '周围的安全通道畅通',
          ischeck: 1,
        },
        {
          checkFactors: '管理因素',
          inspectionItems: '操作与管理',
          inspectionContent: '起重机械操作人员应执行有关安全管理制度,按照特种设备安全技术操作规程进行操作',
          ischeck: 1,
        },
      ],
    }
  },
  created() {
    this.loadFrom()
  },
  methods: {
    loadFrom() {
      let params = {
        "type": 2
      }
      getDeviceDict(params).then((res) => {
        this.dictModel = res.result
      })
    },
    ww() {
      this.record = ''
    },
    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,
        'cloum7': this.people.length > 0 ? this.people[6].ischeck : null,
        'cloum8': this.people.length > 0 ? this.people[7].ischeck : null,
        'cloum9': this.people.length > 0 ? this.people[8].ischeck : null,
        'cloum10': this.people.length > 0 ? this.people[9].ischeck : null,
        'cloum11': this.people.length > 0 ? this.people[10].ischeck : null,
        'type': 2,
        '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>