specYlrq-hisReform.vue 14 KB

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