<template>
  <el-dialog  :close-on-click-modal="false"
    :title="!this.taskForm.taskId == '' ? $t('处理') : $t('详情')"

    :visible.sync="visible" append-to-body>
    <el-form :model="taskForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="" label-width="80px">
      <el-form-item :label="$t('设备')">
        <el-table
          v-show="dataForm.approveType == 8"
          :data="devList"
          border
          style="width: 100%;">
          <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :show-overflow-tooltip="true"/>
          <el-table-column :label="$t('检查年月')" align="center" prop="checkMonth" width="100">
          </el-table-column>
          <el-table-column header-align="center" align="center" :label="$t('压力容器')">
            <el-table-column :label="$t('容器单元')" align="center" prop="rqUnit" :show-overflow-tooltip="true"/>
            <el-table-column :label="$t('容器本体')" align="center" prop="rqSelf" :formatter="rqSelfFormat" />
            <el-table-column :label="$t('安全附件')" align="center" prop="rqSafe" :formatter="rqSafeFormat" />
            <el-table-column :label="$t('安全保护装置')" align="center" prop="rqProtect" :formatter="rqProtectFormat" />
            <el-table-column :label="$t('测量调控装置，紧急切断阀')" align="center" prop="rqControl" :formatter="rqControlFormat" />
            <el-table-column :label="$t('附属仪器仪表')" align="center" prop="rqIns" :formatter="rqInsFormat" />
            <el-table-column :label="$t('有无泄漏')" align="center" prop="rqOut" :formatter="rqOutFormat" />
            <el-table-column :label="$t('其它情况描述')" align="center" prop="rqOther" :show-overflow-tooltip="true"/>
            <el-table-column :label="$t('容器备注')" align="center" prop="rqRemark" :show-overflow-tooltip="true"/>
          </el-table-column>
          <el-table-column header-align="center" align="center" :label="$t('压力管道')">
            <el-table-column :label="$t('管道区域/单元')" align="center" prop="gdUnit" :show-overflow-tooltip="true"/>
            <el-table-column :label="$t('管道宏观')" align="center" prop="gdSelf" :formatter="gdSelfFormat" />
            <el-table-column :label="$t('安全附件')" align="center" prop="gdSafe" :formatter="gdSafeFormat" />
            <el-table-column :label="$t('测量调控装置')" align="center" prop="gdControl" :formatter="gdControlFormat" />
            <el-table-column :label="$t('附属仪器仪表')" align="center" prop="gdIns" :formatter="gdInsFormat" />
            <el-table-column :label="$t('有无泄漏')" align="center" prop="gdOut" :formatter="gdOutFormat" />
            <el-table-column :label="$t('其它情况描述')" align="center" prop="gdOther" :show-overflow-tooltip="true"/>
            <el-table-column :label="$t('管道备注')" align="center" prop="gdRemark" :show-overflow-tooltip="true"/>
          </el-table-column>
          <el-table-column header-align="center" align="center" :label="$t('锅炉')">
            <el-table-column :label="$t('锅炉区域/单元')" align="center" prop="glUnit" :show-overflow-tooltip="true"/>
            <el-table-column :label="$t('承压部件')" align="center" prop="glPressure" :formatter="glPressureFormat" />
            <el-table-column :label="$t('安全附件')" align="center" prop="glSafe" :formatter="glSafeFormat" />
            <el-table-column :label="$t('仪表及联锁保护装置')" align="center" prop="glIns" :formatter="glInsFormat" />
            <el-table-column :label="$t('燃烧器')" align="center" prop="glBurn" :formatter="glBurnFormat" />
            <el-table-column :label="$t('人员')+$t('证书')" align="center" prop="glCer" :formatter="glCerFormat" />
            <el-table-column :label="$t('水质化验')" align="center" prop="glWater" :formatter="glWaterFormat" />
            <el-table-column :label="$t('其它情况描述')" align="center" prop="glOther" :show-overflow-tooltip="true"/>
            <el-table-column :label="$t('锅炉')+$t('备注')" align="center" prop="glRemark" :show-overflow-tooltip="true"/>
          </el-table-column>
        </el-table>
        <el-table
          v-show="dataForm.approveType == 7 && dataForm.devType == 1"
          :data="devList"
          border
          style="width: 100%;">
          <el-table-column :label="$t('装置')" align="center" fixed="left" prop="plantCode" :show-overflow-tooltip="true"/>
          <el-table-column :label="$t('单元')" align="center" fixed="left" prop="unit" :show-overflow-tooltip="true"/>
          <el-table-column :label="$t('位号')" align="center" fixed="left" prop="devno" :show-overflow-tooltip="true"/>
          <el-table-column :label="$t('设备名称')" align="center" prop="devname" width="200" :show-overflow-tooltip="true"/>
          <el-table-column :label="$t('使用证号码')" align="center" prop="useno" :show-overflow-tooltip="true"/>
          <el-table-column :label="$t('设备代码')" align="center" prop="regno" :show-overflow-tooltip="true"/>
          <el-table-column :label="$t('介质')" align="center" prop="medium" :show-overflow-tooltip="true" :render-header="renderHeader">
          </el-table-column>
          <el-table-column :label="$t('设计压力')+'(MPa)'" align="center" prop="desPressure" :show-overflow-tooltip="true" :render-header="renderHeader">
          </el-table-column>
          <el-table-column :label="$t('设计温度')+'(℃)'" align="center" prop="desTemp" :show-overflow-tooltip="true" :render-header="renderHeader">
          </el-table-column>
          <el-table-column :label="$t('操作压力')+'(MPa)'" align="center" prop="optPressure" :show-overflow-tooltip="true" :render-header="renderHeader">
          </el-table-column>
          <el-table-column :label="$t('操作温度')+'(℃)'" align="center" prop="optTemp" :show-overflow-tooltip="true" :render-header="renderHeader">
          </el-table-column>
          <el-table-column :label="$t('安全状况等级')" align="center" prop="safeClass" :show-overflow-tooltip="true"/>
          <el-table-column :label="$t('下次定期检验日期')" align="center" prop="nextWarnDate" width="100">
          </el-table-column>
          <el-table-column  :label="$t('容器管理')" header-align="center">
            <el-table-column
              prop="pj1"
              header-align="center"
              align="center"
              label="1">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('管理制度、操作规程、运行记录')" placement="top">
                  <span>1</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj2"
              header-align="center"
              align="center"
              label="2">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('设计文件、竣工图样、产品合格证、质量证明文件、安装使用说明')" placement="top">
                  <span>2</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj3"
              header-align="center"
              align="center"
              label="3">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('监督检验证书以及安装、改造、修理等资料')" placement="top">
                  <span>3</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj4"
              header-align="center"
              align="center"
              label="4">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('使用登记证，使用登记表是否与实际相符')" placement="top">
                  <span>4</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj5"
              header-align="center"
              align="center"
              label="5">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('日常维护保养、定期安全检查记录')" placement="top">
                  <span>5</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj6"
              header-align="center"
              align="center"
              label="6">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('年度检查、定期检验报告齐全，报告中问题解决')" placement="top">
                  <span>6</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj7"
              header-align="center"
              align="center"
              label="7">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('作业人员定期培训情况')" placement="top">
                  <span>7</span>
                </el-tooltip>
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column  :label="$t('容器本体及运行情况')" header-align="center">
            <el-table-column
              prop="pj8"
              header-align="center"
              align="center"
              label="8">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('设备铭牌、漆色、标志、使用证号码')" placement="top">
                  <span>8</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj9"
              header-align="center"
              align="center"
              label="9">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('本体裂、过热、变形、泄漏、损伤情况')" placement="top">
                  <span>9</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj10"
              header-align="center"
              align="center"
              label="10">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('接口部位、焊接接头等裂纹、泄漏、损伤情况')" placement="top">
                  <span>10</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj11"
              header-align="center"
              align="center"
              label="11">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('外表面腐蚀、异常结霜、结露情况')" placement="top">
                  <span>11</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj12"
              header-align="center"
              align="center"
              label="12">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('保温层、隔热层、衬里情况')" placement="top">
                  <span>12</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj13"
              header-align="center"
              align="center"
              label="13">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('检漏孔、信号孔')" placement="top">
                  <span>13</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj14"
              header-align="center"
              align="center"
              label="14">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('容器与相邻管道、构件间异常振动、响声、摩擦')" placement="top">
                  <span>14</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj15"
              header-align="center"
              align="center"
              label="15">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('支承、支座、基础、紧固螺栓')" placement="top">
                  <span>15</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj16"
              header-align="center"
              align="center"
              label="16">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('遮阳罩、操作台紧固')" placement="top">
                  <span>16</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj17"
              header-align="center"
              align="center"
              label="17">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('罐体与底盘等连接')" placement="top">
                  <span>17</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj18"
              header-align="center"
              align="center"
              label="18">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('波板、罐内扶梯与罐体连接')" placement="top">
                  <span>18</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj19"
              header-align="center"
              align="center"
              label="19">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('罐车拉紧带、鞍座、中间支座')" placement="top">
                  <span>19</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj20"
              header-align="center"
              align="center"
              label="20">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('气液相管及其它管路')" placement="top">
                  <span>20</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj21"
              header-align="center"
              align="center"
              label="21">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('疏水、排放、排污装置')" placement="top">
                  <span>21</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj22"
              header-align="center"
              align="center"
              label="22">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('设备运行稳定情况')" placement="top">
                  <span>22</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj23"
              header-align="center"
              align="center"
              label="23">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('接地装置')" placement="top">
                  <span>23</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj24"
              header-align="center"
              align="center"
              label="24">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('安全状况等级为4级的压力容器的监控措施')" placement="top">
                  <span>24</span>
                </el-tooltip>
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column :label="$t('安全附件或设施')" header-align="center">
            <el-table-column
              prop="pj25"
              header-align="center"
              align="center"
              label="25">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('安全阀')" placement="top">
                  <span>25</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj26"
              header-align="center"
              align="center"
              label="26">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('压力表')" placement="top">
                  <span>26</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj27"
              header-align="center"
              align="center"
              label="27">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('爆破片')" placement="top">
                  <span>27</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj28"
              header-align="center"
              align="center"
              label="28">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('测温仪表')" placement="top">
                  <span>28</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj29"
              header-align="center"
              align="center"
              label="29">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('液位计')" placement="top">
                  <span>29</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj30"
              header-align="center"
              align="center"
              label="30">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('快开门安全联锁装置')" placement="top">
                  <span>30</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj31"
              header-align="center"
              align="center"
              label="31">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('紧急切断装置')" placement="top">
                  <span>31</span>
                </el-tooltip>
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column :label="$t('其他')" header-align="center">
            <el-table-column
              prop="pj32"
              header-align="center"
              align="center"
              label="32">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('装卸软管、装卸阀门')" placement="top">
                  <span>32</span>
                </el-tooltip>
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column
            prop="checkDate"
            header-align="center"
            align="center"
            :label="$t('检查日期')">
          </el-table-column>
          <el-table-column
            prop="problem"
            header-align="center"
            align="center"
            :label="$t('问题及处理')">
          </el-table-column>
          <el-table-column
            prop="con"
            header-align="center"
            align="center"
            :label="$t('结论')"
            :formatter="conFormat">
          </el-table-column>
          <el-table-column
            prop="yearReportNo"
            header-align="center"
            align="center"
            :label="$t('报告编号')">
          </el-table-column>
          <el-table-column
            prop="remarks"
            header-align="center"
            align="center"
            :label="$t('备注')">
          </el-table-column>
        </el-table>
        <el-table
          v-show="dataForm.approveType == 7 && dataForm.devType == 2"
          :data="devList"
          border
          style="width: 100%;">
          <el-table-column
            prop="devEntity.plantCode"
            header-align="center"
            align="center"
            :label="$t('装置名称')">
          </el-table-column>
          <el-table-column
            prop="devEntity.unit"
            header-align="center"
            align="center"
            :label="$t('单元')">
          </el-table-column>
          <el-table-column
            prop="devEntity.devname"
            header-align="center"
            align="center"
            :label="$t('管道名称')">
          </el-table-column>
          <el-table-column
            prop="devEntity.devno"
            header-align="center"
            align="center"
            :label="$t('管道编号')">
          </el-table-column>
          <el-table-column
            prop="devEntity.nextWarnDate"
            header-align="center"
            align="center"
            :label="$t('下次定期检验日期')">
          </el-table-column>
          <el-table-column
            prop="grade"
            header-align="center"
            align="center"
            :label="$t('管道级别')">
          </el-table-column>
          <el-table-column
            :label="$t('允许使用参数')"
            align="center">
            <el-table-column
              prop="medium"
              header-align="center"
              align="center"
              :label="$t('介质')">
            </el-table-column>
            <el-table-column
              prop="desPressure"
              header-align="center"
              align="center"
              :label="$t('设计压力')">
            </el-table-column>
            <el-table-column
              prop="desTemp"
              header-align="center"
              align="center"
              :label="$t('设计温度')">
            </el-table-column>
            <el-table-column
              prop="optPressure"
              header-align="center"
              align="center"
              :label="$t('操作压力')">
            </el-table-column>
            <el-table-column
              prop="optTemp"
              header-align="center"
              align="center"
              :label="$t('操作温度')">
            </el-table-column>
          </el-table-column>
          <el-table-column
            prop="checkUnit"
            header-align="center"
            align="center"
            :label="$t('检验单位')">
          </el-table-column>

          <el-table-column
            prop="safeClass"
            header-align="center"
            align="center"
            :label="$t('安全等级')">
          </el-table-column>
          <el-table-column
            prop="pj1"
            header-align="center"
            align="center"
            label="1">
            <template slot-scope="scope" slot="header">
              <el-tooltip effect="dark" :content="$t('安全管理情况')" placement="top">
                <span>1</span>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column
            prop="pj2"
            header-align="center"
            align="center"
            label="2">
            <template slot-scope="scope" slot="header">
              <el-tooltip effect="dark" :content="$t('设计图纸文档、维修记录、质量证明等资料')" placement="top">
                <span>2</span>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column
            prop="pj3"
            header-align="center"
            align="center"
            label="3">
            <template slot-scope="scope" slot="header">
              <el-tooltip effect="dark" :content="$t('作业人员定期培训情况')" placement="top">
                <span>3</span>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column
            prop="pj4"
            header-align="center"
            align="center"
            label="4">
            <template slot-scope="scope" slot="header">
              <el-tooltip effect="dark" :content="$t('管道本体及支架')" placement="top">
                <span>4</span>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column
            prop="pj5"
            header-align="center"
            align="center"
            label="5">
            <template slot-scope="scope" slot="header">
              <el-tooltip effect="dark" :content="$t('管道运行情况')" placement="top">
                <span>5</span>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column
            label="安全附件及仪表"
            align="center"
          >
            <el-table-column
              prop="pj6"
              header-align="center"
              align="center"
              label="6">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('安全阀')" placement="top">
                  <span>6</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj7"
              header-align="center"
              align="center"
              label="7">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('爆破片装置')" placement="top">
                  <span>7</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj8"
              header-align="center"
              align="center"
              label="8">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('阻火器装置')" placement="top">
                  <span>8</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj9"
              header-align="center"
              align="center"
              label="9">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('紧急切断阀')" placement="top">
                  <span>9</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj10"
              header-align="center"
              align="center"
              label="10">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('压力表')" placement="top">
                  <span>10</span>
                </el-tooltip>
              </template>
            </el-table-column>
            <el-table-column
              prop="pj11"
              header-align="center"
              align="center"
              label="11">
              <template slot-scope="scope" slot="header">
                <el-tooltip effect="dark" :content="$t('测温仪表')" placement="top">
                  <span>11</span>
                </el-tooltip>
              </template>
            </el-table-column>
          </el-table-column>
          <el-table-column
            prop="pj12"
            header-align="center"
            align="center"
            label="12">
            <template slot-scope="scope" slot="header">
              <el-tooltip effect="dark" :content="$t('电阻值测量')" placement="top">
                <span>12</span>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column
            prop="pj13"
            header-align="center"
            align="center"
            label="13">
            <template slot-scope="scope" slot="header">
              <el-tooltip effect="dark" :content="$t('壁厚测定')" placement="top">
                <span>13</span>
              </el-tooltip>
            </template>
          </el-table-column>
          <el-table-column
            prop="checkDate"
            header-align="center"
            align="center"
            :label="$t('检查日期')">
          </el-table-column>
          <el-table-column
            prop="nextCheckDate"
            header-align="center"
            align="center"
            :label="$t('下次年检时间')">
          </el-table-column>
          <el-table-column
            prop="problem"
            header-align="center"
            align="center"
            :label="$t('问题及处理')">
          </el-table-column>
          <el-table-column
            prop="con"
            header-align="center"
            align="center"
            :label="$t('结论')"
            :formatter="conFormat">
          </el-table-column>
          <el-table-column
            prop="yearReportNo"
            header-align="center"
            align="center"
            :label="$t('报告编号')">
          </el-table-column>
        </el-table>
        <el-table
          v-show="dataForm.approveType != 7 && dataForm.devType == 1"
          :data="devList"
          border
          style="width: 100%; height: 95px">
          <el-table-column
            prop="plantCode"
            header-align="center"
            align="center"
            :label="$t('装置名称')">
          </el-table-column>
          <el-table-column
            prop="devno"
            header-align="center"
            align="center"
            :label="$t('位号')">
          </el-table-column>
          <el-table-column
            prop="devname"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="150"
            :label="$t('设备名称')">
          </el-table-column>
          <el-table-column
            prop="useno"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('使用证编号')">
          </el-table-column>
          <el-table-column
            prop="medium"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('介质')">
          </el-table-column>
          <el-table-column
            prop="desPressure"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('设计压力')+'(MPa)'">
          </el-table-column>
          <el-table-column
            prop="desTemp"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('设计温度')+'(℃)'">
          </el-table-column>
        </el-table>
        <el-table
          v-show="dataForm.approveType != 7 && dataForm.devType == 2"
          :data="devList"
          border
          style="width: 100%;  height: 95px">
          <el-table-column
            prop="plantCode"
            header-align="center"
            align="center"
            width="100"
            :label="$t('装置名称')">
          </el-table-column>
          <el-table-column
            prop="devno"
            header-align="center"
            align="center"
            width="120"
            :label="$t('位号')">
          </el-table-column>
          <el-table-column
            prop="starting"
            header-align="center"
            align="center"
            width="100"
            :show-overflow-tooltip="true"
            :label="$t('起点')">
          </el-table-column>
          <el-table-column
            prop="ending"
            header-align="center"
            align="center"
            width="100"
            :show-overflow-tooltip="true"
            :label="$t('终点')">
          </el-table-column>
          <el-table-column
            prop="medium"
            header-align="center"
            align="center"
            width="100"
            :show-overflow-tooltip="true"
            :label="$t('介质')">
          </el-table-column>
          <el-table-column
            prop="desPressure"
            header-align="center"
            align="center"
            :label="$t('设计压力')">
          </el-table-column>
          <el-table-column
            prop="desTemp"
            header-align="center"
            align="center"
            :label="$t('设计温度')">
          </el-table-column>
          <el-table-column
            prop="optPressure"
            header-align="center"
            align="center"
            :label="$t('工作压力')">
          </el-table-column>
          <el-table-column
            prop="optTemp"
            header-align="center"
            align="center"
            width="100"
            :show-overflow-tooltip="true"
            :label="$t('工作温度')">
          </el-table-column>
        </el-table>
        <el-table
          v-show="dataForm.devType == 3"
          :data="devList"
          border
          style="width: 100%; height: 95px">
          <el-table-column
            prop="plantCode"
            header-align="center"
            align="center"
            :label="$t('装置名称')">
          </el-table-column>
          <el-table-column
            prop="docno"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('档案号')">
          </el-table-column>
          <el-table-column
            prop="devname"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="150"
            :label="$t('设备名称')">
          </el-table-column>
          <el-table-column
            prop="capacity"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('起吊重量')+'(ton)'">
          </el-table-column>
          <el-table-column
            prop="location"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('使用地点')">
          </el-table-column>
        </el-table>
        <el-table
          v-show="dataForm.devType == 4"
          :data="devList"
          border
          style="width: 100%; height: 95px">
          <el-table-column
            prop="plantCode"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('装置名称')">
          </el-table-column>
          <el-table-column
            prop="devno"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('位号')">
          </el-table-column>
          <el-table-column
            prop="devname"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="120"
            :label="$t('设备名称')">
          </el-table-column>
          <el-table-column
            prop="useno"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('使用证编号')">
          </el-table-column>
          <el-table-column
            prop="desTemp"
            header-align="center"
            align="center"
            :label="$t('设计温度')+'(℃)'">
          </el-table-column>
          <el-table-column
            prop="desPressure"
            header-align="center"
            align="center"
            :label="$t('设计压力')+'(MPa)'">
          </el-table-column>
        </el-table>
        <el-table
          v-show="dataForm.devType == 5"
          :data="devList"
          border
          style="width: 100%; height: 95px">
          <el-table-column
            prop="plantCode"
            header-align="center"
            align="center"
            :label="$t('装置名称')">
          </el-table-column>
          <el-table-column
            prop="docno"
            header-align="center"
            align="center"
            :label="$t('docNo')">
          </el-table-column>
          <el-table-column
            prop="devname"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="150"
            :label="$t('设备名称')">
          </el-table-column>
          <el-table-column
            prop="model"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="120"
            :label="$t('型号')">
          </el-table-column>
          <el-table-column
            prop="location"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            :label="$t('使用地点')">
          </el-table-column>
        </el-table>
        <el-table
          v-show="dataForm.devType == 6"
          :data="devList"
          border
          style="width: 100%; height: 95px">
          <el-table-column
            prop="plantCode"
            header-align="center"
            align="center"
            :label="$t('装置名称')">
          </el-table-column>
          <el-table-column
            prop="useDept"
            header-align="center"
            align="center"
            :label="$t('dept')">
          </el-table-column>
          <el-table-column
            prop="carNo"
            header-align="center"
            align="center"
            :label="$t('plateNo')">
          </el-table-column>
          <el-table-column
            prop="docno"
            header-align="center"
            align="center"
            :label="$t('docNo')">
          </el-table-column>
          <el-table-column
            prop="model"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="120"
            :label="$t('model')">
          </el-table-column>
        </el-table>
        <el-table
          v-show="dataForm.devType == 7"
          :data="devList"
          border
          style="width: 100%; height: 95px">
          <el-table-column
            prop="plantCode"
            header-align="center"
            align="center"
            :label="$t('装置名称')">
          </el-table-column>
          <el-table-column
            prop="unit"
            header-align="center"
            align="center"
            :label="$t('单元')">
          </el-table-column>
          <el-table-column
            prop="devno"
            header-align="center"
            align="center"
            :label="$t('位号')">
          </el-table-column>
          <el-table-column
            prop="devname"
            header-align="center"
            align="center"
            :label="$t('名称')">
          </el-table-column>
          <el-table-column
            prop="createno"
            header-align="center"
            align="center"
            :label="$t('制造编号')">
          </el-table-column>
          <el-table-column
            prop="indiameter"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="120"
            :label="$t('内径')+' mm'">
          </el-table-column>
          <el-table-column
            prop="height"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="120"
            :label="$t('高(长)')+' mm'">
          </el-table-column>
          <el-table-column
            prop="chickness"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="120"
            :label="$t('壁厚(mm)')">
          </el-table-column>
          <el-table-column
            prop="volume"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="120"
            :label="$t('容积mm³')">
          </el-table-column>
          <el-table-column
            prop="medium"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="120"
            :label="$t('介质')">
          </el-table-column>
          <el-table-column
            prop="material"
            header-align="center"
            align="center"
            :show-overflow-tooltip="true"
            width="120"
            :label="$t('材料')">
          </el-table-column>
        </el-table>
        <el-button @click="recordHandle(devList,dataForm)" type="text" v-if="devList.length >1">{{$t('更多条目')}}</el-button>
      </el-form-item>
      <el-row>
        <el-col :span="8" v-if="dataForm.approveType != 8">
          <el-form-item :label="$t('设备类型')" prop="devType">
            <el-select v-model="dataForm.devType" :placeholder="$t('message.select')" disabled>
              <el-option
                v-for="dict in devTypeOption"
                :key="dict.dictValue"
                :label="dict.dictLabel"
                :value="parseInt(dict.dictValue)">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item :label="$t('审批类型')" prop="approveType">
            <el-select v-model="dataForm.approveType" :placeholder="$t('message.select')" disabled>
              <el-option
                v-for="dict in approveOption"
                :key="dict.dictValue"
                :label="dict.dictLabel"
                :value="parseInt(dict.dictValue)">
              </el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item :label="$t('申请时间')" prop="creattime">
        <el-input v-model="dataForm.creattime" disabled></el-input>
      </el-form-item>
      <el-form-item v-if="[-1,1,2,3,4,5,6].includes(dataForm.approveType)" :label="$t('原因描述')" prop="content">
        <el-input type="textarea" :placeholder="$t('原因描述')"
                  v-model="dataForm.content"
                  maxlength="200"
                  :autosize="{ minRows: 2, maxRows: 10}" disabled></el-input>
      </el-form-item>
      <template v-if="dataForm.approveType == 5">
        <el-form-item :label="$t('延期日期')" prop="delayDate">
          <el-form-item prop="endTime">
            <el-date-picker
              v-model="dataForm.delayDate"
              type="date"
              value-format="yyyy-MM-dd"
              :placeholder="$t('selectDate')" disabled>
            </el-date-picker>
          </el-form-item>
        </el-form-item>
        <el-form-item :label="$t('延期原因')" prop="delayReason">
          <el-input type="textarea" :placeholder="$t('延期原因')"
                    v-model="dataForm.delayReason"
                    :autosize="{ minRows: 2, maxRows: 50}" disabled></el-input>
        </el-form-item>
        <el-form-item :label="$t('延期措施')" prop="delayMeasure">
          <el-input type="textarea" :placeholder="$t('延期措施')"
                    v-model="dataForm.delayMeasure"
                    :autosize="{ minRows: 2, maxRows: 50}" disabled></el-input>
        </el-form-item>
        <el-form-item :label="$t('延期责任安全声明')" prop="delayNotice">
          <el-input type="textarea" :placeholder="$t('延期责任安全声明')"
                    v-model="dataForm.delayNotice"
                    :autosize="{ minRows: 2, maxRows: 50}" disabled></el-input>
        </el-form-item>
      </template>

      <el-form-item :label="$t('附件')" prop="fileUrls" v-if="[-1,1,2,3,4,5,6].includes(dataForm.approveType)">
        <template v-for="item in this.dataForm.files">
          <a style="margin-right: 40px" class='download' :href='getUrl(item.fileUrl)' download="" target="_blank" :title="$t('download')">{{item.fileName}}</a>
        </template>
      </el-form-item >
      <el-form-item :label="$t('政府回执')" prop="fileUrls" v-if="[-1,1,2,3,4,5,6].includes(dataForm.approveType)">
        <template v-for="item in this.dataForm.govFiles">
          <a style="margin-right: 40px" class='download' :href='getUrl(item.fileUrl)' download="" target="_blank" :title="$t('download')">{{item.fileName}}</a>
        </template>
      </el-form-item >
      <el-form-item :label="$t('回执日期')" v-if="[-1,1,2,3,4,5,6].includes(dataForm.approveType)" prop="govDate">
        <el-input v-model="dataForm.govDate" disabled></el-input>
      </el-form-item>
    </el-form>
    <span v-if="this.taskName == '政府回执'" slot="footer" class="dialog-footer">
      <el-button v-if="this.dataForm.approveType == 5" type="text" size="small" @click="recordLetter()">{{$t('downloadLetter')}}</el-button>
      <el-button v-if="!this.taskForm.taskId == ''" type="primary" @click="dataFormSubmit(1)" :disabled="submitDisabled">{{$t('submitReceipt')}}</el-button>
    </span>
    <span slot="footer" class="dialog-footer" v-else>
      <el-button v-if="this.taskForm.taskId == ''" @click="visible = false">{{$t('message.return')}}</el-button>
      <el-button v-if="!this.taskForm.taskId == ''" type="primary" @click="dataFormSubmit(1)" :disabled="submitDisabled">{{$t('通过')}}</el-button>
      <el-button v-if="!this.taskForm.taskId == ''" type="danger" @click="dataFormSubmit(0)" :disabled="submitDisabled">{{$t('拒绝')}}</el-button>
    </span>
    <div>
      <span>{{$t('流转详情')}}</span>
      <el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">
        <el-table-column prop="taskName" header-align="center" align="center" :label="$t('流程进度')"></el-table-column>
        <el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>
        <el-table-column prop="taskCreateTime" header-align="center" align="center" :label="$t('开始时间')"></el-table-column>
        <el-table-column prop="taskEndTime" header-align="center" align="center" :label="$t('结束时间')"></el-table-column>
        <el-table-column prop="comment" header-align="center" align="center" :label="$t('审批意见')"></el-table-column>
      </el-table>
    </div>
    <record v-if="recordVisible" ref="recordDeal"></record>
  </el-dialog>
</template>

<script>
  import record from "./spec-itemDetail";
  import {getToken} from "@/utils/auth";
  import {getApprove, getApproveInfo, handleApprove} from "@/api/sems/approve";
  import {getHistorylist} from "@/api/ehs/approvedanger";


  export default {
  name: "spec-deal",
  components: {record},
  data() {
    return {
      loading: true,
      // 总条数
      total: 0,
      approvedangerList: [],
      recordVisible: false,
      // 遮罩层
      historyLoading: false,
      //流转列表
      historyList: [],
      visible: false,
      devList: [],
      dataList: [],
      fileTips: '',
      showDelay: false,
      submitDisabled: false,
      dataListLoading:true,
      taskName: '',
      dataForm: {
        id: 0,
        userId: '',
        devId: '',
        devType: '',
        approveType: '',
        content: '',
        fileUrls: '',
        reUrls: '',
        status: '',
        creattime: '',
        plantCode: '',
        unit: '',
        devname: '',
        devno: '',
        files: [],
        govFiles: [],
        delayDate: '',
        delayReason: '',
        delayMeasure: '',
        delayNotice: '',
        govDate: '',
      },
      taskForm: {
        comment: '',
        taskId: '',
        files: '',
        govDate: '',
        govFileList: []
      },
      // 查询参数
      queryParams: {
        processId: null,
      },
      doc: {
        file: "",
        // 是否显示弹出层（报告附件）
        open: false,
        // 弹出层标题（报告附件）
        title: "",
        // 是否禁用上传
        isUploading: false,
        // 是否更新已经存在的用户数据
        updateSupport: 0,
        // 报告附件上传位置编号
        ids: 0,
        // 设置上传的请求头部
        headers: { Authorization: "Bearer " + getToken() },
        // 上传的地址
        url: process.env.VUE_APP_BASE_API + "/sems/specfile/uploadFile",
        commonfileList: null,
        pType: 'traning',
        pId: null
      },
      dataRule: {
      },
      // 容器本体字典
      rqSelfOptions: [],
      // 安全附件字典
      rqSafeOptions: [],
      // 安全保护装置字典
      rqProtectOptions: [],
      // 测量调控装置，紧急切断阀字典
      rqControlOptions: [],
      // 附属仪器仪表字典
      rqInsOptions: [],
      // 有无泄漏字典
      rqOutOptions: [],
      // 管道宏观字典
      gdSelfOptions: [],
      // 安全附件字典
      gdSafeOptions: [],
      // 测量调控装置字典
      gdControlOptions: [],
      // 附属仪器仪表字典
      gdInsOptions: [],
      // 有无泄漏字典
      gdOutOptions: [],
      // 承压部件字典
      glPressureOptions: [],
      // 安全附件字典
      glSafeOptions: [],
      // 仪表及联锁保护装置字典
      glInsOptions: [],
      // 燃烧器字典
      glBurnOptions: [],
      // 人员证书字典
      glCerOptions: [],
      // 水质化验字典
      glWaterOptions: [],
      approveOption: [],
      devTypeOption: [],
      conOptions: [],
      belong: '',
      fileList: [],
    };
  },
  watch: {
    // 根据名称筛选部门树
    deptName(val) {
      this.$refs.tree.filter(val);
    }
  },
  created() {
    this.getDicts("REPORT_CON").then(response => {
      this.conOptions = response.data;
    });
    this.getDicts("ABNORMALITY").then(response => {
      this.rqSelfOptions = response.data;
    });
    this.getDicts("CONFORM").then(response => {
      this.rqSafeOptions = response.data;
    });
    this.getDicts("CONFORM").then(response => {
      this.rqProtectOptions = response.data;
    });
    this.getDicts("INTACT").then(response => {
      this.rqControlOptions = response.data;
    });
    this.getDicts("INTACT").then(response => {
      this.rqInsOptions = response.data;
    });
    this.getDicts("WITH_WITHOUT").then(response => {
      this.rqOutOptions = response.data;
    });
    this.getDicts("ABNORMALITY").then(response => {
      this.gdSelfOptions = response.data;
    });
    this.getDicts("CONFORM").then(response => {
      this.gdSafeOptions = response.data;
    });
    this.getDicts("CONFORM").then(response => {
      this.gdControlOptions = response.data;
    });
    this.getDicts("INTACT").then(response => {
      this.gdInsOptions = response.data;
    });
    this.getDicts("WITH_WITHOUT").then(response => {
      this.gdOutOptions = response.data;
    });
    this.getDicts("ABNORMALITY").then(response => {
      this.glPressureOptions = response.data;
    });
    this.getDicts("CONFORM").then(response => {
      this.glSafeOptions = response.data;
    });
    this.getDicts("CONFORM").then(response => {
      this.glInsOptions = response.data;
    });
    this.getDicts("INTACT").then(response => {
      this.glBurnOptions = response.data;
    });
    this.getDicts("CONFORM").then(response => {
      this.glCerOptions = response.data;
    });
    this.getDicts("CONFORM").then(response => {
      this.glWaterOptions = response.data;
    });
  },
  methods: {
    init (id, taskId, processId,taskName) {
      this.taskForm.govFileList = []
      this.getDicts("spec_approve_type").then(response => {
        this.approveOption = response.data;
      });
      this.getDicts("spec_dev_type").then(response => {
        this.devTypeOption = response.data;
      });
      this.dataForm.processId = processId
      this.taskName = taskName
      this.taskForm.taskId = taskId
      this.dataForm.id = id || 0
      this.visible = true
      this.queryParams.processId = processId;
      getHistorylist(this.queryParams).then(response => {
        this.historyList = response.rows;
        this.historyLoading = false
      });
      getApproveInfo(id).then(response => {
        this.dataForm.userId = response.data.userId
        this.dataForm.devId = response.data.devId
        this.dataForm.devType = response.data.devType
        this.dataForm.approveType = response.data.approveType
        this.dataForm.content = response.data.content
        this.dataForm.fileUrls = response.data.fileUrls
        this.dataForm.reUrls = response.data.reUrls
        this.dataForm.status = response.data.status
        this.dataForm.creattime = response.data.creattime
        this.dataForm.plantCode = response.data.plantCode
        this.dataForm.unit = response.data.unit
        this.dataForm.devname = response.data.devname
        this.dataForm.devno = response.data.devno
        this.dataForm.files = response.data.files
        this.dataForm.govFiles = response.data.govFiles
        this.devList = response.data.devList
        this.dataForm.delayDate = response.data.delayDate
        this.dataForm.delayReason = response.data.delayReason
        this.dataForm.delayMeasure = response.data.delayMeasure
        this.dataForm.delayNotice = response.data.delayNotice
        this.dataForm.govDate = response.data.govDate
      });
    },
    recordLetter(){
      var name = row.fileName;
      var url = row.fileUrl;
      var suffix = url.substring(url.lastIndexOf("."), url.length);
      const a = document.createElement('a')
      a.setAttribute('download', name)
      a.setAttribute('target', '_blank')
      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
      a.click()
    },
    // 设备类型：字典翻译
    devTypeFormat(row, column) {
      return this.selectDictLabel(this.devTypeOptions, row.devType);
    },
    // 审批类型字典翻译
    approveTypeFormat(row, column) {
      return this.selectDictLabel(this.approveTypeOptions, row.approveType);
    },
    // 检查结论字典翻译
    conFormat(row, column) {
      return this.selectDictLabel(this.conOptions, row.con);
    },
    // 容器本体字典翻译
    rqSelfFormat(row, column) {
      return this.selectDictLabel(this.rqSelfOptions, row.rqSelf);
    },
    // 安全附件字典翻译
    rqSafeFormat(row, column) {
      return this.selectDictLabel(this.rqSafeOptions, row.rqSafe);
    },
    // 安全保护装置字典翻译
    rqProtectFormat(row, column) {
      return this.selectDictLabel(this.rqProtectOptions, row.rqProtect);
    },
    // 测量调控装置，紧急切断阀字典翻译
    rqControlFormat(row, column) {
      return this.selectDictLabel(this.rqControlOptions, row.rqControl);
    },
    // 附属仪器仪表字典翻译
    rqInsFormat(row, column) {
      return this.selectDictLabel(this.rqInsOptions, row.rqIns);
    },
    // 有无泄漏字典翻译
    rqOutFormat(row, column) {
      return this.selectDictLabel(this.rqOutOptions, row.rqOut);
    },
    // 管道宏观字典翻译
    gdSelfFormat(row, column) {
      return this.selectDictLabel(this.gdSelfOptions, row.gdSelf);
    },
    // 安全附件字典翻译
    gdSafeFormat(row, column) {
      return this.selectDictLabel(this.gdSafeOptions, row.gdSafe);
    },
    // 测量调控装置字典翻译
    gdControlFormat(row, column) {
      return this.selectDictLabel(this.gdControlOptions, row.gdControl);
    },
    // 附属仪器仪表字典翻译
    gdInsFormat(row, column) {
      return this.selectDictLabel(this.gdInsOptions, row.gdIns);
    },
    // 有无泄漏字典翻译
    gdOutFormat(row, column) {
      return this.selectDictLabel(this.gdOutOptions, row.gdOut);
    },
    // 承压部件字典翻译
    glPressureFormat(row, column) {
      return this.selectDictLabel(this.glPressureOptions, row.glPressure);
    },
    // 安全附件字典翻译
    glSafeFormat(row, column) {
      return this.selectDictLabel(this.glSafeOptions, row.glSafe);
    },
    // 仪表及联锁保护装置字典翻译
    glInsFormat(row, column) {
      return this.selectDictLabel(this.glInsOptions, row.glIns);
    },
    // 燃烧器字典翻译
    glBurnFormat(row, column) {
      return this.selectDictLabel(this.glBurnOptions, row.glBurn);
    },
    // 人员证书字典翻译
    glCerFormat(row, column) {
      return this.selectDictLabel(this.glCerOptions, row.glCer);
    },
    // 水质化验字典翻译
    glWaterFormat(row, column) {
      return this.selectDictLabel(this.glWaterOptions, row.glWater);
    },
    // 取消按钮
    cancel() {
      this.visible = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        userId: null,
        devId: null,
        devType: null,
        approveType: null,
        content: null,
        fileUrls: null,
        reUrls: null,
        status: 0,
        creattime: null,
        endtime: null,
        processId: null,
        govDate: null,
        delayDate: null,
        delayReason: null,
        delayMeasure: null,
        delayNotice: null,
        apNo: null,
        checkDate: null,
        reportId: null,
        monthId: null,
        delFlag: null,
        deptId: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = this.$t('添加特种设备申请');
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getApprove(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = this.$t('修改特种设备申请');;
      });
    },
    //附件上传中处理
    handleFileDocProgress(event, file, fileList) {
    },
    handleRemove (file, fileList) {
      this.taskForm.govFileList = fileList
    },
    //附件上传成功处理
    handleFileDocSuccess(response, file, fileList) {
      this.taskForm.govFileList = fileList
      if (response.code == 200){
        this.$alert(this.$t('导入成功'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
      }else {
        this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
      }
    },
    /** 提交按钮 */
    // 表单提交
    dataFormSubmit (val) {
      this.submitDisabled = true
      console.log(this.taskForm.govFileList)
      this.dataForm.files = []
      if (this.taskForm.govFileList.length > 0) {
        for (let i = 0; i < this.taskForm.govFileList.length; i++) {
          let obj = {}
          obj.fileName = this.taskForm.govFileList[i].response.fileName
          obj.fileUrl = this.taskForm.govFileList[i].response.url
          this.dataForm.files.push(obj)
        }
      }
      this.taskForm.condition = val
      this.taskForm.govFiles = this.dataForm.files
      handleApprove(this.taskForm).then(response => {
        this.msgSuccess(this.$t('处理成功'));
        this.visible = false;
        this.getList();
      });
      this.$nextTick(function () {
        this.comment = ''
      })
    },
    handleChange(value) {
      this.showDelay = false
      if (value == -1) {
        this.fileTips = '提示：请提供相关支持文件'
      }else if (value == 1) {
        this.fileTips = '提示：请提供启用前检查报告'
      }else if (value == 2) {
        this.fileTips = ''
      }else if (value == 3) {
        this.fileTips = '提示：请提供设备主体破坏后的照片，防止被其他单位买走重新使用'
      }else if (value == 4) {
        this.fileTips = '提示：请提供相关支持文件'
      }else if (value == 5) {
        this.showDelay = true
        this.fileTips = '提示：延期发起的会议纪要等背景情况'
        this.dataForm.delayReason=
          '根据2015年压力管道检验报告，清单中的相关管道材质中度球化，安全等级定为3级，下次检验日期定为2018年5月。\n' +
          '由于这些管道连接电厂蒸汽母管，无法单独隔绝，只有在2020年扬巴大修期间才有机会停车检验，因此提出延期申请。\n'
        this.dataForm.delayMeasure=
          '（生产部门，应该根据实际情况，组织机械，电仪各专业，制定具体的运行监控措施描述）\n' +
          '\n' +
          '工艺部门：\n' +
          '维持相关管道操作稳定\n' +
          '持续监控相关管道操作压力和温度\n' +
          '按照法规要求，定期开展应急演练\n' +
          '\n' +
          '\n' +
          '机修部门：\n' +
          '每月对相关管道进行走线巡检，对管道支吊架，保温目视检查。如有问题，记录在巡检记录中\n' +
          '及时报告管道使用情况及需要解决的问题\n' +
          '发生事故及时组织调查处理，并配合写出事故报告书\n' +
          '\n' +
          '电仪部门：\n' +
          'XXXXXXXXXXX描述电仪方面的维护或监控措施\n'
        this.dataForm.delayNotice=
          '我单位/装置，已制定相应预防措施和应急预案，并保证落实安全管理责任、操作人员持证上岗、安全附件和安全保护装置在有效期内。在检验延期期间，将对以上设备加强巡查和实施有效安全监控，做好监控记录，对延期期间的设备安全负完全责任；在延期期满前，我单位将申报并安排以上设备实施定期检验。'
      }else if (value == 6) {
        this.fileTips = '提示：请提供安全评估报告'
      }else {
        this.fileTips = ''
      }
    },
    recordHandle(devList,dataForm){
      this.recordVisible = true
      this.$nextTick(() => {
        this.$refs.recordDeal.init(devList,dataForm);
      })
    },
    getUrl(url) {
      return process.env.VUE_APP_BASE_API + url
    },
}
}


</script>

<style>
.el-textarea.is-disabled .el-textarea__inner {
  color: #404040;
}
.el-input.is-disabled .el-input__inner {
  color: #404040;
}
</style>
