specYlrq-hisReform.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <template>
  2. <el-dialog :title="$t('改造记录')" :visible.sync="visible" width="1200px" append-to-body>
  3. <el-table v-loading="loading" ref="reTable" :data="specHiYlrqList" :height="clientHeight" border>
  4. <el-table-column :label="$t('装置')" align="center" fixed="left" prop="plantCode" :show-overflow-tooltip="true"/>
  5. <el-table-column :label="$t('单元')" align="center" fixed="left" prop="unit" :show-overflow-tooltip="true"/>
  6. <el-table-column :label="$t('装置维修组')" align="center" fixed="left" prop="plantMaint" :show-overflow-tooltip="true"/>
  7. <el-table-column :label="$t('装置维修工程师')" align="center" fixed="left" prop="engineer" :show-overflow-tooltip="true"/>
  8. <!-- <el-table-column :label="$t('状态')" align="center" fixed="left" prop="status" :formatter="statusFormat" />-->
  9. <!-- <el-table-column :label="$t('申请状态')" align="center" fixed="left" prop="approveStatus" :formatter="approveStatusFormat" />-->
  10. <el-table-column :label="$t('位号')" align="center" fixed="left" prop="devno" :show-overflow-tooltip="true"/>
  11. <el-table-column :label="$t('设备名称')" align="center" prop="devname" width="200" :show-overflow-tooltip="true"/>
  12. <el-table-column :label="$t('设备出厂编号')" align="center" prop="factoryNo" :show-overflow-tooltip="true"/>
  13. <el-table-column :label="$t('使用证号码')" align="center" prop="useno" :show-overflow-tooltip="true"/>
  14. <el-table-column :label="$t('注册编号')" align="center" prop="regno" :show-overflow-tooltip="true"/>
  15. <el-table-column :label="$t('容器类别')" align="center" prop="vesselType" :show-overflow-tooltip="true"/>
  16. <el-table-column :label="$t('制造单位')" align="center" prop="createUnit" :show-overflow-tooltip="true"/>
  17. <el-table-column :label="$t('国家')" align="center" prop="nation" :show-overflow-tooltip="true"/>
  18. <el-table-column :label="$t('外形尺寸(直径*长(高)*厚(mm))')" align="center" prop="outSize" :show-overflow-tooltip="true"/>
  19. <el-table-column :label="$t('材料')" align="center" prop="material" :show-overflow-tooltip="true"/>
  20. <el-table-column :label="$t('介质')" align="center" prop="medium" :show-overflow-tooltip="true"/>
  21. <el-table-column :label="$t('设计压力')+'MPa'" align="center" prop="desPressure" :show-overflow-tooltip="true"/>
  22. <el-table-column :label="$t('操作压力')+'MPa'" align="center" prop="optPressure" :show-overflow-tooltip="true"/>
  23. <el-table-column :label="$t('设计温度')+'℃'" align="center" prop="desTemp" :show-overflow-tooltip="true"/>
  24. <el-table-column :label="$t('操作温度')+'℃'" align="center" prop="optTemp" :show-overflow-tooltip="true"/>
  25. <el-table-column :label="$t('投用日期')" align="center" prop="submitdate" width="100">
  26. <template slot-scope="scope">
  27. <span>{{ parseTime(scope.row.submitdate, '{y}-{m}-{d}') }}</span>
  28. </template>
  29. </el-table-column>
  30. <el-table-column :label="$t('是否涉危化品')" align="center" prop="isDanger" :show-overflow-tooltip="true"/>
  31. <el-table-column :label="$t('设计使用年限')" align="center" prop="desYear" :show-overflow-tooltip="true"/>
  32. <el-table-column :label="$t('是否达到设计使用年限')" align="center" prop="isOverlife" :show-overflow-tooltip="true"/>
  33. <el-table-column :label="$t('检验单位')" align="center" prop="checkUnit" :show-overflow-tooltip="true"/>
  34. <el-table-column :label="$t('定期检验日期')" align="center" prop="warnDate" width="100">
  35. <template slot-scope="scope">
  36. <span>{{ parseTime(scope.row.warnDate, '{y}-{m}-{d}') }}</span>
  37. </template>
  38. </el-table-column>
  39. <el-table-column :label="$t('安全状况等级')" align="center" prop="safeClass" :show-overflow-tooltip="true"/>
  40. <el-table-column :label="$t('下次定期检验日期')" align="center" prop="nextWarnDate" width="100">
  41. <template slot-scope="scope">
  42. <span>{{ parseTime(scope.row.nextWarnDate, '{y}-{m}-{d}') }}</span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column :label="$t('定期检验报告编号')" align="center" prop="reportNo" :show-overflow-tooltip="true"/>
  46. <el-table-column :label="$t('年度检查日期')" align="center" prop="yearWarnDate" width="100">
  47. <template slot-scope="scope">
  48. <span>{{ parseTime(scope.row.yearWarnDate, '{y}-{m}-{d}') }}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column :label="$t('年度检查结论')" align="center" prop="checkConclusion" :show-overflow-tooltip="true"/>
  52. <el-table-column :label="$t('下次年度检查日期')" align="center" prop="yearNextWarnDate" width="100">
  53. <template slot-scope="scope">
  54. <span>{{ parseTime(scope.row.yearNextWarnDate, '{y}-{m}-{d}') }}</span>
  55. </template>
  56. </el-table-column>
  57. <el-table-column :label="$t('年度检查报告编号')" align="center" prop="yearReportNo" :show-overflow-tooltip="true"/>
  58. <!-- <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>-->
  59. <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
  60. <<el-table-column :label="$t('创建时间')" align="center" prop="createdate" width="100">
  61. <template slot-scope="scope">
  62. <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
  63. </template>
  64. </el-table-column>
  65. </el-table>
  66. <!--<pagination
  67. v-show="total>0"
  68. :total="total"
  69. :page.sync="queryParams.pageNum"
  70. :page-sizes="[20,100,300,500]"
  71. :limit.sync="queryParams.pageSize"
  72. @pagination="getList"
  73. />-->
  74. </el-dialog>
  75. </template>
  76. <script>
  77. import {getSpecYlrqByReform} from "@/api/sems/specYlrq";
  78. import { getToken } from "@/utils/auth";
  79. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  80. export default {
  81. name: "Check",
  82. data() {
  83. return {
  84. specHiYlrqList: [],
  85. devType: null,
  86. // 遮罩层
  87. loading: true,
  88. visible: false,
  89. // 选中数组
  90. ids: [],
  91. // 非单个禁用
  92. single: true,
  93. // 非多个禁用
  94. multiple: true,
  95. // 显示搜索条件
  96. showSearch: false,
  97. // 总条数
  98. total: 0,
  99. // 特种设备检验记录表格数据
  100. checkList: [],
  101. // 弹出层标题
  102. title: "",
  103. // 部门树选项
  104. deptOptions: undefined,
  105. clientHeight:300,
  106. // 是否显示弹出层
  107. open: false,
  108. // 用户导入参数
  109. upload: {
  110. // 是否显示弹出层(用户导入)
  111. open: false,
  112. // 弹出层标题(用户导入)
  113. title: "",
  114. // 是否禁用上传
  115. isUploading: false,
  116. // 是否更新已经存在的用户数据
  117. updateSupport: 0,
  118. // 设置上传的请求头部
  119. headers: { Authorization: "Bearer " + getToken() },
  120. // 上传的地址
  121. url: process.env.VUE_APP_BASE_API + "/sems/check/importData"
  122. },
  123. // 查询参数
  124. queryParams: {
  125. pageNum: 1,
  126. pageSize: 20,
  127. createrCode: null,
  128. createdate: null,
  129. updaterCode: null,
  130. updatedate: null,
  131. checkUnit: null,
  132. warnDate: null,
  133. nextWarnDate: null,
  134. reportNo: null,
  135. yearWarnDate: null,
  136. checkConclusion: null,
  137. yearNextWarnDate: null,
  138. yearReportNo: null,
  139. outWarnDate: null,
  140. outNextWarnDate: null,
  141. outCheckConclusion: null,
  142. outReportNo: null,
  143. devId: null,
  144. devType: null,
  145. safeClass: null
  146. },
  147. // 表单参数
  148. form: {},
  149. // 表单校验
  150. rules: {
  151. }
  152. };
  153. },
  154. watch: {
  155. // // 根据名称筛选部门树
  156. // deptName(val) {
  157. // this.$refs.tree.filter(val);
  158. // }
  159. },
  160. created() {
  161. //设置表格高度对应屏幕高度
  162. this.$nextTick(() => {
  163. this.clientHeight = document.body.clientHeight -250
  164. })
  165. },
  166. methods: {
  167. init (row) {
  168. this.visible = true
  169. this.queryParams.devId = row.id
  170. // this.queryParams.devType = type
  171. // this.devType = type
  172. // console.log(this.devType)
  173. this.loading = true;
  174. this.$nextTick(() => {
  175. console.log(this.queryParams)
  176. getSpecYlrqByReform(row.id).then(response => {
  177. this.specHiYlrqList = response.data;
  178. this.$nextTick(() => {
  179. this.$refs.reTable.doLayout(); // 解决表格错位
  180. });
  181. this.loading = false;
  182. });
  183. })
  184. },
  185. /** 查询特种设备检验记录列表 */
  186. /*getList() {
  187. this.loading = true;
  188. getHistoryYlrq(row.id).then(response => {
  189. this.specHiYlrqList = response.rows;
  190. this.total = response.total;
  191. this.loading = false;
  192. });
  193. },*/
  194. // 状态字典翻译
  195. statusFormat(row, column) {
  196. return this.selectDictLabel(this.statusOptions, row.status);
  197. },
  198. // 申请状态字典翻译
  199. approveStatusFormat(row, column) {
  200. return this.selectDictLabel(this.approveStatusOptions, row.approveStatus);
  201. },
  202. // /** 查询部门下拉树结构 */
  203. // getTreeselect() {
  204. // treeselect().then(response => {
  205. // this.deptOptions = response.data;
  206. // });
  207. // },
  208. // // 取消按钮
  209. // cancel() {
  210. // this.open = false;
  211. // this.reset();
  212. // },
  213. // // 表单重置
  214. // reset() {
  215. // this.form = {
  216. // id: null,
  217. // delFlag: null,
  218. // createrCode: null,
  219. // createdate: null,
  220. // updaterCode: null,
  221. // updatedate: null,
  222. // checkUnit: null,
  223. // warnDate: null,
  224. // nextWarnDate: null,
  225. // reportNo: null,
  226. // yearWarnDate: null,
  227. // checkConclusion: null,
  228. // yearNextWarnDate: null,
  229. // yearReportNo: null,
  230. // outWarnDate: null,
  231. // outNextWarnDate: null,
  232. // outCheckConclusion: null,
  233. // outReportNo: null,
  234. // devId: null,
  235. // devType: null,
  236. // safeClass: null
  237. // };
  238. // this.resetForm("form");
  239. // },
  240. // /** 搜索按钮操作 */
  241. // handleQuery() {
  242. // this.queryParams.pageNum = 1;
  243. // this.getList();
  244. // },
  245. // /** 重置按钮操作 */
  246. // resetQuery() {
  247. // this.resetForm("queryForm");
  248. // this.handleQuery();
  249. // },
  250. // // 多选框选中数据
  251. // handleSelectionChange(selection) {
  252. // this.ids = selection.map(item => item.id)
  253. // this.single = selection.length!==1
  254. // this.multiple = !selection.length
  255. // },
  256. // /** 新增按钮操作 */
  257. // handleAdd() {
  258. // this.reset();
  259. // this.open = true;
  260. // this.title = "添加特种设备检验记录";
  261. // },
  262. // /** 修改按钮操作 */
  263. // handleUpdate(row) {
  264. // this.reset();
  265. // const id = row.id || this.ids
  266. // getCheck(id).then(response => {
  267. // this.form = response.data;
  268. // this.open = true;
  269. // this.title = "修改特种设备检验记录";
  270. // });
  271. // },
  272. // /** 提交按钮 */
  273. // submitForm() {
  274. // this.$refs["form"].validate(valid => {
  275. // if (valid) {
  276. // if (this.form.id != null) {
  277. // updateCheck(this.form).then(response => {
  278. // this.msgSuccess("修改成功");
  279. // this.open = false;
  280. // this.getList();
  281. // });
  282. // } else {
  283. // addCheck(this.form).then(response => {
  284. // this.msgSuccess("新增成功");
  285. // this.open = false;
  286. // this.getList();
  287. // });
  288. // }
  289. // }
  290. // });
  291. // },
  292. // /** 删除按钮操作 */
  293. // handleDelete(row) {
  294. // const ids = row.id || this.ids;
  295. // this.$confirm('是否确认删除?', "警告", {
  296. // confirmButtonText: "确定",
  297. // cancelButtonText: "取消",
  298. // type: "warning"
  299. // }).then(function() {
  300. // return delCheck(ids);
  301. // }).then(() => {
  302. // this.getList();
  303. // this.msgSuccess("删除成功");
  304. // })
  305. // },
  306. // /** 导出按钮操作 */
  307. // handleExport() {
  308. // const queryParams = this.queryParams;
  309. // this.$confirm('是否确认导出所有特种设备检验记录数据项?', "警告", {
  310. // confirmButtonText: "确定",
  311. // cancelButtonText: "取消",
  312. // type: "warning"
  313. // }).then(function() {
  314. // return exportCheck(queryParams);
  315. // }).then(response => {
  316. // this.download(response.msg);
  317. // })
  318. // },
  319. // /** 导入按钮操作 */
  320. // handleImport() {
  321. // this.upload.title = "用户导入";
  322. // this.upload.open = true;
  323. // },
  324. // /** 下载模板操作 */
  325. // importTemplate() {
  326. // importTemplate().then(response => {
  327. // this.download(response.msg);
  328. // });
  329. // },
  330. // // 文件上传中处理
  331. // handleFileUploadProgress(event, file, fileList) {
  332. // this.upload.isUploading = true;
  333. // },
  334. // // 文件上传成功处理
  335. // handleFileSuccess(response, file, fileList) {
  336. // this.upload.open = false;
  337. // this.upload.isUploading = false;
  338. // this.$refs.upload.clearFiles();
  339. // this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
  340. // this.getList();
  341. // },
  342. // // 提交上传文件
  343. // submitFileForm() {
  344. // this.$refs.upload.submit();
  345. // }
  346. }
  347. };
  348. </script>