index.vue 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item :label="$t('装置名称')" prop="plantCode">
  5. <el-input
  6. v-model="queryParams.plantCode"
  7. :placeholder="$t('请输入') + $t('装置名称')"
  8. clearable
  9. size="small"
  10. @keyup.enter.native="handleQuery"
  11. />
  12. </el-form-item>
  13. <el-form-item :label="$t('单元')" prop="unit">
  14. <el-input
  15. v-model="queryParams.unit"
  16. :placeholder="$t('请输入') + $t('单元')"
  17. clearable
  18. size="small"
  19. @keyup.enter.native="handleQuery"
  20. />
  21. </el-form-item>
  22. <el-form-item :label="$t('设备名称')" prop="devname" label-width="50">
  23. <el-input
  24. v-model="queryParams.devname"
  25. :placeholder="$t('请输入') + $t('设备名称')"
  26. clearable
  27. size="small"
  28. @keyup.enter.native="handleQuery"
  29. />
  30. </el-form-item>
  31. <el-form-item :label="$t('设备位号')" prop="devno" label-width="50">
  32. <el-input
  33. v-model="queryParams.devno"
  34. :placeholder="$t('请输入') + $t('位号')"
  35. clearable
  36. size="small"
  37. @keyup.enter.native="handleQuery"
  38. />
  39. </el-form-item>
  40. <el-form-item :label="$t('申请状态')" prop="approveStatus" label-width="50">
  41. <el-select v-model="queryParams.approveStatus" :placeholder="$t('请选择') + $t('申请状态')" clearable size="small">
  42. <el-option
  43. v-for="dict in approveStatusOptions"
  44. :key="dict.dictValue"
  45. :label="dict.dictLabel"
  46. :value="dict.dictValue"
  47. />
  48. </el-select>
  49. </el-form-item>
  50. <el-form-item>
  51. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
  52. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
  53. </el-form-item>
  54. </el-form>
  55. <el-row :gutter="10" class="mb8">
  56. <el-col :span="1.5">
  57. <el-button
  58. type="primary"
  59. icon="el-icon-plus"
  60. size="mini"
  61. @click="handleAdd"
  62. v-hasPermi="['sems:specYlrq:add']"
  63. >{{ $t('新增') }}</el-button>
  64. </el-col>
  65. <el-col :span="1.5">
  66. <el-button
  67. type="success"
  68. icon="el-icon-edit"
  69. size="mini"
  70. :disabled="single"
  71. @click="handleUpdate"
  72. v-hasPermi="['sems:specYlrq:edit']"
  73. >{{ $t('修改') }}</el-button>
  74. </el-col>
  75. <el-col :span="1.5">
  76. <el-button
  77. type="danger"
  78. icon="el-icon-delete"
  79. size="mini"
  80. :disabled="multiple"
  81. @click="handleDelete"
  82. v-hasPermi="['sems:specYlrq:remove']"
  83. >{{ $t('删除') }}</el-button>
  84. </el-col>
  85. <el-col :span="1.5">
  86. <el-button
  87. type="success"
  88. size="mini"
  89. :disabled="multiple"
  90. @click="addAprrove('',devType)"
  91. >{{ $t('提交申请') }}</el-button>
  92. </el-col>
  93. <el-col :span="1.5">
  94. <el-button
  95. type="info"
  96. icon="el-icon-upload2"
  97. size="mini"
  98. @click="handleImport"
  99. v-hasPermi="['sems:specYlrq:edit']"
  100. >{{ $t('导入') }}</el-button>
  101. </el-col>
  102. <el-col :span="1.5">
  103. <el-button
  104. type="warning"
  105. icon="el-icon-download"
  106. size="mini"
  107. @click="handleExport"
  108. v-hasPermi="['sems:specYlrq:export']"
  109. >{{ $t('导出') }}</el-button>
  110. </el-col>
  111. <el-col :span="1.5">
  112. <el-button
  113. type="primary"
  114. icon="el-icon-download"
  115. size="mini"
  116. @click="inspectionInformation = true"
  117. v-hasPermi="['sems:specYlrq:add']"
  118. >{{ $t('检验更新') }}</el-button>
  119. </el-col>
  120. <el-col :span="1.5">
  121. <el-button
  122. type="danger"
  123. icon="el-icon-delete"
  124. size="mini"
  125. @click="handleDup"
  126. v-hasPermi="['system:plant:remove']"
  127. >{{ $t('数据去重') }}</el-button>
  128. </el-col>
  129. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  130. </el-row>
  131. <el-table v-loading="loading" ref="deviceTable" :data="specYlrqList" @selection-change="handleSelectionChange" :height="clientHeight"
  132. :cell-style="tableCellStyle" border @sort-change="sortList">
  133. <el-table-column type="selection" width="55" align="center" fixed="left" />
  134. <el-table-column :label="$t('装置')" align="center" fixed="left" prop="plantCode" :show-overflow-tooltip="true"/>
  135. <el-table-column :label="$t('单元')" align="center" fixed="left" prop="unit" :show-overflow-tooltip="true"/>
  136. <el-table-column :label="$t('装置维修组')" align="center" fixed="left" prop="plantMaint" :show-overflow-tooltip="true"/>
  137. <el-table-column :label="$t('装置维修工程师')" align="center" fixed="left" prop="engineer" :show-overflow-tooltip="true"/>
  138. <el-table-column :label="$t('状态')" align="center" fixed="left" prop="status" :formatter="statusFormat" />
  139. <el-table-column :label="$t('申请状态')" align="center" fixed="left" prop="approveStatus" :formatter="approveStatusFormat" />
  140. <el-table-column :label="$t('位号')" align="center" fixed="left" prop="devno" :show-overflow-tooltip="true">
  141. <!-- <template slot-scope="scope" >
  142. <a :class="tableRowClassName(scope.row)"></a>
  143. </template>-->
  144. </el-table-column>
  145. <el-table-column :label="$t('设备名称')" align="center" prop="devname" width="200" :show-overflow-tooltip="true"/>
  146. <el-table-column :label="$t('使用证号码')" align="center" prop="useno" :show-overflow-tooltip="true"/>
  147. <el-table-column :label="$t('注册编号')" align="center" prop="regno" :show-overflow-tooltip="true"/>
  148. <el-table-column :label="$t('容器类别')" align="center" prop="vesselType" :show-overflow-tooltip="true"/>
  149. <el-table-column :label="$t('制造单位')" align="center" prop="createUnit" :show-overflow-tooltip="true"/>
  150. <el-table-column :label="$t('国家')" align="center" prop="nation" :show-overflow-tooltip="true"/>
  151. <el-table-column :label="$t('外形尺寸(直径*长(高)*厚(mm))')" align="center" prop="outSize" :show-overflow-tooltip="true"/>
  152. <el-table-column :label="$t('材料')" align="center" prop="material" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  153. <el-table-column :label="$t('介质')" align="center" prop="medium" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  154. <el-table-column :label="$t('设计压力')+'(MPa)'" align="center" prop="desPressure" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  155. <el-table-column :label="$t('操作压力')+'(MPa)'" align="center" prop="optPressure" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  156. <el-table-column :label="$t('设计温度')+'(℃)'" align="center" prop="desTemp" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  157. <el-table-column :label="$t('操作温度')+'(℃)'" align="center" prop="optTemp" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  158. <el-table-column :label="$t('投用日期')" align="center" prop="submitdate" width="100">
  159. <template slot-scope="scope">
  160. <span>{{ parseTime(scope.row.submitdate, '{y}-{m}-{d}') }}</span>
  161. </template>
  162. </el-table-column>
  163. <el-table-column :label="$t('是否涉危化品')" align="center" prop="isDanger" :show-overflow-tooltip="true"/>
  164. <el-table-column :label="$t('设计使用年限')" align="center" prop="desYear" :show-overflow-tooltip="true"/>
  165. <el-table-column :label="$t('是否达到设计使用年限')" align="center" prop="isOverlife" :show-overflow-tooltip="true"/>
  166. <el-table-column :label="$t('检验单位')" align="center" prop="checkUnit" :show-overflow-tooltip="true"/>
  167. <el-table-column :label="$t('定期检验日期')" align="center" prop="warnDate" width="100">
  168. <template slot-scope="scope">
  169. <span>{{ parseTime(scope.row.warnDate, '{y}-{m}-{d}') }}</span>
  170. </template>
  171. </el-table-column>
  172. <el-table-column :label="$t('安全状况等级')" align="center" prop="safeClass" :show-overflow-tooltip="true"/>
  173. <el-table-column :label="$t('下次定期检验日期')" align="center" prop="nextWarnDate" width="100" sortable="custom">
  174. <template slot-scope="scope">
  175. <span>{{ parseTime(scope.row.nextWarnDate, '{y}-{m}-{d}') }}</span>
  176. </template>
  177. </el-table-column>
  178. <el-table-column :label="$t('定期检验报告编号')" align="center" prop="reportNo" :show-overflow-tooltip="true"/>
  179. <el-table-column :label="$t('年度检查日期')" align="center" prop="yearWarnDate" width="100">
  180. <template slot-scope="scope">
  181. <span>{{ parseTime(scope.row.yearWarnDate, '{y}-{m}-{d}') }}</span>
  182. </template>
  183. </el-table-column>
  184. <el-table-column :label="$t('年度检查结论')" align="center" prop="checkConclusion" :show-overflow-tooltip="true"/>
  185. <el-table-column :label="$t('下次年度检查日期')" align="center" prop="yearNextWarnDate" width="100">
  186. <template slot-scope="scope">
  187. <span>{{ parseTime(scope.row.yearNextWarnDate, '{y}-{m}-{d}') }}</span>
  188. </template>
  189. </el-table-column>
  190. <el-table-column :label="$t('年度检查报告编号')" align="center" prop="yearReportNo" :show-overflow-tooltip="true"/>
  191. <!-- <el-table-column :label="$t('部门编号')" align="center" prop="deptId" :show-overflow-tooltip="true"/>-->
  192. <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
  193. <el-table-column :label="$t('操作')" align="center" fixed="right" width="140" class-name="small-padding fixed-width">
  194. <template slot-scope="scope">
  195. <el-button
  196. type="text"
  197. size="mini"
  198. @click="addAprrove(scope.row,devType)"
  199. >{{ $t('提交申请') }}</el-button>
  200. <el-button
  201. v-if="scope.row.approveTime != null"
  202. type="text"
  203. size="small"
  204. @click="hisApprove(scope.row,devType)">
  205. {{ $t('申请记录') }}</el-button>
  206. <br>
  207. <el-button
  208. style="margin-left: 0px"
  209. type="text"
  210. size="mini"
  211. @click="checkList(scope.row,devType)"
  212. >{{ $t('检验和检查记录') }}</el-button>
  213. <el-button
  214. v-if="scope.row.hiFlag!= 0"
  215. type="text"
  216. size="mini"
  217. @click="hisReform(scope.row)"
  218. >{{ $t('改造记录') }}</el-button>
  219. </template>
  220. </el-table-column>
  221. </el-table>
  222. <pagination
  223. v-show="total>0"
  224. :total="total"
  225. :page.sync="queryParams.pageNum"
  226. :page-sizes="[20,100,300,500]"
  227. :limit.sync="queryParams.pageSize"
  228. @pagination="getList"
  229. />
  230. <!-- 添加或修改特种设备压力容器台账对话框 disabled="disabled"-->
  231. <el-dialog v-dialogDrag :title="title" :visible.sync="open" width="1200px" append-to-body>
  232. <el-form ref="form" :model="form" :rules="rules" label-width="160px">
  233. <el-row>
  234. <el-col :span="12">
  235. <el-form-item :label="$t('装置')" prop="plantCode">
  236. <el-select v-model="form.plantCode" :placeholder="$t('请选择')+ $t('装置')" filterable clearable size="small" v-bind:disabled="dataForm==1">
  237. <el-option
  238. v-for="dict in plantOptions"
  239. :key="dict.name"
  240. :label="dict.name"
  241. :value="dict.name"
  242. />
  243. </el-select>
  244. </el-form-item>
  245. </el-col>
  246. <el-col :span="12">
  247. <el-form-item :label="$t('单元')" prop="unit">
  248. <el-input v-model="form.unit" :placeholder="$t('请输入')+ $t('单元')" />
  249. </el-form-item>
  250. </el-col>
  251. </el-row>
  252. <el-row>
  253. <el-col :span="12">
  254. <el-form-item :label="$t('装置维修组')" prop="plantMaint">
  255. <el-select v-model="form.plantMaint" :placeholder="$t('请选择')+ $t('装置维修组')" filterable clearable size="small">
  256. <el-option
  257. v-for="dict in plantMaintOptions"
  258. :key="dict.dictValue"
  259. :label="dict.dictValue"
  260. :value="dict.dictValue"
  261. />
  262. </el-select>
  263. </el-form-item>
  264. </el-col>
  265. <el-col :span="12">
  266. <el-form-item :label="$t('装置维修工程师')" prop="engineer">
  267. <el-input v-model="form.engineer" :placeholder="$t('请输入')+ $t('装置维修工程师')" />
  268. </el-form-item>
  269. </el-col>
  270. </el-row>
  271. <el-row>
  272. <el-col :span="12">
  273. <el-form-item :label="$t('设备名称')" prop="devname">
  274. <el-input v-model="form.devname" :placeholder="$t('请输入')+ $t('设备名称')" />
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="12">
  278. <el-form-item :label="$t('位号')" prop="devno">
  279. <el-input v-model="form.devno" :placeholder="$t('请输入')+ $t('位号')" />
  280. </el-form-item>
  281. </el-col>
  282. </el-row>
  283. <el-row>
  284. <el-col :span="12">
  285. <el-form-item :label="$t('使用证号码')" prop="useno">
  286. <el-input v-model="form.useno" :placeholder="$t('请输入')+ $t('使用证号码')"/>
  287. </el-form-item>
  288. </el-col>
  289. <el-col :span="12">
  290. <el-form-item :label="$t('注册编号')" prop="regno">
  291. <el-input v-model="form.regno" :placeholder="$t('请输入')+ $t('注册代码')"/>
  292. </el-form-item>
  293. </el-col>
  294. </el-row>
  295. <el-row>
  296. <el-col :span="12">
  297. <el-form-item :label="$t('容器类别')" prop="vesselType">
  298. <el-input v-model="form.vesselType" :placeholder="$t('请输入')+ $t('容器类别')"/>
  299. </el-form-item>
  300. </el-col>
  301. <el-col :span="12">
  302. <el-form-item :label="$t('制造单位')" prop="createUnit">
  303. <el-input v-model="form.createUnit" :placeholder="$t('请输入')+ $t('制造单位')"/>
  304. </el-form-item>
  305. </el-col>
  306. </el-row>
  307. <el-row>
  308. <el-col :span="12">
  309. <el-form-item :label="$t('国家')" prop="nation">
  310. <el-input v-model="form.nation" :placeholder="$t('请输入')+ $t('国家')"/>
  311. </el-form-item>
  312. </el-col>
  313. <el-col :span="12">
  314. <el-form-item :label="$t('外形尺寸(直径*长(高)*厚(mm))')" label-width="220px" prop="outSize">
  315. <el-input v-model="form.outSize" :placeholder="$t('请输入')+ $t('外形尺寸')"/>
  316. </el-form-item>
  317. </el-col>
  318. </el-row>
  319. <el-row>
  320. <el-col :span="12">
  321. <el-form-item :label="$t('材料')" prop="material">
  322. <el-tooltip placement="top">
  323. <div slot="content">
  324. {{$t('如果是多腔压力容器')}}
  325. </div>
  326. <i class="el-icon-question"></i>
  327. </el-tooltip>
  328. <el-input style="width: 96.5%" v-model="form.material" :placeholder="$t('请输入')+ $t('材料')" />
  329. </el-form-item>
  330. </el-col>
  331. <el-col :span="12">
  332. <el-form-item :label="$t('介质')" prop="medium">
  333. <el-tooltip placement="top">
  334. <div slot="content">
  335. {{$t('如果是多腔压力容器')}}
  336. </div>
  337. <i class="el-icon-question"></i>
  338. </el-tooltip>
  339. <el-input style="width: 96.5%" v-model="form.medium" :placeholder="$t('请输入')+ $t('介质')" />
  340. </el-form-item>
  341. </el-col>
  342. </el-row>
  343. <el-row>
  344. <el-col :span="12">
  345. <el-form-item :label="$t('设计压力')+'MPa'" prop="desPressure">
  346. <el-tooltip placement="top">
  347. <div slot="content">
  348. {{$t('如果是多腔压力容器')}}
  349. </div>
  350. <i class="el-icon-question"></i>
  351. </el-tooltip>
  352. <el-input style="width: 96.5%" v-model="form.desPressure" :placeholder="$t('请输入')+ $t('设计压力')" />
  353. </el-form-item>
  354. </el-col>
  355. <el-col :span="12">
  356. <el-form-item :label="$t('操作压力')+'MPa'" prop="optPressure">
  357. <el-tooltip placement="top">
  358. <div slot="content">
  359. {{$t('如果是多腔压力容器')}}
  360. </div>
  361. <i class="el-icon-question"></i>
  362. </el-tooltip>
  363. <el-input style="width: 96.5%" v-model="form.optPressure" :placeholder="$t('请输入')+ $t('操作压力')" />
  364. </el-form-item>
  365. </el-col>
  366. </el-row>
  367. <el-row>
  368. <el-col :span="12">
  369. <el-form-item :label="$t('设计温度')+'℃'" prop="desTemp">
  370. <el-tooltip placement="top">
  371. <div slot="content">
  372. {{$t('如果是多腔压力容器')}}
  373. </div>
  374. <i class="el-icon-question"></i>
  375. </el-tooltip>
  376. <el-input style="width: 96.5%" v-model="form.desTemp" :placeholder="$t('请输入')+ $t('设计温度')" />
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="12">
  380. <el-form-item :label="$t('操作温度')+'℃'" prop="optTemp">
  381. <el-tooltip placement="top">
  382. <div slot="content">
  383. {{$t('如果是多腔压力容器')}}
  384. </div>
  385. <i class="el-icon-question"></i>
  386. </el-tooltip>
  387. <el-input style="width: 96.5%" v-model="form.optTemp" :placeholder="$t('请输入')+ $t('操作温度')" />
  388. </el-form-item>
  389. </el-col>
  390. </el-row>
  391. <el-row>
  392. <el-col :span="12">
  393. <el-form-item :label="$t('投用日期')" prop="submitdate">
  394. <el-date-picker clearable size="small" style="width: 200px"
  395. v-model="form.submitdate"
  396. type="date"
  397. value-format="yyyy-MM-dd"
  398. :placeholder="$t('请选择')+ $t('提交日期')">
  399. </el-date-picker>
  400. </el-form-item>
  401. </el-col>
  402. <el-col :span="12">
  403. <el-form-item :label="$t('是否涉危化品')" prop="isDanger">
  404. <el-input v-model="form.isDanger" :placeholder="$t('请输入')+ $t('涉危化品')" />
  405. </el-form-item>
  406. </el-col>
  407. </el-row>
  408. <el-row>
  409. <el-col :span="12">
  410. <el-form-item :label="$t('设计使用年限')" prop="desYear">
  411. <el-input v-model="form.desYear" :placeholder="$t('请输入')+ $t('设计使用年限')" />
  412. </el-form-item>
  413. </el-col>
  414. <el-col :span="12">
  415. <el-form-item :label="$t('是否超过使用寿命')" prop="isOverlife">
  416. <el-input v-model="form.isOverlife" :placeholder="$t('请输入')+ $t('超过使用寿命')" />
  417. </el-form-item>
  418. </el-col>
  419. </el-row>
  420. <el-row>
  421. <el-col :span="12">
  422. <el-form-item :label="$t('检验单位')" prop="checkUnit">
  423. <el-input v-model="form.checkUnit" :placeholder="$t('请输入')+ $t('检验单位')" />
  424. </el-form-item>
  425. </el-col>
  426. <el-col :span="12">
  427. <el-form-item :label="$t('定期检验日期')" prop="warnDate">
  428. <el-date-picker clearable size="small" style="width: 200px"
  429. v-model="form.warnDate"
  430. type="date"
  431. value-format="yyyy-MM-dd"
  432. :placeholder="$t('请选择')+ $t('定期检验日期')">
  433. </el-date-picker>
  434. </el-form-item>
  435. </el-col>
  436. </el-row>
  437. <el-row>
  438. <el-col :span="12">
  439. <el-form-item :label="$t('下次定期检验日期')" prop="nextWarnDate">
  440. <el-date-picker clearable size="small" style="width: 200px"
  441. v-model="form.nextWarnDate"
  442. type="date"
  443. value-format="yyyy-MM-dd"
  444. :placeholder="$t('请选择')+ $t('下次定期检验日期')">
  445. </el-date-picker>
  446. </el-form-item>
  447. </el-col>
  448. <el-col :span="12">
  449. <el-form-item :label="$t('定期检验报告编号')" prop="reportNo">
  450. <el-input v-model="form.reportNo" :placeholder="$t('请输入')+ $t('报告编号')" />
  451. </el-form-item>
  452. </el-col>
  453. </el-row>
  454. <el-row>
  455. <el-col :span="12">
  456. <el-form-item :label="$t('安全状况等级')" prop="safeClass">
  457. <el-input v-model="form.safeClass" :placeholder="$t('请输入')+ $t('安全状况等级')" />
  458. </el-form-item>
  459. </el-col>
  460. <el-col :span="12">
  461. <el-form-item :label="$t('年度检查日期')" prop="yearWarnDate">
  462. <el-date-picker clearable size="small" style="width: 200px"
  463. v-model="form.yearWarnDate"
  464. type="date"
  465. value-format="yyyy-MM-dd"
  466. :placeholder="$t('请选择')+ $t('年度检查日期')">
  467. </el-date-picker>
  468. </el-form-item>
  469. </el-col>
  470. </el-row>
  471. <el-row>
  472. <el-col :span="12">
  473. <el-form-item :label="$t('年度检查结论')" prop="checkConclusion">
  474. <el-input v-model="form.checkConclusion" :placeholder="$t('请输入')+ $t('年度检查结论')" />
  475. </el-form-item>
  476. </el-col>
  477. <el-col :span="12">
  478. <el-form-item :label="$t('下次年度检查日期')" prop="yearNextWarnDate">
  479. <el-date-picker clearable size="small" style="width: 200px"
  480. v-model="form.yearNextWarnDate"
  481. type="date"
  482. value-format="yyyy-MM-dd"
  483. :placeholder="$t('请选择')+ $t('下次年度检查日期')">
  484. </el-date-picker>
  485. </el-form-item>
  486. </el-col>
  487. <el-col :span="12">
  488. <el-form-item :label="$t('年度检查报告编号')" prop="yearReportNo">
  489. <el-input v-model="form.yearReportNo" :placeholder="$t('请输入')+ $t('年度检查报告编号')" />
  490. </el-form-item>
  491. </el-col>
  492. </el-row>
  493. <el-row>
  494. <el-col :span="12">
  495. <el-form-item :label="$t('备注')" prop="remarks">
  496. <el-input v-model="form.remarks" type="textarea" :placeholder="$t('请输入')+ $t('内容')" />
  497. </el-form-item>
  498. </el-col>
  499. <!-- <el-col :span="12">
  500. <el-form-item :label="$t('归属部门')" prop="deptId">
  501. <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :placeholder="$t('请选择')+ $t('归属部门')" />
  502. </el-form-item>
  503. </el-col>-->
  504. </el-row>
  505. </el-form>
  506. <div slot="footer" class="dialog-footer">
  507. <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
  508. <el-button @click="cancel">{{ $t('取 消') }}</el-button>
  509. </div>
  510. </el-dialog>
  511. <!-- 用户导入对话框 -->
  512. <el-dialog v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
  513. <el-upload
  514. ref="upload"
  515. :limit="1"
  516. accept=".xlsx, .xls"
  517. :headers="upload.headers"
  518. :action="upload.url + '?updateSupport=' + upload.updateSupport"
  519. :disabled="upload.isUploading"
  520. :on-progress="handleFileUploadProgress"
  521. :on-success="handleFileSuccess"
  522. :auto-upload="false"
  523. drag
  524. >
  525. <i class="el-icon-upload"></i>
  526. <div class="el-upload__text">
  527. {{ $t('将文件拖到此处,或') }}
  528. <em>{{ $t('点击上传') }}</em>
  529. </div>
  530. <div class="el-upload__tip" slot="tip">
  531. <!-- <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
  532. <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
  533. </div>
  534. <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
  535. <input name="type" :value="upload.type" hidden/>
  536. </form>
  537. <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
  538. </el-upload>
  539. <div slot="footer" class="dialog-footer">
  540. <a v-if="waitSubmit" style="margin-right: 300px">{{ $t('正在导入...') }}</a>
  541. <el-button type="primary" @click="submitFileForm" v-loading.fullscreen.lock="fullscreenLoading">{{
  542. $t('确定')
  543. }}
  544. </el-button>
  545. <el-button @click="upload.open = false">{{ $t('取消') }}</el-button>
  546. </div>
  547. </el-dialog>
  548. <form ref="downloadDevForm" :action="downloadDevAction" target="FORMSUBMIT">
  549. <input name="devType" v-model="devType" hidden/>
  550. <input name="ids" v-model="ids" hidden/>
  551. <input name="downloadType" v-model="downloadType" hidden/>
  552. </form>
  553. <el-dialog :title="$t('检验更新')" width="30%" :visible.sync="inspectionInformation">
  554. <el-form ref="dateform" label-width="120px">
  555. <el-form-item>
  556. <span>{{ $t('已选择') }} {{ dataListSelections.length }}</span>
  557. </el-form-item>
  558. <el-form-item>
  559. <el-button type="primary" :disabled="dataListSelections.length <= 0" @click="downloadDev(2)">
  560. {{ $t('downloadSelect') }}
  561. </el-button>
  562. </el-form-item>
  563. <el-upload
  564. class="upload-demo"
  565. drag
  566. ref="upload"
  567. :limit="5"
  568. :show-file-list="false"
  569. :on-success="handleFileSuccess"
  570. :auto-upload="true"
  571. :headers="upload.headers"
  572. :action="uploadUrl(2)"
  573. multiple>
  574. <i class="el-icon-upload"></i>
  575. <div class="el-upload__text">{{$t('文件')}}<em>{{$t('点击上传')}}</em></div>
  576. <div class="el-upload__tip" slot="tip">{{$t('仅支持excel格式')}}</div>
  577. </el-upload>
  578. </el-form>
  579. <div slot="footer" class="dialog-footer">
  580. <el-button @click="inspectionInformation = false">{{$t('返回')}}</el-button>
  581. </div>
  582. </el-dialog>
  583. <el-dialog v-dialogDrag :title="modifyTitle" :visible.sync="modifyVisible" width="550px" append-to-body>
  584. <el-form>
  585. <el-form-item ref="modifyForm" :model="modifyForm" :label="$t('确认人')" prop="plantMaint">
  586. <el-select v-model="modifyForm.wxjl" :placeholder="$t('请选择')+ $t('装置维修经理')" filterable clearable size="small">
  587. <el-option
  588. v-for="dict in wxjlList"
  589. :key="dict.userId"
  590. :label="dict.nickName"
  591. :value="dict.userId"
  592. />
  593. </el-select>
  594. </el-form-item>
  595. </el-form>
  596. <el-button type="primary" @click="submitModofyForm">{{ $t('提交') }}</el-button>
  597. </el-dialog>
  598. <add-approve v-if="addAprroveVisible" ref="addApprove" @refreshDataList="getList"></add-approve>
  599. <his-approve v-if="hisAprroveVisible" ref="hisApprove" @refreshDataList="getList"></his-approve>
  600. <his-check v-if="hisCheckVisible" ref="hisCheck" @refreshDataList="getList"></his-check>
  601. <HisReform v-if="hisReformVisible" ref="hisReformList" ></HisReform>
  602. </div>
  603. </template>
  604. <script>
  605. import {addSpecYlrq, exportSpecYlrq, getSpecYlrq, listSpecYlrq, updateSpecYlrqPre,exportSpecList,duplicate} from "@/api/sems/specYlrq";
  606. import {treeselect} from "@/api/system/dept";
  607. import {getToken} from "@/utils/auth";
  608. import {listPostUser} from "@/api/system/user";
  609. import Treeselect from "@riophae/vue-treeselect";
  610. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  611. import AddApprove from "../approve/tapprove-add"
  612. import {mylistPlant} from "@/api/system/plant";
  613. import HisApprove from "../approve/tapprove-his"
  614. import HisCheck from "../check/check"
  615. import {addModify} from "@/api/sems/his/modify";
  616. import HisReform from "./specYlrq-hisReform";
  617. export default {
  618. name: "SpecYlrq",
  619. components: { Treeselect,AddApprove ,HisApprove,HisCheck ,HisReform},
  620. data() {
  621. return {
  622. waitSubmit: false,
  623. fullscreenLoading: false,
  624. hisReformVisible: false,
  625. dataForm: 0,
  626. devType: 1,
  627. devStatus: 1,
  628. // 遮罩层
  629. loading: true,
  630. addAprroveVisible: false,
  631. hisAprroveVisible: false,
  632. hisCheckVisible: false,
  633. modifyVisible: false,
  634. inspectionInformation: false,
  635. modifyTitle: this.$t('设备修改申请'),
  636. downloadType: '',
  637. downloadDevAction: process.env.VUE_APP_BASE_API + '/common/download/exportDevList',
  638. // 选中数组
  639. ids: [],
  640. dataListSelections: [],
  641. // 非单个禁用
  642. single: true,
  643. // 非多个禁用
  644. multiple: true,
  645. // 显示搜索条件
  646. showSearch: false,
  647. // 总条数
  648. total: 0,
  649. // 特种设备压力容器台账表格数据
  650. specYlrqList: [],
  651. // 弹出层标题
  652. title: "",
  653. // 部门树选项
  654. deptOptions: undefined,
  655. clientHeight:300,
  656. // 是否显示弹出层
  657. open: false,
  658. // 状态字典
  659. statusOptions: [],
  660. // 申请状态字典
  661. approveStatusOptions: [],
  662. plantOptions: [],
  663. plantMaintOptions: [],
  664. wxjlList: [],
  665. // 用户导入参数
  666. upload: {
  667. downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
  668. // 是否显示弹出层(用户导入)
  669. open: false,
  670. type: "specYlrq",
  671. // 弹出层标题(用户导入)
  672. title: "",
  673. // 是否禁用上传
  674. isUploading: false,
  675. // 是否更新已经存在的用户数据
  676. updateSupport: 0,
  677. // 设置上传的请求头部
  678. headers: { Authorization: "Bearer " + getToken() },
  679. // 上传的地址
  680. url: process.env.VUE_APP_BASE_API + "/sems/specYlrq/importData"
  681. },
  682. // 查询参数
  683. queryParams: {
  684. pageNum: 1,
  685. pageSize: 20,
  686. orderByColumn: null,
  687. isAsc: null,
  688. plantCode: null,
  689. unit: null,
  690. devname: null,
  691. devno: null,
  692. status: 1,
  693. approveStatus: null,
  694. hisReformTime: null
  695. },
  696. // 表单参数
  697. form: {},
  698. modifyForm: {},
  699. // 表单校验
  700. rules: {
  701. plantCode: [
  702. { required: true, message: this.$t('装置名称')+this.$t('不能为空'), trigger: "blur" }
  703. ],
  704. }
  705. };
  706. },
  707. watch: {
  708. // 根据名称筛选部门树
  709. deptName(val) {
  710. this.$refs.tree.filter(val);
  711. }
  712. },
  713. created() {
  714. //设置表格高度对应屏幕高度
  715. this.$nextTick(() => {
  716. this.clientHeight = document.body.clientHeight -250
  717. })
  718. this.getList();
  719. this.getTreeselect();
  720. this.getDicts("spec_dev_status").then(response => {
  721. this.statusOptions = response.data;
  722. });
  723. this.getDicts("spec_approve_status").then(response => {
  724. for (let i = 0; i < response.data.length; i++) {
  725. // response.data[i].dictLabel = this.$t(response.data[i].dictLabel)
  726. if ( !["5","6","7","8" ,"16" , "17"].includes(response.data[i].dictValue)){
  727. this.approveStatusOptions.push(response.data[i])
  728. }
  729. }
  730. });
  731. this.getDicts("SPEC_PLANT_MAINT").then(response => {
  732. this.plantMaintOptions = response.data;
  733. });
  734. let plantParams = {
  735. pType: 1
  736. }
  737. mylistPlant(plantParams).then(response => {
  738. this.plantOptions = response.data;
  739. });
  740. },
  741. methods: {
  742. /** 查询特种设备压力容器台账列表 */
  743. getList() {
  744. this.loading = true;
  745. listSpecYlrq(this.queryParams).then(response => {
  746. this.specYlrqList = response.rows;
  747. this.total = response.total;
  748. this.$nextTick(() => {
  749. this.$refs.deviceTable.doLayout(); // 解决表格错位
  750. });
  751. this.loading = false;
  752. });
  753. },
  754. /** 查询部门下拉树结构 */
  755. getTreeselect() {
  756. treeselect().then(response => {
  757. this.deptOptions = response.data;
  758. });
  759. },
  760. // 状态字典翻译
  761. statusFormat(row, column) {
  762. return this.selectDictLabel(this.statusOptions, row.status);
  763. },
  764. // 申请状态字典翻译
  765. approveStatusFormat(row, column) {
  766. return this.selectDictLabel(this.approveStatusOptions, row.approveStatus);
  767. },
  768. // 取消按钮
  769. cancel() {
  770. this.open = false;
  771. this.reset();
  772. },
  773. // 表单重置
  774. reset() {
  775. this.form = {
  776. id: null,
  777. plantCode: null,
  778. unit: null,
  779. devname: null,
  780. devno: null,
  781. submitdate: null,
  782. status: 1,
  783. delFlag: null,
  784. createrCode: null,
  785. createdate: null,
  786. updaterCode: null,
  787. updatedate: null,
  788. deptId: null,
  789. remarks: null,
  790. approveStatus: null,
  791. regno: null,
  792. useno: null,
  793. warnDate: null,
  794. warnCycle: null,
  795. nextWarnDate: null,
  796. warnFlag: null,
  797. plantMaint: null,
  798. engineer: null,
  799. vesselType: null,
  800. isKey: null,
  801. createUnit: null,
  802. nation: null,
  803. outSize: null,
  804. material: null,
  805. medium: null,
  806. desPressure: null,
  807. desTemp: null,
  808. optPressure: null,
  809. optTemp: null,
  810. checkUnit: null,
  811. reportNo: null,
  812. isDanger: null,
  813. isOverlife: null,
  814. safeClass: null,
  815. approveTime: null,
  816. changeTime: null,
  817. hisReformTime: null,
  818. desYear: null,
  819. yearWarnDate: null,
  820. checkConclusion: null,
  821. yearNextWarnDate: null,
  822. yearReportNo: null
  823. };
  824. this.modifyForm = {
  825. wxjl: null,
  826. hisId: null
  827. }
  828. this.resetForm("form");
  829. this.dataForm=0;
  830. },
  831. /** 搜索按钮操作 */
  832. handleQuery() {
  833. this.queryParams.pageNum = 1;
  834. this.getList();
  835. },
  836. /** 重置按钮操作 */
  837. resetQuery() {
  838. this.resetForm("queryForm");
  839. this.handleQuery();
  840. },
  841. // 多选框选中数据
  842. handleSelectionChange(selection) {
  843. this.ids = selection.map(item => item.id)
  844. this.single = selection.length!==1
  845. this.multiple = !selection.length
  846. this.dataListSelections = selection
  847. },
  848. /** 新增按钮操作 */
  849. handleAdd() {
  850. this.reset();
  851. this.open = true;
  852. this.title = this.$t('添加特种设备压力容器台账');
  853. },
  854. /** 修改按钮操作 */
  855. handleUpdate(row) {
  856. this.reset();
  857. const id = row.id || this.ids
  858. var rows = this.dataListSelections.map(item => {
  859. return item
  860. })
  861. for (let i = 0; i <rows.length ; i++) {
  862. if (rows[i].approveStatus != 0) {
  863. this.$alert(this.$t('当前设备正在申请中,无法修改'), this.$t('提示'), {
  864. type: 'warning'
  865. })
  866. return
  867. }
  868. }
  869. this.dataForm = 1;
  870. getSpecYlrq(id).then(response => {
  871. this.form = response.data;
  872. this.open = true;
  873. this.title = this.$t('修改特种设备压力容器台账');
  874. });
  875. },
  876. /** 提交按钮 */
  877. submitForm() {
  878. this.$refs["form"].validate(valid => {
  879. if (valid) {
  880. if (this.form.id != null) {
  881. // updateSpecYlrq(this.form).then(response => {
  882. // this.msgSuccess("修改成功");
  883. // this.open = false;
  884. // this.getList();
  885. // });
  886. updateSpecYlrqPre(this.form).then(response => {
  887. this.open = false;
  888. this.getList();
  889. this.modifyForm.hisId = response.data
  890. this.modifyForm.devId = this.form.id
  891. this.modifyForm.devType = this.devType
  892. this.modifyForm.approveType = 1
  893. this.modifyVisible = true
  894. this.modifyTitle = this.$t('设备修改申请')
  895. this.queryParams.postCode = 'wxjl'
  896. listPostUser(this.queryParams).then(response => {
  897. this.wxjlList = response;
  898. });
  899. });
  900. } else {
  901. addSpecYlrq(this.form).then(response => {
  902. this.msgSuccess(this.$t('新增成功'));
  903. this.open = false;
  904. this.getList();
  905. });
  906. }
  907. }
  908. });
  909. },
  910. /** 删除按钮操作 */
  911. handleDelete(row) {
  912. const ids = row.id || this.ids;
  913. var rows = this.dataListSelections.map(item => {
  914. return item
  915. })
  916. for (let i = 0; i <rows.length ; i++) {
  917. if (rows[i].approveStatus != 0) {
  918. this.$alert(this.$t('当前设备正在申请中,无法修改'), this.$t('提示'), {
  919. type: 'warning'
  920. })
  921. return
  922. }
  923. }
  924. for (let i = 0; i < rows.length; i++) {
  925. if (i == 0){
  926. this.modifyForm.devId = rows[i].id
  927. }else {
  928. this.modifyForm.devId += ',' + rows[i].id
  929. }
  930. }
  931. this.open = false;
  932. this.getList();
  933. this.modifyForm.hisId = 2
  934. this.modifyForm.devType = this.devType
  935. this.modifyForm.approveType = 2
  936. this.modifyVisible = true
  937. this.modifyTitle =this.$t('设备删除申请')
  938. this.queryParams.postCode = 'wxjl'
  939. listPostUser(this.queryParams).then(response => {
  940. this.wxjlList = response;
  941. });
  942. // this.$confirm('是否确认删除?', "警告", {
  943. // confirmButtonText: "确定",
  944. // cancelButtonText: "取消",
  945. // type: "warning"
  946. // }).then(function() {
  947. // return delSpecYlrq(ids);
  948. // }).then(() => {
  949. // this.getList();
  950. // this.msgSuccess("删除成功");
  951. // })
  952. },
  953. /** 去重按钮操作 */
  954. handleDup(){
  955. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  956. confirmButtonText: this.$t('确定'),
  957. cancelButtonText: this.$t('取消'),
  958. type: "warning"
  959. }).then(function() {
  960. return duplicate();
  961. }).then(() => {
  962. this.getList();
  963. this.msgSuccess(this.$t('删除成功'));
  964. })
  965. },
  966. /** 导出按钮操作 */
  967. handleExport() {
  968. const queryParams = this.queryParams;
  969. this.$confirm(this.$t('是否确认导出所有特种设备压力容器台账数据项?'), this.$t('警告'), {
  970. confirmButtonText: this.$t('确定'),
  971. cancelButtonText: this.$t('取消'),
  972. type: "warning"
  973. }).then(function () {
  974. return exportSpecYlrq(queryParams);
  975. }).then(response => {
  976. this.download(response.msg);
  977. })
  978. },
  979. /** 导入按钮操作 */
  980. handleImport() {
  981. this.upload.title = this.$t('用户导入');
  982. this.upload.open = true;
  983. },
  984. /** 下载模板操作 */
  985. importTemplate() {
  986. this.$refs['downloadFileForm'].submit()
  987. },
  988. // 文件上传中处理
  989. handleFileUploadProgress(event, file, fileList) {
  990. this.upload.isUploading = true;
  991. this.waitSubmit = true;
  992. },
  993. // 文件上传成功处理
  994. handleFileSuccess(response, file, fileList) {
  995. this.waitSubmit = false;
  996. this.upload.open = false;
  997. this.upload.isUploading = false;
  998. this.$refs.upload.clearFiles();
  999. this.fullscreenLoading = false;
  1000. if (response.data.length > 0) {
  1001. let failrow = ''
  1002. for (let i = 0; i < response.data.length; i++) {
  1003. failrow += response.data[i] + ','
  1004. }
  1005. this.$alert(this.$t('导入成功条数:') + response.msg + '<br>' + this.$t('失败行数:') + failrow, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
  1006. } else {
  1007. this.$alert(this.$t('导入成功条数:') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
  1008. }
  1009. this.getList();
  1010. },
  1011. // 提交上传文件
  1012. submitFileForm() {
  1013. this.$refs.upload.submit();
  1014. this.fullscreenLoading = true
  1015. },
  1016. addAprrove(row, type) {
  1017. var rows = row ? [row] : this.dataListSelections.map(item => {
  1018. return item
  1019. })
  1020. for (let i = 0; i <rows.length ; i++) {
  1021. if (rows[i].approveStatus != 0) {
  1022. this.$alert(this.$t('当前设备正在申请中,无法重复申请'), this.$t('提示'), {
  1023. type: 'warning'
  1024. })
  1025. return
  1026. }
  1027. }
  1028. this.addAprroveVisible = true
  1029. console.log(rows)
  1030. console.log(type)
  1031. this.$nextTick(() => {
  1032. this.$refs.addApprove.init(rows, type)
  1033. })
  1034. },
  1035. hisApprove (row, type) {
  1036. this.hisAprroveVisible = true
  1037. this.$nextTick(() => {
  1038. this.$refs.hisApprove.init(row, type)
  1039. })
  1040. },
  1041. checkList (row, type) {
  1042. this.hisCheckVisible = true
  1043. this.$nextTick(() => {
  1044. this.$refs.hisCheck.init(row, type)
  1045. })
  1046. },
  1047. hisReform (row){
  1048. this.hisReformVisible = true
  1049. this.$nextTick(() => {
  1050. this.$refs.hisReformList.init(row);
  1051. })
  1052. },
  1053. //导出excel
  1054. downloadDev(type){
  1055. var rows = this.dataListSelections.map(item => {
  1056. return item.id
  1057. })
  1058. const queryParams = {ids: null};
  1059. queryParams.ids = rows.join()
  1060. exportSpecList(queryParams).then(response => {
  1061. this.download(response.msg);
  1062. })
  1063. // var rows = this.dataListSelections.map(item => {
  1064. // return item.id
  1065. // })
  1066. // this.ids = rows
  1067. // if (type == 1){
  1068. // this.downloadType = 1
  1069. // }else if (type == 2){
  1070. // this.downloadType = 2
  1071. // }
  1072. // this.$nextTick(() => {
  1073. // this.$refs['downloadDevForm'].submit()
  1074. // })
  1075. },
  1076. uploadUrl (uploadType) {
  1077. return process.env.VUE_APP_BASE_API + "/sems/specYlrq/updateData"
  1078. },
  1079. submitModofyForm () {
  1080. addModify(this.modifyForm).then(response => {
  1081. this.msgSuccess(this.$t('提交成功'));
  1082. this.modifyVisible = false
  1083. this.getList();
  1084. });
  1085. },
  1086. /*tableRowClassName(row){
  1087. if (row.devno != 0){
  1088. return `<span style="background-color: yellow;">$&</span>`;
  1089. }
  1090. return '';
  1091. }*/
  1092. //位号颜色变换
  1093. tableCellStyle({ row, column, rowIndex, columnIndex }) {
  1094. if (columnIndex == 7 && row.isRepeat == 1){
  1095. return "color:rgba(255, 26, 26, 0.98);"
  1096. }
  1097. if (row.warnFlag == 1){
  1098. return "background-color:rgba(255, 255,153, 0.5);"
  1099. }
  1100. if ( row.warnFlag == 2){
  1101. return "background-color:rgba(255, 180, 68, 0.5);"
  1102. }
  1103. if ( row.warnFlag == 3){
  1104. return "background-color:rgba(255, 68,68, 0.5);"
  1105. }
  1106. },
  1107. //element表格排序
  1108. sortList(val){
  1109. var sort = "asc";
  1110. let sortTip = val.order
  1111. this.queryParams.isAsc = sort;
  1112. this.queryParams.orderByColumn = val.prop;
  1113. if(sortTip === 'descending'){
  1114. sort = 'desc' // 降序
  1115. }else if(sortTip === 'ascending'){
  1116. sort = 'asc' // 升序
  1117. }else if(sortTip === null){
  1118. this.queryParams.isAsc = null;
  1119. this.queryParams.orderByColumn = null;
  1120. }
  1121. this.loading = true;
  1122. listSpecYlrq(this.queryParams).then(response => {
  1123. this.specYlrqList = response.rows;
  1124. this.total = response.total;
  1125. this.$nextTick(() => {
  1126. this.$refs.deviceTable.doLayout(); // 解决表格错位
  1127. });
  1128. this.loading = false;
  1129. });
  1130. },
  1131. //结论备注
  1132. renderHeader(h, {column, $index}) {
  1133. let _this = this
  1134. return [
  1135. column.label,
  1136. h(
  1137. "el-tooltip",
  1138. {
  1139. props: {
  1140. content: (function () {
  1141. return _this.$t('如果是多腔压力容器')
  1142. })(),
  1143. placement: "top"
  1144. }
  1145. },
  1146. [
  1147. h("span", {
  1148. class: {
  1149. "el-icon-question": true,
  1150. "report-headerTips": true
  1151. }
  1152. })
  1153. ]
  1154. )
  1155. ]
  1156. },
  1157. }
  1158. };
  1159. </script>