<template>
  <div style="height: 468px;overflow-y: auto;">
    <div>
      <OccDiseasePoison :height="200" />
    </div>
    <table width="100%">
      <tr>
        <td width="50%">职业性异常：</td>
        <td width="50%">建议：</td>
      </tr>
      <tr>
        <td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbnormal"
            size="small" :autosize="{ minRows: 4, maxRows: 4 }"></el-input></td>
        <td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbSuggestion"
            size="small" :autosize="{ minRows: 4, maxRows: 4 }"></el-input></td>
      </tr>
      <tr>
        <td width="50%">非职业性异常：</td>
        <td width="50%">建议：</td>
      </tr>
      <tr>
        <td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.noOccupationalAbnormal"
            size="small" :autosize="{ minRows: 3, maxRows: 3 }"></el-input></td>
        <td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.noOccupAbSuggestion"
            size="small" :autosize="{ minRows: 3, maxRows: 3 }"></el-input></td>
      </tr>
    </table>
    <div>处理意见：</div>
    <div>
      <el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.handleSuggestion" size="small"
        :autosize="{ minRows: 1, maxRows: 2 }"></el-input>
    </div>
  </div>
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
import OccDiseasePoison from "./OccDiseasePoison.vue";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv, checkPagePriv, objCopy, deepCopy, arrayExistObj } from "../../utlis/proFunc";
export default {
  components: { OccDiseasePoison },
  props: ["refFunc"],
  data() {
    return {
      pagePriv: {
        routeUrlorPageName: 'customerOrg', //当前页面归属路由或归属页面权限名称
        privs: [] // 页面权限
      },

    };
  },

  created() {
    //获取用户当前页面的权限
    let userPriv = window.sessionStorage.getItem('userPriv')
    if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName))
  },

  //挂载完成
  mounted() {

  },

  computed: {
    ...mapState(["window", "customerOrg", "dialogWin", "dataTransOpts"]),
  },

  methods: {
    moment, checkPagePriv,


  },

  watch: {
    // 单位id未变时，强制刷新
    "dataTransOpts.refresh.contact_person.S": {
      // immediate: true,
      handler(newVal, oldVal) {
        console.log(`watch 联系人 newVal:${newVal} oldVal:${oldVal} customerOrgId: ${this.dataTransOpts.tableS.contact_person.id}`);
        this.getFormData(this.dataTransOpts.tableS.contact_person.id)
      }
    },

  },
};
</script>
<style scoped>
@import '../../assets/css/global_table.css';
@import '../../assets/css/global_input.css';
@import '../../assets/css/global_form.css';
@import '../../assets/css/global_dialog.css';

.btnClass {
  width: 110px;
}</style>
