You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1887 lines
81 KiB

<!-- 压力容器定期检验记录 -->
<template>
<div class="app-container">
<sticky style="margin-bottom: 10px;">
<div class="sub-navbar">
<el-button v-show="state === 'update' && ysjl.jilubianhao" size="medium" style="margin-left: 10px;" type="text">
编号:{{ ysjl.jilubianhao }}
</el-button>
<el-button v-show="state === 'create'" type="success" icon="el-icon-edit" size="medium" @click="saveYsjl('add')">
保存
</el-button>
<el-button v-show="state === 'update'" type="primary" icon="el-icon-edit" size="medium" @click="saveYsjl('upd')">
更新
</el-button>
<el-button v-show="state === 'update'" type="primary" icon="el-icon-circle-check-outline" size="medium" @click="toAddJyfa">
添加检验方案
</el-button>
<el-button v-show="state !== 'create'" type="info" icon="el-icon-info" size="medium" @click="getJyfaInfo">
查看同类报告
</el-button>
<el-button v-show="state === 'update'" type="success" icon="el-icon-upload2" size="medium" @click="saveYsjl('build')">
生成报告
</el-button>
<el-button v-show="state !== 'create'" type="warning" icon="el-icon-view" size="medium" @click="common.viewYsjl(ysjl.id, 'YSJL')">
预览
</el-button>
<!-- <el-button v-show="state !== 'create'" type="info" icon="el-icon-message" size="medium" @click="common.viewRejection(ysjl.id)">
查看驳回意见
</el-button>
<Symbols /> -->
</div>
</sticky>
<el-tabs v-model="checkedTab" type="card">
<el-tab-pane label="基本信息" name="first">
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备名称" prop="shebeimingcheng">
<el-input v-model="ysjl.shebeimingcheng" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验类别" prop="neibuleibie">
<el-select v-model="ysjl.neibuleibie" style="width: 232px;" @change="changeNblb">
<el-option label="定期检验" value="DQ" />
<el-option label="首次定期检验" value="SCDQ" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="容器类别" prop="rongqileibie">
<el-select v-model="param.rongqileibie" filterable allow-create default-first-option style="width: 100%;">
<el-option label="Ⅰ" value="Ⅰ" />
<el-option label="Ⅱ" value="Ⅱ" />
<el-option label="Ⅲ" value="Ⅲ" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设备代码" prop="shebeidaima">
<el-input v-model="ysjl.shebeidaima" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="单位内编号" prop="danweineibubianhao">
<el-input v-model="ysjl.danweineibubianhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用登记证编号" prop="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备品种" prop="shebeipinzhong">
<el-select v-model="ysjl.shebeipinzhong" style="width: 232px;" filterable allow-create default-first-option>
<el-option v-for="item in sbpzItems" :key="item.label" :label="item.label" :value="item.label" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="注册代码" prop="zhucedaima">
<el-input v-model="ysjl.zhucedaima" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" type="text" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="安装单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" type="text" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="使用单位" prop="shiyongdanwei">
<el-input v-model="ysjl.shiyongdanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="使用单位地址" prop="shiyongdanweiDizhi">
<el-input v-model="ysjl.shiyongdanweiDizhi" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="设备使用地点" prop="anzhuangdidian">
<el-input v-model="ysjl.anzhuangdidian" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="使用单位统一社会信用代码" label-width="180px" prop="shiyongdanweiCode">
<el-input v-model="ysjl.shiyongdanweiCode" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="邮政编码" prop="shiyongdanweiYoubian">
<el-input v-model="ysjl.shiyongdanweiYoubian" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="安全管理人员" prop="anquanguanlirenyuan">
<el-input v-model="ysjl.anquanguanlirenyuan" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="联系电话" prop="anquanguanlidianhua">
<el-input v-model="ysjl.anquanguanlidianhua" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设计使用年限" prop="shejishiyongnianxian">
<el-input v-model="ysjl.shejishiyongnianxian" type="text" value="—" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="投入使用日期" prop="touyongriqi">
<el-input v-model="ysjl.touyongriqi" type="text" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="主体结构型式" prop="zhutijiegouxingshi">
<el-input v-model="param.zhutijiegouxingshi" type="text" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="运行状态" prop="yunxingzhuangtai">
<el-input v-model="param.yunxingzhuangtai" type="input" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="容积(换热面积)" prop="rongji">
<el-input v-model="param.rongji" type="text" style="width: 120%;" disabled>
<template slot="append">
m³(m²)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="内径" prop="neijing">
<el-input v-model="param.neijing" type="text" style="width: 120%;" disabled>
<template slot="append">
(mm)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设计压力" prop="shejiyali">
<el-input v-model="param.shejiyali" type="text" style="width: 120%;" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设计温度" prop="shejiwendu">
<el-input v-model="param.shejiwendu" type="text" style="width: 120%;" disabled>
<template slot="append">
(℃)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="使用压力" prop="shiyongyali">
<el-input v-model="param.shiyongyali" type="text" style="width: 120%;" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用温度" prop="shiyongwendu">
<el-input v-model="param.shiyongwendu" type="text" style="width: 120%;" disabled>
<template slot="append">
(℃)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="工作介质" prop="gongzuojiezhi">
<el-input v-model="param.gongzuojiezhi" type="text" style="width: 107%;" disabled />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>允许监控使用参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="压力" prop="yali">
<el-input v-model="param.yali" type="text">
<template slot="append">
(MPa)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="温度" prop="wendu">
<el-input v-model="param.wendu" type="text" disabled>
<template slot="append">
(℃)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="介质" prop="jiezhi">
<el-input v-model="param.jiezhi" type="text" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="其他" prop="qita">
<el-input v-model="param.qita" type="text" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>检验信息</legend>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验依据" prop="jianyanyiju">
<el-input v-model="ysjl.jianyanyiju" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18" style="height: 90px">
<el-form-item label="问题及其处理" prop="wentijizai">
<el-input
v-model="param.wentijizai"
:rows="3"
type="textarea"
placeholder="[检验发现的缺陷位置、性质、程度及处理意见(必要时附图或者附页,也可以直接注明见某项记录)]"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="height: 60px;">
<el-col :span="18">
<el-form-item label="检验检测用设备" prop="gsjyyqsb">
<el-input v-model="param.gsjyyqsb" :autosize="{ minRows: 2, maxRows: 4}" type="textarea" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验结论" prop="jianyanjielun">
<el-select v-model="ysjl.jianyanjielun" :disabled="edit" placeholder="请选择" style="width: 100%;" :change="changeZlscjg()">
<el-option label="符合要求" value="符合要求" />
<el-option label="基本符合要求" value="基本符合要求" />
<el-option label="不符合要求" value="不符合要求" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="安全状况等级" prop="anquanzhuangkuangdengji">
<el-select v-model="ysjl.anquanzhuangkuangdengji" filterable allow-create default-first-option style="width: 230px;">
<el-option label="1级" value="1级" />
<el-option label="2级" value="2级" />
<el-option label="3级" value="3级" />
<el-option label="4级" value="4级" />
<el-option label="5级" value="5级" />
<el-option label="—" value="—" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验开始日期" prop="jianyankaishiriqi">
<el-date-picker v-model="ysjl.jianyankaishiriqi" type="date" placeholder="选择日期" style="width: 100%;" value-format="yyyy-MM-dd" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验结束日期" prop="jianyanjieshuriqi">
<el-date-picker v-model="ysjl.jianyanjieshuriqi" type="date" placeholder="选择日期" style="width: 100%;" value-format="yyyy-MM-dd" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="下次定期检验日期" label-width="150px" prop="xiacijianyanriqi">
<el-input v-if="ysjl.jianyanjielun === '不符合要求'" v-model="ysjl.xiacijianyanriqishuoming" type="text" disabled="true" />
<el-date-picker v-else v-model="ysjl.xiacijianyanriqi" type="date" placeholder="选择日期" style="width: 100%;" value-format="yyyy-MM-dd" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="选择科室" prop="departmentId">
<el-cascader
v-model="ysjl.departmentId"
:options="departmemtArr"
:props="{ value: 'id', label: 'name', checkStrictly: true }"
:show-all-levels="false"
@change="handleChange"
/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="9">
<el-form-item label="检验人员" prop="jianyanrenyuan">
<el-input v-model="jianyanrenyuan" disabled />
<el-input v-show="false" v-model="ysjl.jianyanrenyuan" />
</el-form-item>
</el-col>
<el-col v-if="state !== 'bgView'" :span="9">
<sign-name :ysjl="ysjl" :jianyanrenyuan="jianyanrenyuan" :disabled="edit" @setSignValue="singNameValue" />
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12" style="height: 90px">
<el-form-item label="说明" prop="shuoming">
<el-input v-model="param.shuoming" :rows="3" type="textarea" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-alert title="如无需说明的内容,则无需填写,系统自动生成注册代码" type="info" :closable="false" />
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="压力容器定期检验记录附页" name="second">
<el-table :data="bgfyData" border stripe style="width:80%">
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" prop="jianyanxiang" label="检验项目" />
<el-table-column align="center" prop="jianyanjieguo" label="检验结果">
<template slot-scope="scope">
<el-select v-model="scope.row.jianyanjieguo" :disabled="edit" filterable allow-create default-first-option placeholder="请选择" style="width: 100%;">
<el-option label="发现问题" value="发现问题" />
<el-option label="未发现问题" value="未发现问题" />
<el-option label="—" value="-" />
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="beizhu" label="说明">
<template slot-scope="scope">
<el-input v-model="scope.row.beizhu" :disabled="edit" name="fyBeizhu" placeholder="请输入内容" />
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="资料审查记录" name="third">
<el-form ref="param" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>基本信息</legend>
<el-row :gutter="20">
<el-col v-if="state === 'create' || !ysjl.jilubianhao" :span="13">
<el-form-item label="记录编号">
<el-input v-model="jlbh1" style="width:80px" disabled />
<el-input v-model="jlbh2" style="width:80px" disabled />-
<el-input v-model="jlbh3" style="width:120px" @blur="judgeRepeat(jlbh1 + jlbh2 + '-' + jlbh3, ysjl.id)" />
</el-form-item>
</el-col>
<el-col v-else :span="9">
<el-form-item label="记录编号" prop="jilubianhao">
<el-input v-model="ysjl.jilubianhao" :disabled="edit" @blur="judgeRepeat(ysjl.jilubianhao, ysjl.id)" />
</el-form-item>
</el-col>
<el-col v-if="isRepeat" :span="2">
<span style="color:red">编号重复</span>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="设计单位" prop="shejidanwei">
<el-input v-model="ysjl.shejidanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设计日期" prop="shejiriqi">
<el-input v-model="ysjl.shejiriqi" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品标准" prop="chanpinbiaozhun">
<el-input v-model="param.chanpinbiaozhun" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="容器图号" prop="rongqituhao">
<el-input v-model="param.rongqituhao" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="设计使用年限" prop="shejishiyongnianxian">
<el-autocomplete v-model="ysjl.shejishiyongnianxian" :fetch-suggestions="querySearchSjsynx" :disabled="edit" style="width: 232px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="制造单位" prop="zhizaodanwei">
<el-input v-model="ysjl.zhizaodanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="制造日期" prop="zhizaoriqi">
<el-input v-model="ysjl.zhizaoriqi" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="产品编号" prop="chanpinbianhao">
<el-input v-model="ysjl.chanpinbianhao" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="安装单位" prop="shigongdanwei">
<el-input v-model="ysjl.shigongdanwei" type="text" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="设备代码" prop="shebeidaima">
<el-input v-model="ysjl.shebeidaima" type="text" disabled />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="使用登记证编号" prop="shiyongdengjibianhao">
<el-input v-model="ysjl.shiyongdengjibianhao" type="text" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="投入使用日期" prop="">
<el-input v-model="ysjl.touyongriqi" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="登记机关" prop="dengjijiguan">
<el-autocomplete v-model="ysjl.dengjijiguan" class="inline-input" :fetch-suggestions="querySearchDjjgOption" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="检验金额(元)" prop="jianyanheding">
<el-input-number v-model="ysjl.jianyanheding" :disabled="ysjl.retreatState === 2 && ysjl.jfState !== null && ysjl.jfState" :controls="false" style="width: 100%;" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>结构型式</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="主体结构型式" prop="zhutijiegouxingshi">
<el-select v-model="param.zhutijiegouxingshi" filterable allow-create default-first-option placeholder="请选择" style="width: 100%;">
<el-option label="单层" value="单层" />
<el-option label="夹套" value="夹套" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="安装型式" prop="anzhuangxingshi">
<el-select v-model="param.anzhuangxingshi" filterable allow-create default-first-option placeholder="请选择" style="width: 100%;">
<el-option label="立式" value="立式" />
<el-option label="卧式" value="卧式" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="支座型式" prop="zhizuoxingshi">
<el-select v-model="param.zhizuoxingshi" filterable allow-create default-first-option placeholder="请选择" style="width:232px">
<el-option label="鞍式" value="鞍式" />
<el-option label="腿式" value="腿式" />
<el-option label="耳式" value="耳式" />
<el-option label="支承" value="支承" />
<el-option label="裙座" value="裙座" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="保温绝热方式" prop="baowenjuerefangshi">
<el-select v-model="param.baowenjuerefangshi" filterable allow-create default-first-option placeholder="请选择" style="width:232px">
<el-option label="无" value="无" />
<el-option label="包覆式" value="包覆式" />
<el-option label="真空粉末" value="真空粉末" />
</el-select>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>性能参数</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="容积(换热面积)" label-width="150px" prop="rongji">
<el-input v-model="param.rongji" type="text">
<template slot="append">
m³(m²)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="容器内径" prop="neijing">
<el-input v-model="param.neijing" type="text">
<template slot="append">
(mm)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="高/长" prop="gao">
<el-input v-model="param.gao">
<template slot="append">
(mm)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="最大允许充装量" prop="zuidachongzhuangliang">
<el-input v-model="param.zuidachongzhuangliang" type="text">
<template slot="append">
(kg)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="装量系数" prop="zuidachongzhuangxishu">
<el-input v-model="param.zuidachongzhuangxishu" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="腐蚀裕量" prop="fushiyudu">
<el-input v-model="param.fushiyudu" type="text">
<template slot="append">
(mm)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :space="9">
<el-form-item label="壳体/壳程" prop="">
<el-switch v-model="param.keti" active-text="壳体" inactive-text="壳程" active-value="壳体" inactive-value="壳程" @change="editStatus" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="26">
<el-col :span="8">
<el-form-item label="设计压力" prop="shejiyaliketi" label-width="100px">
<label style="width:10px;color:red;">{{ param.keti }}&nbsp;</label>
<el-input v-model="param.shejiyaliketi" type="text" style="width: 80%;" @change="sjylChange">
<template slot="append">
(MPa)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="夹套" prop="shejiyalijiatao" label-width="100px">
<el-input v-model="param.shejiyalijiatao" style="width: 55%;" @change="sjylChange" /><el-select v-model="param.shejiyalidanwei" style="width: 45%;" @change="sjylChange">
<el-option label="Pa" value="Pa" />
<el-option label="MPa" value="MPa" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="管程" prop="shejiyaliguancheng" label-width="100px">
<el-input v-model="param.shejiyaliguancheng" @change="sjylChange">
<template slot="append">
(MPa)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="26">
<el-col :span="8">
<el-form-item label="工作压力" prop="gongzuoyaliketi" label-width="100px">
<label style="width:10px;color:red;">{{ param.keti }}&nbsp;</label>
<el-input v-model="param.gongzuoyaliketi" type="text" style="width: 80%;" @change="gzylChange">
<template slot="append">
(MPa)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="夹套" prop="gongzuoyalijiatao" label-width="100px">
<el-input v-model="param.gongzuoyalijiatao" type="text" style="width: 55%;" @change="gzylChange" /><el-select v-model="param.gongzuoyalidanwei" style="width: 45%;" @change="gzylChange">
<el-option label="Pa" value="Pa" />
<el-option label="MPa" value="MPa" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="管程" prop="gongzuoyaliguancheng" label-width="100px">
<el-input v-model="param.gongzuoyaliguancheng" type="text" @change="gzylChange">
<template slot="append">
(MPa)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="26">
<el-col :span="8">
<el-form-item label="设计温度" prop="shejiwenduketi" label-width="100px">
<label style="width:10px;color:red;">{{ param.keti }}&nbsp;</label>
<el-input v-model="param.shejiwenduketi" type="text" style="width: 80%;" @change="sjwdChange">
<template slot="append">
(℃)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="夹套" prop="shejiwendujiatao" label-width="100px">
<el-input v-model="param.shejiwendujiatao" type="text" @change="sjwdChange">
<template slot="append">
(℃)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="管程" prop="shejiwenduguancheng" label-width="100px">
<el-input v-model="param.shejiwenduguancheng" type="text" @change="sjwdChange">
<template slot="append">
(℃)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="26">
<el-col :span="8">
<el-form-item label="工作温度" prop="gongzuowenduketi" label-width="100px">
<label style="width:10px;color:red;">{{ param.keti }}&nbsp;</label>
<el-input v-model="param.gongzuowenduketi" type="text" style="width: 80%;" @change="gzwdChange">
<template slot="append">
(℃)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="夹套" prop="gongzuowendujiatao" label-width="100px">
<el-input v-model="param.gongzuowendujiatao" type="text" @change="gzwdChange">
<template slot="append">
(℃)
</template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="管程" prop="gongzuowenduguancheng" label-width="100px">
<el-input v-model="param.gongzuowenduguancheng" type="text" @change="gzwdChange">
<template slot="append">
(℃)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="26">
<el-col :span="8">
<el-form-item label="介质" prop="jiezhiketi" label-width="100px">
<label style="width:10px;color:red;">{{ param.keti }}&nbsp;</label>
<el-input v-model="param.jiezhiketi" type="text" style="width: 80%;" @change="jzChange" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="夹套" prop="jiezhijiatao" label-width="100px">
<el-input v-model="param.jiezhijiatao" type="text" @change="jzChange" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="管程" prop="jiezhiguancheng" label-width="100px">
<el-input v-model="param.jiezhiguancheng" type="text" @change="jzChange" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="材质-筒体" prop="caizhitongti">
<el-select v-model="param.caizhitongti" filterable allow-create default-first-option placeholder="请选择" style="width: 100%;">
<el-option label="20R" value="20R" />
<el-option label="16MnR" value="16MnR" />
<el-option label="Q235B" value="Q235B" />
<el-option label="Q345R" value="Q345R" />
<el-option label="0Cr18Ni9" value="0Cr18Ni9" />
<el-option label="X5CrNi18-10" value="X5CrNi18-10" />
<el-option label="06Cr19Ni10" value="06Cr19Ni10" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="厚度-筒体" prop="houdutongti">
<el-input v-model="param.houdutongti" type="text">
<template slot="append">
(mm)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="材质-封头" prop="caizhifengtou">
<el-select v-model="param.caizhifengtou" filterable allow-create default-first-option placeholder="请选择" style="width: 100%;">
<el-option label="20R" value="20R" />
<el-option label="16MnR" value="16MnR" />
<el-option label="Q235B" value="Q235B" />
<el-option label="Q345R" value="Q345R" />
<el-option label="0Cr18Ni9" value="0Cr18Ni9" />
<el-option label="X5CrNi18-10" value="X5CrNi18-10" />
<el-option label="06Cr19Ni10" value="06Cr19Ni10" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="厚度-封头" prop="houdufengtou">
<el-input v-model="param.houdufengtou" type="text">
<template slot="append">
(mm)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="材质 夹套" prop="caizhijiatao">
<el-select v-model="param.caizhijiatao" filterable allow-create default-first-option placeholder="请选择" style="width: 100%;">
<el-option label="20R" value="20R" />
<el-option label="16MnR" value="16MnR" />
<el-option label="Q235B" value="Q235B" />
<el-option label="Q345R" value="Q345R" />
<el-option label="0Cr18Ni9" value="0Cr18Ni9" />
<el-option label="X5CrNi18-10" value="X5CrNi18-10" />
<el-option label="06Cr19Ni10" value="06Cr19Ni10" />
<el-option label="无此项" value="无此项" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="厚度 夹套" prop="houdujiatao">
<el-input v-model="param.houdujiatao" type="text">
<template slot="append">
(mm)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="材质 换热管" prop="caizhihuanreguan">
<el-select v-model="param.caizhihuanreguan" filterable allow-create default-first-option placeholder="请选择" style="width: 100%;">
<el-option label="20R" value="20R" />
<el-option label="16MnR" value="16MnR" />
<el-option label="Q235B" value="Q235B" />
<el-option label="Q345R" value="Q345R" />
<el-option label="0Cr18Ni9" value="0Cr18Ni9" />
<el-option label="X5CrNi18-10" value="X5CrNi18-10" />
<el-option label="06Cr19Ni10" value="06Cr19Ni10" />
<el-option label="无此项" value="无此项" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="厚度 换热管" prop="houduhuanreguan">
<el-input v-model="param.houduhuanreguan" type="text">
<template slot="append">
(mm)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="材质-衬里" prop="caizhichenli">
<el-input v-model="param.caizhichenli" type="text" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="厚度-衬里" prop="houduchenli">
<el-input v-model="param.houduchenli" type="text">
<template slot="append">
(mm)
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>资料审查情况</legend>
<el-row :gutter="20">
<el-col :span="18" style="height: 90px;">
<el-form-item label="资料审查情况" prop="ziliaoshenchaqingkuang">
<el-input
v-model="param.ziliaoshenchaqingkuang"
:rows="3"
type="textarea"
placeholder="(可以参照宏观检验报告格式列出资料审查项目和内容、审查结果和备注等栏目,也可以直接表述审查发现的问题项目和内容及其问题和变更情况)"
/>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<fieldset>
<legend>上次定期检验问题记载</legend>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="报告编号" prop="shangcibaogaobianhao">
<el-input v-model="param.shangcibaogaobianhao" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="检验日期" prop="shangcijianyanriqi">
<el-input v-model="param.shangcijianyanriqi" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="壁厚测定最小值-筒体" label-width="170px" prop="shangcibihoutongti">
<el-input v-model="param.shangcibihoutongti" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="壁厚测定最小值-封头" label-width="170px" prop="shangcibihoufengtou">
<el-input v-model="param.shangcibihoufengtou" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="无损检测项目及结果-MT" label-width="180px" prop="mt">
<el-autocomplete v-model="param.mt" :fetch-suggestions="querySearchJyxmOption" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="无损检测项目及结果-PT" label-width="180px" prop="pt">
<el-autocomplete v-model="param.pt" :fetch-suggestions="querySearchJyxmOption" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="9">
<el-form-item label="无损检测项目及结果-UT" label-width="180px" prop="ut">
<el-autocomplete v-model="param.ut" :fetch-suggestions="querySearchJyxmOption" :disabled="edit" />
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="无损检测项目及结果-RT" label-width="180px" prop="rt">
<el-autocomplete v-model="param.rt" :fetch-suggestions="querySearchJyxmOption" :disabled="edit" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="安全等级评为" prop="shangcianquandengji">
<el-select v-model="param.shangcianquandengji" filterable allow-create default-first-option style="width: 230px;">
<el-option label="1级" value="1级" />
<el-option label="2级" value="2级" />
<el-option label="3级" value="3级" />
<el-option label="4级" value="4级" />
<el-option label="5级" value="5级" />
<el-option label="—" value="—" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="上次定期检验其他问题记载" prop="shangciwentijizai" label-width="180px">
<el-input v-model="param.shangciwentijizai" type="textarea" />
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-form>
</el-tab-pane>
<el-tab-pane label="压力容器宏观检验记录" name="forth">
<el-form ref="" class="el-form" label-position="right" label-width="130px">
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="检验结果" prop="hgjianyanjieguo">
<el-input v-model="param.jianyanjieguo" :onblur="changeHgjg()" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="18">
<el-form-item label="备注(原始记录)" prop="hgjybeizhu">
<el-input v-model="param.hgjybeizhu" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table :data="hgjlData" :span-method="tableJs.mergeColRows" stripe style="width:80%">
<el-table-column type="index" align="center" width="50" label="序号" />
<el-table-column align="center" label="检验项目">
<el-table-column align="center" prop="jianyanxiang" label="检验项" />
<el-table-column align="center" prop="jianyanneirong" label="检验内容" />
</el-table-column>
<el-table-column align="center" prop="jianyanjieguo" label="检查结果" width="300">
<template slot-scope="scope">
<el-autocomplete v-model="scope.row.jianyanjieguo" class="inline-input" :fetch-suggestions="querySearch" />
</template>
</el-table-column>
<el-table-column align="center" prop="beizhu" label="备注">
<template slot-scope="scope">
<el-input v-model="scope.row.beizhu" :disabled="edit" name="hgjlBeizhu" placeholder="请输入内容" />
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="压力容器检测示意图" name="fifth">
<el-form ref="ysjl" :model="ysjl" class="el-form" label-position="right" label-width="130px">
<fieldset>
<legend>原始示意图</legend>
<span v-if="state === 'create'" style="color: red;font-size: 26px;">请在原始记录保存后上传示意图</span>
<pictureUpload v-else ref="picture1" :info="sytInfo" @changed="changed1" />
</fieldset>
<fieldset>
<legend>报告示意图</legend>
<span v-if="state === 'create'" style="color: red;font-size: 26px;">请在原始记录保存后上传示意图</span>
<pictureUpload v-else ref="picture2" :info="sytInfo" @changed="changed2" />
</fieldset>
</el-form>
</el-tab-pane>
<!-- <el-tab-pane label="压力容器原始资料" name="sixth">
<SliceUpload :renwu-id="ysjl.renwuId ? Number(ysjl.renwuId) : Number($route.query.renwuId)" :drag="true" />
</el-tab-pane> -->
</el-tabs>
<el-dialog :visible.sync="jyfaDialogVisible" title="添加检验方案" width="600px">
<jyfa ref="jyfa" :info="info" @childMethod="getJyxm" />
</el-dialog>
<el-dialog :visible.sync="similarVisible" title="同类报告查看" width="800px" @close="closeJyfaDialog">
<el-table ref="similarTable" :data="similarTableData" border style="width: 100%;" height="350">
<el-table-column align="center" label="报告类型" prop="bglx" min-width="50" />
<el-table-column align="left" label="检验项目" prop="jyxmLabel" width="200">
<template slot-scope="scope">
<div style="text-decoration:underline;cursor:pointer;" @click="editChild(scope.row.id, scope.row.jianyanxiangmu, departmentId)">
{{ scope.row.jyxmLabel }}
</div>
</template>
</el-table-column>
<el-table-column align="center" label="处理人" prop="renlingren" min-width="40" />
<el-table-column align="center" label="检验人员" prop="jianyanrenyuan" min-width="40" />
<el-table-column align="center" label="办结状态" prop="flowstatus" min-width="30">
<template slot-scope="scope">
<el-tag v-if="scope.row.flowstatus==='未办结'" type="danger">
未办结
</el-tag>
<el-tag v-if="scope.row.flowstatus==='已办结'" type="success">
已办结
</el-tag>
</template>
</el-table-column>
<el-table-column property="" label="操作" align="center" width="95">
<template slot-scope="scope">
<el-button type="primary" size="mini" title="删除检验方案" circle icon="el-icon-delete" @click="delYsjl(scope.row.jianyanxiangmu, scope.row.jyxmLabel, scope.row.bglx, scope.row.id)" />
<el-button v-if="scope.row.flowstatus === '未办结' && scope.row.bglx === '分项检测'" type="primary" size="mini" title="办结" circle icon="el-icon-check" @click="bjYsjl(scope.row.id, '1')" />
<el-button v-else-if="scope.row.flowstatus === '已办结' && scope.row.bglx === '分项检测'" type="primary" size="mini" title="取消办结" circle icon="el-icon-close" @click="bjYsjl(scope.row.id, '0')" />
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import Sticky from '@/components/Sticky'
import jyfa from '../../../../addJyfa'
import SignName from '@/views/common/SignName'
import Utils from '@/utils/contact'
import pictureUpload from '@/components/Upload'
// import SliceUpload from '@/components/SliceUpload'
// import Symbols from '@/views/common/Symbols'
import { getDepartmentTreeList } from '@/api/common'
export default {
name: 'RqDjYsjl',
components: { SignName, Sticky, jyfa, pictureUpload },
data() {
return {
// 预定义值
edit: false, // 页面编辑状态
sbpzItems: [{ label: '储存' }, { label: '分离' },
{ label: '反应' }, { label: '换热' }], // 设备品种数组
jiatao: '夹套',
guancheng: '管程',
// 压力容器宏观检验记录
hgjlData: [],
bgfyData: [], // 压力容器定期检验记录附页
pdjgData: [], // 安全状况等级评定结果
jlbh1: 'RD',
jlbh2: '(' + new Date().getFullYear() + ')',
jlbh3: '',
// 检验人员
jianyanrenyuan: '',
// 检验方案
jyfaDialogVisible: false,
defaultParam: {
gsjyhjtj: '',
yangpintexing: '',
huanjingtiaojian: ''
},
// 接收传入该页面的值
// 页面状态 {create=> 创建,update=> 更新}
state: this.$route.query.state,
ysjl: {},
departmentId: this.$route.query.departmentId,
departmemtArr: [],
param: {},
checkedTab: 'third',
// 表格合并相关
// 参与列合并的字段,在这里增加即可
cols: [
{
name: 'jianyanxiang', // 参与计算的列名,必须和el-table-column prop=''值一致
getValue(row) { // 该列用于比较的值的获取方法
return row.jianyanxiang
}
}
],
// 参与行内合并的字段
rows: [
{
name: 'jianyanxiang',
getValue(row) {
return row.jianyanxiang
}
}
],
info: {
modelId: this.$route.query.templateId,
sbzldm: this.$route.query.sbzldm,
sblbdm: this.$route.query.sblbdm,
ysjlId: this.$route.query.id,
departmentId: this.$route.query.departmentId,
jylb: this.$route.query.jylb,
nblb: this.$route.query.neibuleibie,
type: 'YSJL'
},
similarVisible: false,
similarTableData: [],
isptx: true, // 主体结构型式是否为普通型,默认是普通型
isRepeat: false,
checkAll: false,
sytYsjl: {},
sytParam: {},
sytInfo: {
ysjlId: 0,
jyxm: 'dxt',
flowstatus: 4
},
fileList1: [],
fileList2: [],
jyxmOption: [{ value: 'Ⅰ级' }, { value: '无' }, { value: '无此项' }],
jianyanjieguo: [{ value: '√' }, { value: '×' }, { value: '无此项' }, { value: '—' }, { value: '未检验' }],
shejishiyongnianxian: [{ value: '资料未提供' }],
updFyjgCount: 0,
djjgs: []
}
},
// 页面创建后执行
created() {
if (this.state === 'create') {
this.initYsjl()
} else {
this.ysjl.id = this.$route.params.id
this.getYsjl()
this.getParam()
this.getSytInfoData()
}
// 1=> 宏观
const jyxmtable = [1, 2]
for (let i = 0; i < jyxmtable.length; i++) {
this.getJyxm(jyxmtable[i])
}
// 获取区划
this.getArea()
this.getDepartmentArr()
},
mounted() {
// 下面的监听事件的名字由于需要添加主原始记录的主键,所以暂不生成监听事件,保存后会刷新页面会执行下面的监听事件
if (this.state === 'create') {
return
}
// 此处所包括的方法中均不可以使用this.$route的属性,因为在别的路由下,此处调用的是当前路由,而不是原本的路由
// 如果页面路由x1,我在路由x2页面调用x1页面的方法,此时拿到的属性是x2路由的属性!
const that = this
this.common.$on('modifyMajorInspectionItemBySub' + this.ysjl.id, function() {
that.getJyxm(1)
})
this.common.$on('JyfaInfo' + this.ysjl.id, function() {
that.getJyfaInfo()
})
},
methods: {
getDepartmentArr() {
getDepartmentTreeList().then(res => {
this.departmemtArr = res
})
},
handleChange(v) {
this.ysjl.departmentId = v[1]
},
initYsjl() {
this.api({
url: '/ysjl/initYsjl',
method: 'post',
data: {
templateId: this.$route.query.templateId,
renwuId: this.$route.query.renwuId,
neibuleibie: this.$route.query.neibuleibie,
sblbdm: this.$route.query.sblbdm,
sblbmc: this.$route.query.sblbmc,
sbpzdm: this.$route.query.sbpzdm,
sbpzmc: this.$route.query.sbpzmc
}
}).then(data => {
this.ysjl = data.ysjl
this.departmentId = this.ysjl.departmentId
this.param = data.param ? data.param : {}
// // 设置初始值
// const tempTime = new Date()
// this.ysjl.jianyankaishiriqi = tempTime
// this.ysjl.jianyanjieshuriqi = tempTime
// let xcjyrq = (tempTime.getFullYear() + 2) + '-' + (tempTime.getMonth() + 1) + '-' + tempTime.getDate()
// xcjyrq = new Date(xcjyrq)
// this.ysjl.xiacijianyanriqi = xcjyrq.setDate(xcjyrq.getDate() - 1)
this.ysjl.xiacijianyanriqishuoming = '/'
this.$set(this.ysjl, 'shebeipinzhong', '储存')
this.$set(this.ysjl, 'jianyanjielun', '符合要求')
this.$set(this.ysjl, 'anquanzhuangkuangdengji', '1级')
this.changeNblb(this.ysjl.neibuleibie)
const tempParam = {
rongqileibie: 'Ⅰ',
zhutijiegouxingshi: '单层',
anzhuangxingshi: '立式',
zhizuoxingshi: '鞍式',
baowenjuerefangshi: '无',
shangcianquandengji: '1级',
yunxingzhuangtai: '自用/生产/长期使用',
shangciwentijizai: '无',
jianyanjieguo: '合格',
keti: '壳体',
jiatao: '夹套',
gsjyhjtj: '☑符合 □不符合',
yangpintexing: '☑受检设备处于运行状态 □受检设备处于停止状态',
huanjingtiaojian: '☑满足检测条件要求; □不满足检测条件要求。',
chanpinbiaozhun: 'GB150-2011',
bhcd: '□壁厚测定 ☑无此项',
cfjc: '□MT ☑无此项',
csjc: '□UT ☑无此项',
stjc: '□PT ☑无此项',
zkdjc: '□真空度检测 ☑无此项',
ydjc: '□硬度检测 ☑无此项',
tbl: '□搪玻璃层检测 ☑无此项',
mt: this.ysjl.neibuleibie === 'DQ' ? '无' : '无此项',
pt: this.ysjl.neibuleibie === 'DQ' ? '无' : '无此项',
ut: this.ysjl.neibuleibie === 'DQ' ? '无' : '无此项',
rt: this.ysjl.neibuleibie === 'DQ' ? '无' : '无此项',
shiyongdanweiYoubian: '250000',
gsjyyqsb: '焊接检验尺,仪器编号: 卷尺,仪器编号: 钢直尺,仪器编号:',
gongzuoyaliketi: '≤',
gongzuowenduketi: '≤',
shejiyalidanwei: 'MPa',
gongzuoyalidanwei: 'MPa',
zuidachongzhuangliang: '无此项',
zuidachongzhuangxishu: '无此项',
hgjybeizhu: '无',
caizhijiatao: '无此项',
caizhihuanreguan: '无此项',
caizhichenli: '无此项',
houdujiatao: '无此项',
houduhuanreguan: '无此项',
houduchenli: '无此项',
shejiyalijiatao: '无此项',
shejiyaliguancheng: '无此项',
gongzuoyalijiatao: '无此项',
gongzuoyaliguancheng: '无此项',
shejiwendujiatao: '无此项',
shejiwenduguancheng: '无此项',
gongzuowendujiatao: '无此项',
gongzuowenduguancheng: '无此项',
jiezhijiatao: '无此项',
jiezhiguancheng: '无此项',
shangcibihoutongti: 'mm',
shangcibihoufengtou: 'mm',
ziliaoshenchaqingkuang: '有产品质量证明书、产品合格证、制造监督检验证书、竣工图、强度计算书、年度检查报告。原始资料中筒体计算厚度:mm,封头计算厚度:mm。'
}
for (const field in tempParam) {
// 如果参数中该字段不存在数据,则将默认值写入
if (!this.param[field]) {
this.$set(this.param, field, tempParam[field])
}
}
this.$set(this.param, 'shuoming', '无')
this.$set(this.param, 'wentijizai', '无')
this.param.qita = '无'
// 避免提取的数据中带有类字
this.param.rongqileibie = this.param.rongqileibie.replace('类', '')
this.sjylChange()
this.gzylChange()
this.sjwdChange()
this.gzwdChange()
this.jzChange()
this.getMaxBh()
})
},
getYsjl() {
this.api({
url: '/ysjl',
method: 'get',
params: {
ysjlId: this.$route.query.id
}
}).then(data => {
this.ysjl = data
this.departmentId = this.ysjl.departmentId
if (this.ysjl.jianyanrenyuan) {
this.jianyanrenyuan = this.common.convertCnName(this.ysjl.jianyanrenyuan)
}
// 查询最大记录编号
if (this.ysjl.jilubianhao) {
this.judgeRepeat(this.ysjl.jilubianhao, this.ysjl.id)
} else {
this.getMaxBh()
}
})
},
getParam() {
// 根据原始记录id查询参数
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: { ysjlId: this.$route.params.id, sbzldm: this.$route.query.sbzldm }
}).then(data => {
this.param = data
// 设计压力反写
this.param.shejiyali ? this.sjylChange() : this.param.shejiyali
// 工作压力反写
this.param.shiyongyali ? this.gzylChange() : this.param.shiyongyali
// 设计温度反写
this.param.shejiwendu ? this.sjwdChange() : this.param.shejiwendu
// 工作温度反写
this.param.shiyongwendu ? this.gzwdChange() : this.param.shiyongwendu
// 介质反写
this.param.gongzuojiezhi ? this.jzChange() : this.param.gongzuojiezhi
})
},
updFyjg() {
this.api({
url: '/ysjl/updFyjg',
method: 'get',
params: {
id: this.ysjl.id
}
}).then(() => {
this.updFyjgCount = 1
this.getJyxm(1)
})
},
// 签名方法
singNameValue(data) {
this.jianyanrenyuan = data.name
this.ysjl.jianyanrenyuan = data.id
if (this.state !== 'create') {
this.common.signName(this.ysjl.id, this.ysjl.jianyanrenyuan)
Utils.$emit('ysjl-list')
}
},
querySearch(queryString, cb) {
// var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
// 调用 callback 返回建议列表的数据
cb(this.jianyanjieguo)
},
querySearchJyxmOption(queryString, cb) {
// const results = queryString ? this.jyxmOption.filter(this.createFilter(queryString)) : this.jyxmOption
cb(this.jyxmOption)
},
querySearchSjsynx(queryString, cb) {
cb(this.shejishiyongnianxian)
},
// createFilter(queryString) {
// return (restaurant) => {
// return (restaurant.value.indexOf(queryString) === 0)
// }
// },
// 资料审查记录反写检验结论页
// 设计压力反写
sjylChange() {
if (this.param.shejiyalidanwei === 'Pa') {
this.param.shejiyali = (this.judgeNull(this.param.shejiyaliketi) ? '' : this.param.keti + ':' + this.param.shejiyaliketi + 'MPa ') + (this.judgeNullAndWcx(this.param.shejiyalijiatao) ? '' : this.jiatao + ':' + this.param.shejiyalijiatao + 'Pa ') + (this.judgeNullAndWcx(this.param.shejiyaliguancheng) ? '' : this.guancheng + ':' + this.param.shejiyaliguancheng + 'MPa')
} else {
this.param.shejiyali = (this.judgeNull(this.param.shejiyaliketi) ? '' : this.param.keti + ':' + this.param.shejiyaliketi + ' ') + (this.judgeNullAndWcx(this.param.shejiyalijiatao) ? '' : this.jiatao + ':' + this.param.shejiyalijiatao + ' ') + (this.judgeNullAndWcx(this.param.shejiyaliguancheng) ? '' : this.guancheng + ':' + this.param.shejiyaliguancheng) + 'MPa'
}
},
// 工作压力反写
gzylChange() {
if (this.param.gongzuoyalidanwei === 'Pa') {
this.param.shiyongyali = (this.judgeNull(this.param.gongzuoyaliketi) ? '' : this.param.keti + ':' + this.param.gongzuoyaliketi + 'MPa ') + (this.judgeNullAndWcx(this.param.gongzuoyalijiatao) ? '' : this.jiatao + ':' + this.param.gongzuoyalijiatao + 'Pa ') + (this.judgeNullAndWcx(this.param.gongzuoyaliguancheng) ? '' : this.guancheng + ':' + this.param.gongzuoyaliguancheng + 'MPa')
} else {
this.param.shiyongyali = (this.judgeNull(this.param.gongzuoyaliketi) ? '' : this.param.keti + ':' + this.param.gongzuoyaliketi + ' ') + (this.judgeNullAndWcx(this.param.gongzuoyalijiatao) ? '' : this.jiatao + ':' + this.param.gongzuoyalijiatao + ' ') + (this.judgeNullAndWcx(this.param.gongzuoyaliguancheng) ? '' : this.guancheng + ':' + this.param.gongzuoyaliguancheng) + 'MPa'
}
},
// 设计温度反写
sjwdChange() {
this.param.shejiwendu = (this.judgeNull(this.param.shejiwenduketi) ? '' : this.param.keti + ':' + this.param.shejiwenduketi + ' ') + (this.judgeNullAndWcx(this.param.shejiwendujiatao) ? '' : this.jiatao + ':' + this.param.shejiwendujiatao + ' ') + (this.judgeNullAndWcx(this.param.shejiwenduguancheng) ? '' : this.guancheng + ':' + this.param.shejiwenduguancheng)
},
// 工作温度反写
gzwdChange() {
this.param.shiyongwendu = (this.judgeNull(this.param.gongzuowenduketi) ? '' : this.param.keti + ':' + this.param.gongzuowenduketi + ' ') + (this.judgeNullAndWcx(this.param.gongzuowendujiatao) ? '' : this.jiatao + ':' + this.param.gongzuowendujiatao + ' ') + (this.judgeNullAndWcx(this.param.gongzuowenduguancheng) ? '' : this.guancheng + ':' + this.param.gongzuowenduguancheng)
this.param.wendu = this.param.shiyongwendu
},
// 介质反写
jzChange() {
this.param.gongzuojiezhi = (this.judgeNull(this.param.jiezhiketi) ? '' : this.param.keti + ':' + this.param.jiezhiketi + ' ') + (this.judgeNullAndWcx(this.param.jiezhijiatao) ? '' : this.jiatao + ':' + this.param.jiezhijiatao + ' ') + (this.judgeNullAndWcx(this.param.jiezhiguancheng) ? '' : this.guancheng + ':' + this.param.jiezhiguancheng)
this.param.jiezhi = this.param.gongzuojiezhi
},
// 判断字符串是否为 无此项
judgeNull(str) {
if (!str || str.toString().replace(/(^s*)|(s*$)/g, '').length === 0) {
return true
} else {
return false
}
},
judgeNullAndWcx(str) {
if (!str || str.indexOf('无此项') !== -1) {
return true
} else {
return false
}
},
// 查询最大记录编号
getMaxBh() {
const aheadPart = this.jlbh1 + this.jlbh2 + '-'
this.api({
url: '/ysjl/gainCurrentBh',
method: 'get',
params: {
aheadPart: aheadPart,
hinderPart: ''
}
}).then(data => {
this.jlbh3 = data
this.judgeRepeat(aheadPart + this.jlbh3, this.ysjl.id)
})
},
// 查询检验项目
getJyxm(sort) {
let url = ''
let data = {}
if (this.state === 'create') {
url = '/jyxm/getCyJyxm'
data = {
templateId: this.$route.query.templateId,
order: sort
}
} else {
url = '/jyxm/getCyJyxmByYsjl'
data = {
ysjlId: this.ysjl.id,
templateId: this.$route.query.templateId,
isReport: false,
order: sort
}
}
this.api({
url: url,
method: 'get',
params: data
}).then(data => {
switch (sort) {
case 1:
if (this.ysjl.source === 'pad' && this.state !== 'create' && data.length && !this.updFyjgCount) {
this.updFyjg()
} else {
this.bgfyData = data
}
break
case 2:
this.hgjlData = data
break
case 3:
this.pdjgData = data
break
}
this.tableJs.getData(this.cols, this.rows, data)
})
},
// 获取表格中的id, 不为空的检验结果和备注
getProp: function(data) {
const retData = []
for (let i = 0; i < data.length; i++) {
const retRow = {}
retRow.id = data[i].id
if (data[i].jianyanjieguo !== '' && data[i].jianyanjieguo !== null && data[i].jianyanjieguo !== undefined) {
retRow.jianyanjieguo = data[i].jianyanjieguo
}
if (data[i].beizhu !== '' && data[i].beizhu !== null && data[i].beizhu !== undefined) {
retRow.beizhu = data[i].beizhu
}
retData.push(retRow)
}
return retData
},
saveYsjl: function(operation) {
if (this.ysjl.source === 'pad') {
this.updFyjg()
}
this.tableData = []
// 组装报告附页中的数据:第一项第二项默认选中,返回给后台id,jianyanxiang,checkType
const retData = []
for (let i = 0; i < this.bgfyData.length; i++) {
// 把检验项数组转换成字符串
const retRow = {}
retRow.id = this.bgfyData[i].id
if (this.bgfyData[i].jianyanxiang !== '' && this.bgfyData[i].jianyanxiang !== null && this.bgfyData[i].jianyanxiang !== undefined) {
retRow.jianyanxiang = this.bgfyData[i].jianyanxiang
}
if (this.bgfyData[i].checkType !== '' && this.bgfyData[i].checkType !== null && this.bgfyData[i].checkType !== undefined) {
retRow.checkType = this.bgfyData[i].checkType
}
if (this.bgfyData[i].jianyanjieguo !== '' && this.bgfyData[i].jianyanjieguo !== null && this.bgfyData[i].jianyanjieguo !== undefined) {
retRow.jianyanjieguo = this.bgfyData[i].jianyanjieguo
}
if (this.bgfyData[i].beizhu !== '' && this.bgfyData[i].beizhu !== null && this.bgfyData[i].beizhu !== undefined) {
retRow.beizhu = this.bgfyData[i].beizhu
}
retData.push(retRow)
}
this.tableData.push(retData)
this.tableData.push(this.getProp(this.hgjlData))
this.tableData.push(this.getProp(this.pdjgData))
let type = ''
if (operation === 'add') {
type = 'post'
this.ysjl.jilubianhao = this.jlbh1 + this.jlbh2 + '-' + this.jlbh3
this.ysjl.bglx = 1
this.ysjl.cjState = 'ysjl'
this.ysjl.jigouhezhunzhenghao = process.env.VUE_APP_HZZBH
this.ysjl.jlprintState = 0
this.save(operation, type)
} else if (operation === 'build') {
this.ysjl.baogaobianhao = this.ysjl.jilubianhao
if (this.ysjl.jilubianhao && this.ysjl.jilubianhao.indexOf('COPY') > -1) {
this.$message({
type: 'error',
message: '请先修改报告编号,不允许携带COPY标志生成报告!'
})
return false
}
if (this.ysjl.jianyanrenyuan === null || this.ysjl.jianyanrenyuan === '') {
this.$message({
type: 'error',
message: '请先签名再生成报告!'
})
return false
}
// 保存示意图
this.sytYsjl.flowstatus = 4
this.api({
url: '/fx',
method: 'put',
data: {
ysjl: this.sytYsjl,
jyxm: 'dxt',
fxObj: this.sytParam
}
}).then(() => {
// 判断分项原始记录是否办结
this.api({
url: '/ysjl/judgeState',
method: 'get',
params: {
ysjlIds: this.ysjl.id,
bglx: '2,3'
}
}).then(data => {
if (data === 0) {
this.$message.error('请先办结无损分项原始记录再生成报告!')
return false
} else {
type = 'put'
this.save(operation, type)
}
})
})
} else if (operation === 'upd') {
this.saveSyt()
type = 'put'
this.save(operation, type)
}
},
save(operation, type) {
// 判断报告编号是否重复
if (this.isRepeat) {
this.$message({ message: '记录编号重复,请先修改记录编号再保存', type: 'error' })
return false
} else {
this.$refs['ysjl'].validate(valid => {
if (valid) {
const jyxm = JSON.stringify(this.tableData)
this.api({
url: '/ysjl',
method: type,
data: {
ysjl: this.ysjl,
param: this.param,
cyJyxm: {
jyxm: jyxm,
bgjyxm: jyxm
}
}
}).then(data => {
// 刷新任务列表,原始记录待办,原始记录已办,检验报告
Utils.$emit('task-list')
Utils.$emit('ysjl-db-list')
if (operation === 'add') {
this.ysjl.id = data
this.param.ysjlId = data
this.$message({ message: '保存成功', type: 'success' })
this.createSyt(this.ysjl)
// 刷新路由网址
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
this.$router.push({
path: '/ysjl/2000/dj/edit/' + this.ysjl.id,
query: {
id: this.ysjl.id,
jyxm: this.ysjl.jianyanxiangmu,
departmentId: this.ysjl.departmentId,
jianyanrenyuan: this.ysjl.jianyanrenyuan,
state: 'update',
renwuId: this.ysjl.renwuId,
modelId: this.ysjl.modelId,
jylb: this.ysjl.jianyanleibie,
neibuleibie: this.ysjl.neibuleibie,
sbzldm: this.ysjl.shebeizhongleidaima,
sblbdm: this.ysjl.shebeileibiedaima,
sbpzdm: this.ysjl.shebeipinzhongdaima
}
})
} else if (operation === 'upd') {
this.$message({ message: '更新成功', type: 'success' })
} else {
// 修改16版任务状态
this.common.updRenwuState(this.ysjl.id, 2, true)
// 生成pdf
this.common.viewYsjlNoOpen(this.ysjl.id, 'YSJL')
Utils.$emit('ysjl-list')
Utils.$emit('ysjl-yb-list')
Utils.$emit('bggl-daiban-list')
this.$message({ message: '生成报告成功', type: 'success' })
this.$store.dispatch('delCurrentViews', {
view: this.$route,
$router: this.$router
})
}
this.state = 'update'
this.info.ysjlId = this.ysjl.id
})
}
})
}
},
/**
* 保存示意图
*/
saveSyt() {
this.sytYsjl.flowstatus = 4
this.api({
url: '/fx',
method: 'put',
data: {
ysjl: this.sytYsjl,
jyxm: 'dxt',
fxObj: this.sytParam
}
})
},
toAddJyfa() {
if (this.$refs.jyfa) {
this.$refs.jyfa.getJyfaInfo()
}
this.jyfaDialogVisible = true
},
// 查询同类报告
getJyfaInfo() {
this.api({
url: '/ysjl/getJyfaInfo',
method: 'get',
params: {
ysjlId: this.ysjl.id
}
}).then(data => {
data.forEach((v, k) => {
// 示意图是固定的 所以不需要展示
if (v.jianyanxiangmu === 'dxt') {
data.splice(k, 1)
}
})
this.similarTableData = data
this.similarVisible = true
})
},
closeJyfaDialog() {
this.jyfaDialogVisible = false
},
// 删除检验方案
delYsjl(jyxm, jianyanxiangmu, bglx, ysjlId) {
this.$confirm('原始记录删除后将无法恢复,是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.common.delJyfa(jyxm, jianyanxiangmu, bglx, ysjlId, this.info.ysjlId, this.info.sblbdm, this.info.nblb)
}).catch(e => {
this.$message({ message: '删除失败:' + e, type: 'error' })
})
},
// 办结分项原始记录 status:0:取消办结,1:办结
bjYsjl(ysjlId, status) {
this.api({
url: '/fx/endFx',
method: 'get',
params: {
ysjlId: ysjlId,
status: status
}
}).then(() => {
this.getJyfaInfo()
if (status === '0') {
this.$message({ message: '取消办结成功', type: 'success' })
} else if (status === '1') {
this.$message({ message: '办结成功', type: 'success' })
}
})
},
editChild(id, jianyanxiangmu, departmentId) {
this.$router.push({ path: '/ysjl/2000/2100/' + jianyanxiangmu, query: { id: id, jyxm: jianyanxiangmu, departmentId: departmentId }})
this.similarVisible = false
},
changed1(item) {
this.sytParam.imagePath = item
},
changed2(item) {
this.sytParam.imagePath2 = item
},
createSyt(ysjl) {
this.api({
url: '/ysjl/addJyfa',
method: 'get',
params: {
bglx: '3',
ysjlId: ysjl.id,
type: '压力容器检测示意图',
jianyanxiangmu: 'dxt',
userId: this.$store.getters.userId,
templateId: 121,
defaultStatus: true
}
}).then(() => {
this.getSytInfoData()
})
},
getSytInfoData() {
this.api({
url: '/fx/getFxByParentId',
method: 'get',
params: {
parentId: this.$route.params.id,
jyxm: 'dxt'
}
}).then(data => {
this.sytInfo.flowstatus = data.ysjl.flowstatus
this.$set(this.sytInfo, 'ysjlId', data.ysjl.id)
this.sytYsjl = data.ysjl
this.sytParam = data.param ? data.param : { imagePath: '[]' }
this.fileList1 = this.sytParam.imagePath ? JSON.parse(this.sytParam.imagePath) : []
if (this.fileList1.length > 0) {
for (let i = 0; i < this.fileList1.length; i++) {
this.fileList1[i].url = process.env.VUE_APP_IMG_URL + '2000/dxt/' + this.fileList1[i].name
}
}
this.fileList2 = this.sytParam.imagePath2 ? JSON.parse(this.sytParam.imagePath2) : []
if (this.fileList2.length > 0) {
for (let i = 0; i < this.fileList2.length; i++) {
this.fileList2[i].url = process.env.VUE_APP_IMG_URL + '2000/dxt/' + this.fileList2[i].name
}
}
this.$refs.picture1.getChange(this.ysjl.shebeizhongleidaima, this.state, this.fileList1, 1, this.sytYsjl.id)
this.$refs.picture2.getChange(this.ysjl.shebeizhongleidaima, this.state, this.fileList2, 2, this.sytYsjl.id)
})
},
/**
* 同步特定字段数据
*/
getWsfxJyjg(ysjlId) {
this.api({
url: '/ysjl/getParamByYsjlId',
method: 'get',
params: {
ysjlId: !ysjlId ? this.ysjl.id : ysjlId,
sbzldm: this.ysjl.shebeizhongleidaima
}
}).then(data => {
this.param.bhcd = data.bhcd
this.param.cfjc = data.cfjc
this.param.csjc = data.csjc
this.param.stjc = data.stjc
this.param.zkdjc = data.zkdjc
this.param.ydjc = data.ydjc
this.param.tbl = data.tbl
})
},
changeZlscjg() {
if (this.bgfyData && this.bgfyData[0]) {
this.bgfyData[0].jianyanjieguo = this.ysjl.jianyanjielun
}
},
changeHgjg() {
if (this.bgfyData && this.bgfyData[1]) {
this.bgfyData[1].jianyanjieguo = this.param.jianyanjieguo
}
},
judgeRepeat(bianhao, id) {
this.api({
url: '/ysjl/judgeRepeat',
method: 'get',
params: {
ysjlId: id,
bianhao: bianhao
}
}).then(data => {
this.isRepeat = data > 0
})
},
editStatus() {
// 对应调换夹套和管程的数据
const param = this.common.deepCopy(this.param)
this.$set(this.param, 'shejiyalijiatao', param.shejiyaliguancheng)
this.$set(this.param, 'gongzuoyalijiatao', param.gongzuoyaliguancheng)
this.$set(this.param, 'shejiwendujiatao', param.shejiwenduguancheng)
this.$set(this.param, 'gongzuowendujiatao', param.gongzuowenduguancheng)
this.$set(this.param, 'jiezhijiatao', param.jiezhiguancheng)
this.$set(this.param, 'shejiyaliguancheng', param.shejiyalijiatao)
this.$set(this.param, 'gongzuoyaliguancheng', param.gongzuoyalijiatao)
this.$set(this.param, 'shejiwenduguancheng', param.shejiwendujiatao)
this.$set(this.param, 'gongzuowenduguancheng', param.gongzuowendujiatao)
this.$set(this.param, 'jiezhiguancheng', param.jiezhijiatao)
// 设计压力反写
this.sjylChange()
// 工作压力反写
this.gzylChange()
// 设计温度反写
this.sjwdChange()
// 工作温度、温度反写
this.gzwdChange()
// 工作介质、介质反写
this.jzChange()
},
changeNblb(val) {
if (val === 'SCDQ') {
this.param.mt = '无此项'
this.param.pt = '无此项'
this.param.ut = '无此项'
this.param.rt = '无此项'
this.param.shangcibaogaobianhao = '无此项'
this.param.shangcijianyanriqi = '无此项'
this.param.shangcibihoutongti = '无此项'
this.param.shangcibihoufengtou = '无此项'
this.param.shangciwentijizai = '无此项'
this.param.shangcianquandengji = '无此项'
}
},
/**
* 查询区划
*/
getArea() {
this.api({
url: '/area/getShiArea',
method: 'get',
params: {
shidaima: '370100'
}
}).then(data => {
data.forEach(area => {
if (area.label === '高新区') {
this.djjgs.push({ value: '济南高新技术产业开发区管委会市场监管局' })
} else {
this.djjgs.push({ value: area.label + '市场监督管理局' })
}
})
})
},
querySearchDjjgOption(queryString, cb) {
cb(this.djjgs)
}
}
}
</script>