index.vue 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451
  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="devno">
  23. <el-input
  24. v-model="queryParams.devno"
  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="approveStatus">
  32. <el-select v-model="queryParams.approveStatus" :placeholder="$t('请选择') + $t('申请状态')" clearable size="small">
  33. <el-option
  34. v-for="dict in approveStatusOptions"
  35. :key="dict.dictValue"
  36. :label="dict.dictLabel"
  37. :value="dict.dictValue"
  38. />
  39. </el-select>
  40. </el-form-item>
  41. <el-form-item>
  42. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
  43. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
  44. </el-form-item>
  45. </el-form>
  46. <el-row :gutter="10" class="mb8">
  47. <el-col :span="1.5">
  48. <el-button
  49. type="success"
  50. size="mini"
  51. :disabled="multiple"
  52. @click="approveHandle('')"
  53. >{{ $t('申请报告') }}
  54. </el-button>
  55. </el-col>
  56. <el-col :span="1.5">
  57. <el-button
  58. type="danger"
  59. size="mini"
  60. @click="exportData"
  61. >{{ $t('同步数据') }}
  62. </el-button>
  63. </el-col>
  64. <el-col :span="1.5">
  65. <el-button
  66. type="warning"
  67. size="mini"
  68. @click="dialogVisible = true"
  69. >{{ $t('批量下载历史报告') }}
  70. </el-button>
  71. </el-col>
  72. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  73. </el-row>
  74. <el-table v-loading="loading" ref="reportTable" :data="reportYlrqList" @selection-change="handleSelectionChange"
  75. :height="clientHeight" border>
  76. <el-table-column type="selection" width="55" align="center"/>
  77. <el-table-column :label="$t('装置')" align="center" fixed="left" prop="plantCode" :show-overflow-tooltip="true"/>
  78. <el-table-column :label="$t('单元')" align="center" fixed="left" prop="unit" :show-overflow-tooltip="true"/>
  79. <el-table-column :label="$t('位号')" align="center" fixed="left" prop="devno" :show-overflow-tooltip="true"/>
  80. <el-table-column :label="$t('申请状态')" align="center" fixed="left" prop="approveStatus"
  81. :formatter="approveStatusFormat"/>
  82. <el-table-column :label="$t('设备名称')" align="center" prop="devname" width="200" :show-overflow-tooltip="true"/>
  83. <el-table-column :label="$t('使用证号码')" align="center" prop="useno" :show-overflow-tooltip="true"/>
  84. <el-table-column :label="$t('注册编号')" align="center" prop="regno" :show-overflow-tooltip="true"/>
  85. <el-table-column :label="$t('介质')" align="center" prop="medium" :show-overflow-tooltip="true">
  86. <template slot-scope="scope">
  87. <el-input v-if="scope.row.isEdit" v-model="scope.row.medium" :placeholder="$t('请输入')+$t('介质')"/>
  88. <span v-else>{{ scope.row.medium }}</span>
  89. </template>
  90. </el-table-column>
  91. <el-table-column :label="$t('设计压力')" align="center" prop="desPressure" :show-overflow-tooltip="true">
  92. <template slot-scope="scope">
  93. <el-input v-if="scope.row.isEdit" v-model="scope.row.desPressure" :placeholder="$t('请输入')+$t('设计压力')"/>
  94. <span v-else>{{ scope.row.desPressure }}</span>
  95. </template>
  96. </el-table-column>
  97. <el-table-column :label="$t('设计温度')" align="center" prop="desTemp" :show-overflow-tooltip="true">
  98. <template slot-scope="scope">
  99. <el-input v-if="scope.row.isEdit" v-model="scope.row.desTemp" :placeholder="$t('请输入')+$t('设计温度')"/>
  100. <span v-else>{{ scope.row.desTemp }}</span>
  101. </template>
  102. </el-table-column>
  103. <el-table-column :label="$t('操作压力')" align="center" prop="optPressure" :show-overflow-tooltip="true">
  104. <template slot-scope="scope">
  105. <el-input v-if="scope.row.isEdit" v-model="scope.row.optPressure" :placeholder="$t('请输入')+$t('操作压力')"/>
  106. <span v-else>{{ scope.row.optPressure }}</span>
  107. </template>
  108. </el-table-column>
  109. <el-table-column :label="$t('操作温度')" align="center" prop="optTemp" :show-overflow-tooltip="true">
  110. <template slot-scope="scope">
  111. <el-input v-if="scope.row.isEdit" v-model="scope.row.optTemp" :placeholder="$t('请输入')+$t('操作温度')"/>
  112. <span v-else>{{ scope.row.optTemp }}</span>
  113. </template>
  114. </el-table-column>
  115. <el-table-column :label="$t('安全状况等级')" align="center" prop="safeClass" :show-overflow-tooltip="true"/>
  116. <el-table-column :label="$t('下次定期检验日期')" align="center" prop="nextWarnDate" width="100">
  117. <template slot-scope="scope">
  118. <span>{{ parseTime(scope.row.nextWarnDate, '{y}-{m}-{d}') }}</span>
  119. </template>
  120. </el-table-column>
  121. <el-table-column :label="$t('容器管理')" header-align="center">
  122. <el-table-column label="1" align="center" prop="pj1" :render-header="renderHeader">
  123. <template slot-scope="scope">
  124. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj1" :placeholder="$t('请选择')">
  125. <el-option
  126. v-for="dict in pj1Options"
  127. :key="dict.dictValue"
  128. :label="dict.dictLabel"
  129. :value="dict.dictValue"
  130. ></el-option>
  131. </el-select>
  132. <span v-if="scope.row.isEdit === false && scope.row.pj1 != null">{{ pj1Format(scope.row) }}</span>
  133. </template>
  134. </el-table-column>
  135. <el-table-column label="2" align="center" prop="pj2" :render-header="renderHeader">
  136. <template slot-scope="scope">
  137. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj2" :placeholder="$t('请选择')">
  138. <el-option
  139. v-for="dict in pj2Options"
  140. :key="dict.dictValue"
  141. :label="dict.dictLabel"
  142. :value="dict.dictValue"
  143. ></el-option>
  144. </el-select>
  145. <span v-if="scope.row.isEdit === false && scope.row.pj2 != null">{{ pj2Format(scope.row) }}</span>
  146. </template>
  147. </el-table-column>
  148. <el-table-column label="3" align="center" prop="pj3" :render-header="renderHeader">
  149. <template slot-scope="scope">
  150. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj3" :placeholder="$t('请选择')">
  151. <el-option
  152. v-for="dict in pj3Options"
  153. :key="dict.dictValue"
  154. :label="dict.dictLabel"
  155. :value="dict.dictValue"
  156. ></el-option>
  157. </el-select>
  158. <span v-if="scope.row.isEdit === false && scope.row.pj3 != null">{{ pj3Format(scope.row) }}</span>
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="4" align="center" prop="pj4" :render-header="renderHeader">
  162. <template slot-scope="scope">
  163. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj4" :placeholder="$t('请选择')">
  164. <el-option
  165. v-for="dict in pj4Options"
  166. :key="dict.dictValue"
  167. :label="dict.dictLabel"
  168. :value="dict.dictValue"
  169. ></el-option>
  170. </el-select>
  171. <span v-if="scope.row.isEdit === false && scope.row.pj4 != null">{{ pj4Format(scope.row) }}</span>
  172. </template>
  173. </el-table-column>
  174. <el-table-column label="5" align="center" prop="pj5" :render-header="renderHeader">
  175. <template slot-scope="scope">
  176. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj5" :placeholder="$t('请选择')">
  177. <el-option
  178. v-for="dict in pj5Options"
  179. :key="dict.dictValue"
  180. :label="dict.dictLabel"
  181. :value="dict.dictValue"
  182. ></el-option>
  183. </el-select>
  184. <span v-if="scope.row.isEdit === false && scope.row.pj5 != null">{{ pj5Format(scope.row) }}</span>
  185. </template>
  186. </el-table-column>
  187. <el-table-column label="6" align="center" prop="pj6" :render-header="renderHeader">
  188. <template slot-scope="scope">
  189. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj6" :placeholder="$t('请选择')">
  190. <el-option
  191. v-for="dict in pj6Options"
  192. :key="dict.dictValue"
  193. :label="dict.dictLabel"
  194. :value="dict.dictValue"
  195. ></el-option>
  196. </el-select>
  197. <span v-if="scope.row.isEdit === false && scope.row.pj6 != null">{{ pj6Format(scope.row) }}</span>
  198. </template>
  199. </el-table-column>
  200. <el-table-column label="7" align="center" prop="pj7" :render-header="renderHeader">
  201. <template slot-scope="scope">
  202. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj7" :placeholder="$t('请选择')">
  203. <el-option
  204. v-for="dict in pj7Options"
  205. :key="dict.dictValue"
  206. :label="dict.dictLabel"
  207. :value="dict.dictValue"
  208. ></el-option>
  209. </el-select>
  210. <span v-if="scope.row.isEdit === false && scope.row.pj7 != null">{{ pj7Format(scope.row) }}</span>
  211. </template>
  212. </el-table-column>
  213. </el-table-column>
  214. <el-table-column :label="$t('本体及运行情况')" header-align="center">
  215. <el-table-column label="8" align="center" prop="pj8" :render-header="renderHeader">
  216. <template slot-scope="scope">
  217. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj8" :placeholder="$t('请选择')">
  218. <el-option
  219. v-for="dict in pj8Options"
  220. :key="dict.dictValue"
  221. :label="dict.dictLabel"
  222. :value="dict.dictValue"
  223. ></el-option>
  224. </el-select>
  225. <span v-if="scope.row.isEdit === false && scope.row.pj8 != null">{{ pj8Format(scope.row) }}</span>
  226. </template>
  227. </el-table-column>
  228. <el-table-column label="9" align="center" prop="pj9" :render-header="renderHeader">
  229. <template slot-scope="scope">
  230. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj9" :placeholder="$t('请选择')">
  231. <el-option
  232. v-for="dict in pj9Options"
  233. :key="dict.dictValue"
  234. :label="dict.dictLabel"
  235. :value="dict.dictValue"
  236. ></el-option>
  237. </el-select>
  238. <span v-if="scope.row.isEdit === false && scope.row.pj9 != null">{{ pj9Format(scope.row) }}</span>
  239. </template>
  240. </el-table-column>
  241. <el-table-column label="10" align="center" prop="pj10" :render-header="renderHeader">
  242. <template slot-scope="scope">
  243. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj10" :placeholder="$t('请选择')">
  244. <el-option
  245. v-for="dict in pj10Options"
  246. :key="dict.dictValue"
  247. :label="dict.dictLabel"
  248. :value="dict.dictValue"
  249. ></el-option>
  250. </el-select>
  251. <span v-if="scope.row.isEdit === false && scope.row.pj10 != null">{{ pj10Format(scope.row) }}</span>
  252. </template>
  253. </el-table-column>
  254. <el-table-column label="11" align="center" prop="pj11" :render-header="renderHeader">
  255. <template slot-scope="scope">
  256. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj11" :placeholder="$t('请选择')">
  257. <el-option
  258. v-for="dict in pj11Options"
  259. :key="dict.dictValue"
  260. :label="dict.dictLabel"
  261. :value="dict.dictValue"
  262. ></el-option>
  263. </el-select>
  264. <span v-if="scope.row.isEdit === false && scope.row.pj11 != null">{{ pj11Format(scope.row) }}</span>
  265. </template>
  266. </el-table-column>
  267. <el-table-column label="12" align="center" prop="pj12" :render-header="renderHeader">
  268. <template slot-scope="scope">
  269. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj12" :placeholder="$t('请选择')">
  270. <el-option
  271. v-for="dict in pj12Options"
  272. :key="dict.dictValue"
  273. :label="dict.dictLabel"
  274. :value="dict.dictValue"
  275. ></el-option>
  276. </el-select>
  277. <span v-if="scope.row.isEdit === false && scope.row.pj12 != null">{{ pj12Format(scope.row) }}</span>
  278. </template>
  279. </el-table-column>
  280. <el-table-column label="13" align="center" prop="pj13" :render-header="renderHeader">
  281. <template slot-scope="scope">
  282. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj13" :placeholder="$t('请选择')">
  283. <el-option
  284. v-for="dict in pj13Options"
  285. :key="dict.dictValue"
  286. :label="dict.dictLabel"
  287. :value="dict.dictValue"
  288. ></el-option>
  289. </el-select>
  290. <span v-if="scope.row.isEdit === false && scope.row.pj13 != null">{{ pj13Format(scope.row) }}</span>
  291. </template>
  292. </el-table-column>
  293. <el-table-column label="14" align="center" prop="pj14" :render-header="renderHeader">
  294. <template slot-scope="scope">
  295. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj14" :placeholder="$t('请选择')">
  296. <el-option
  297. v-for="dict in pj14Options"
  298. :key="dict.dictValue"
  299. :label="dict.dictLabel"
  300. :value="dict.dictValue"
  301. ></el-option>
  302. </el-select>
  303. <span v-if="scope.row.isEdit === false && scope.row.pj14 != null">{{ pj14Format(scope.row) }}</span>
  304. </template>
  305. </el-table-column>
  306. <el-table-column label="15" align="center" prop="pj15" :render-header="renderHeader">
  307. <template slot-scope="scope">
  308. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj15" :placeholder="$t('请选择')">
  309. <el-option
  310. v-for="dict in pj15Options"
  311. :key="dict.dictValue"
  312. :label="dict.dictLabel"
  313. :value="dict.dictValue"
  314. ></el-option>
  315. </el-select>
  316. <span v-if="scope.row.isEdit === false && scope.row.pj15 != null">{{ pj15Format(scope.row) }}</span>
  317. </template>
  318. </el-table-column>
  319. <el-table-column label="16" align="center" prop="pj16" :render-header="renderHeader">
  320. <template slot-scope="scope">
  321. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj16" :placeholder="$t('请选择')">
  322. <el-option
  323. v-for="dict in pj16Options"
  324. :key="dict.dictValue"
  325. :label="dict.dictLabel"
  326. :value="dict.dictValue"
  327. ></el-option>
  328. </el-select>
  329. <span v-if="scope.row.isEdit === false && scope.row.pj16 != null">{{ pj16Format(scope.row) }}</span>
  330. </template>
  331. </el-table-column>
  332. <el-table-column label="17" align="center" prop="pj17" :render-header="renderHeader">
  333. <template slot-scope="scope">
  334. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj17" :placeholder="$t('请选择')">
  335. <el-option
  336. v-for="dict in pj17Options"
  337. :key="dict.dictValue"
  338. :label="dict.dictLabel"
  339. :value="dict.dictValue"
  340. ></el-option>
  341. </el-select>
  342. <span v-if="scope.row.isEdit === false && scope.row.pj17 != null">{{ pj17Format(scope.row) }}</span>
  343. </template>
  344. </el-table-column>
  345. <el-table-column label="18" align="center" prop="pj18" :render-header="renderHeader">
  346. <template slot-scope="scope">
  347. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj18" :placeholder="$t('请选择')">
  348. <el-option
  349. v-for="dict in pj18Options"
  350. :key="dict.dictValue"
  351. :label="dict.dictLabel"
  352. :value="dict.dictValue"
  353. ></el-option>
  354. </el-select>
  355. <span v-if="scope.row.isEdit === false && scope.row.pj18 != null">{{ pj18Format(scope.row) }}</span>
  356. </template>
  357. </el-table-column>
  358. <el-table-column label="19" align="center" prop="pj19" :render-header="renderHeader">
  359. <template slot-scope="scope">
  360. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj19" :placeholder="$t('请选择')">
  361. <el-option
  362. v-for="dict in pj19Options"
  363. :key="dict.dictValue"
  364. :label="dict.dictLabel"
  365. :value="dict.dictValue"
  366. ></el-option>
  367. </el-select>
  368. <span v-if="scope.row.isEdit === false && scope.row.pj19 != null">{{ pj19Format(scope.row) }}</span>
  369. </template>
  370. </el-table-column>
  371. <el-table-column label="20" align="center" prop="pj20" :render-header="renderHeader">
  372. <template slot-scope="scope">
  373. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj20" :placeholder="$t('请选择')">
  374. <el-option
  375. v-for="dict in pj20Options"
  376. :key="dict.dictValue"
  377. :label="dict.dictLabel"
  378. :value="dict.dictValue"
  379. ></el-option>
  380. </el-select>
  381. <span v-if="scope.row.isEdit === false && scope.row.pj20 != null">{{ pj20Format(scope.row) }}</span>
  382. </template>
  383. </el-table-column>
  384. <el-table-column label="21" align="center" prop="pj21" :render-header="renderHeader">
  385. <template slot-scope="scope">
  386. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj21" :placeholder="$t('请选择')">
  387. <el-option
  388. v-for="dict in pj21Options"
  389. :key="dict.dictValue"
  390. :label="dict.dictLabel"
  391. :value="dict.dictValue"
  392. ></el-option>
  393. </el-select>
  394. <span v-if="scope.row.isEdit === false && scope.row.pj21 != null">{{ pj21Format(scope.row) }}</span>
  395. </template>
  396. </el-table-column>
  397. <el-table-column label="22" align="center" prop="pj22" :render-header="renderHeader">
  398. <template slot-scope="scope">
  399. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj22" :placeholder="$t('请选择')">
  400. <el-option
  401. v-for="dict in pj22Options"
  402. :key="dict.dictValue"
  403. :label="dict.dictLabel"
  404. :value="dict.dictValue"
  405. ></el-option>
  406. </el-select>
  407. <span v-if="scope.row.isEdit === false && scope.row.pj22 != null">{{ pj22Format(scope.row) }}</span>
  408. </template>
  409. </el-table-column>
  410. <el-table-column label="23" align="center" prop="pj23" :render-header="renderHeader">
  411. <template slot-scope="scope">
  412. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj23" :placeholder="$t('请选择')">
  413. <el-option
  414. v-for="dict in pj23Options"
  415. :key="dict.dictValue"
  416. :label="dict.dictLabel"
  417. :value="dict.dictValue"
  418. ></el-option>
  419. </el-select>
  420. <span v-if="scope.row.isEdit === false && scope.row.pj23 != null">{{ pj23Format(scope.row) }}</span>
  421. </template>
  422. </el-table-column>
  423. <el-table-column label="24" align="center" prop="pj24" :render-header="renderHeader">
  424. <template slot-scope="scope">
  425. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj24" :placeholder="$t('请选择')">
  426. <el-option
  427. v-for="dict in pj24Options"
  428. :key="dict.dictValue"
  429. :label="dict.dictLabel"
  430. :value="dict.dictValue"
  431. ></el-option>
  432. </el-select>
  433. <span v-if="scope.row.isEdit === false && scope.row.pj24 != null">{{ pj24Format(scope.row) }}</span>
  434. </template>
  435. </el-table-column>
  436. </el-table-column>
  437. <el-table-column :label="$t('安全附件及设施')" header-align="center">
  438. <el-table-column label="25" align="center" prop="pj25" :render-header="renderHeader">
  439. <template slot-scope="scope">
  440. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj25" :placeholder="$t('请选择')">
  441. <el-option
  442. v-for="dict in pj25Options"
  443. :key="dict.dictValue"
  444. :label="dict.dictLabel"
  445. :value="dict.dictValue"
  446. ></el-option>
  447. </el-select>
  448. <span v-if="scope.row.isEdit === false && scope.row.pj25 != null">{{ pj25Format(scope.row) }}</span>
  449. </template>
  450. </el-table-column>
  451. <el-table-column label="26" align="center" prop="pj26" :render-header="renderHeader">
  452. <template slot-scope="scope">
  453. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj26" :placeholder="$t('请选择')">
  454. <el-option
  455. v-for="dict in pj26Options"
  456. :key="dict.dictValue"
  457. :label="dict.dictLabel"
  458. :value="dict.dictValue"
  459. ></el-option>
  460. </el-select>
  461. <span v-if="scope.row.isEdit === false && scope.row.pj26 != null">{{ pj26Format(scope.row) }}</span>
  462. </template>
  463. </el-table-column>
  464. <el-table-column label="27" align="center" prop="pj27" :render-header="renderHeader">
  465. <template slot-scope="scope">
  466. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj27" :placeholder="$t('请选择')">
  467. <el-option
  468. v-for="dict in pj27Options"
  469. :key="dict.dictValue"
  470. :label="dict.dictLabel"
  471. :value="dict.dictValue"
  472. ></el-option>
  473. </el-select>
  474. <span v-if="scope.row.isEdit === false && scope.row.pj27 != null">{{ pj27Format(scope.row) }}</span>
  475. </template>
  476. </el-table-column>
  477. <el-table-column label="28" align="center" prop="pj28" :render-header="renderHeader">
  478. <template slot-scope="scope">
  479. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj28" :placeholder="$t('请选择')">
  480. <el-option
  481. v-for="dict in pj28Options"
  482. :key="dict.dictValue"
  483. :label="dict.dictLabel"
  484. :value="dict.dictValue"
  485. ></el-option>
  486. </el-select>
  487. <span v-if="scope.row.isEdit === false && scope.row.pj28 != null">{{ pj28Format(scope.row) }}</span>
  488. </template>
  489. </el-table-column>
  490. <el-table-column label="29" align="center" prop="pj29" :render-header="renderHeader">
  491. <template slot-scope="scope">
  492. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj29" :placeholder="$t('请选择')">
  493. <el-option
  494. v-for="dict in pj29Options"
  495. :key="dict.dictValue"
  496. :label="dict.dictLabel"
  497. :value="dict.dictValue"
  498. ></el-option>
  499. </el-select>
  500. <span v-if="scope.row.isEdit === false && scope.row.pj29 != null">{{ pj29Format(scope.row) }}</span>
  501. </template>
  502. </el-table-column>
  503. <el-table-column label="30" align="center" prop="pj30" :render-header="renderHeader">
  504. <template slot-scope="scope">
  505. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj30" :placeholder="$t('请选择')">
  506. <el-option
  507. v-for="dict in pj30Options"
  508. :key="dict.dictValue"
  509. :label="dict.dictLabel"
  510. :value="dict.dictValue"
  511. ></el-option>
  512. </el-select>
  513. <span v-if="scope.row.isEdit === false && scope.row.pj30 != null">{{ pj30Format(scope.row) }}</span>
  514. </template>
  515. </el-table-column>
  516. <el-table-column label="31" align="center" prop="pj31" :render-header="renderHeader">
  517. <template slot-scope="scope">
  518. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj31" :placeholder="$t('请选择')">
  519. <el-option
  520. v-for="dict in pj31Options"
  521. :key="dict.dictValue"
  522. :label="dict.dictLabel"
  523. :value="dict.dictValue"
  524. ></el-option>
  525. </el-select>
  526. <span v-if="scope.row.isEdit === false && scope.row.pj31 != null">{{ pj31Format(scope.row) }}</span>
  527. </template>
  528. </el-table-column>
  529. </el-table-column>
  530. <el-table-column :label="$t('其他')" header-align="center">
  531. <el-table-column label="32" align="center" prop="pj32" :render-header="renderHeader">
  532. <template slot-scope="scope">
  533. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj32" :placeholder="$t('请选择')">
  534. <el-option
  535. v-for="dict in pj32Options"
  536. :key="dict.dictValue"
  537. :label="dict.dictLabel"
  538. :value="dict.dictValue"
  539. ></el-option>
  540. </el-select>
  541. <span v-if="scope.row.isEdit === false && scope.row.pj32 != null">{{ pj32Format(scope.row) }}</span>
  542. </template>
  543. </el-table-column>
  544. </el-table-column>
  545. <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true">
  546. <template slot-scope="scope">
  547. <el-input v-if="scope.row.isEdit" v-model="scope.row.remarks" :placeholder="$t('请输入')+$t('备注')"/>
  548. <span v-else>{{ scope.row.remarks }}</span>
  549. </template>
  550. </el-table-column>
  551. <el-table-column :label="$t('检查日期')" align="center" prop="checkDate" width="100">
  552. <template slot-scope="scope">
  553. <el-date-picker clearable size="small" style="width: 200px"
  554. v-model="scope.row.checkDate"
  555. type="date"
  556. v-if="scope.row.isEdit"
  557. value-format="yyyy-MM-dd"
  558. :placeholder="$t('请选择')+$t('检查日期')">
  559. </el-date-picker>
  560. <span v-else>{{ parseTime(scope.row.checkDate, '{y}-{m}-{d}') }}</span>
  561. </template>
  562. </el-table-column>
  563. <el-table-column :label="$t('下次年度检查日期')" align="center" prop="nextCheckDate" width="100">
  564. <template slot-scope="scope">
  565. <el-date-picker clearable size="small" style="width: 200px"
  566. v-model="scope.row.nextCheckDate"
  567. type="date"
  568. v-if="scope.row.isEdit"
  569. value-format="yyyy-MM-dd"
  570. :placeholder="$t('请选择')+$t('下次年度检查日期')">
  571. </el-date-picker>
  572. <span v-else>{{ parseTime(scope.row.nextCheckDate, '{y}-{m}-{d}') }}</span>
  573. </template>
  574. </el-table-column>
  575. <el-table-column :label="$t('问题及处理')" align="center" prop="problem" :show-overflow-tooltip="true">
  576. <template slot-scope="scope">
  577. <el-input v-if="scope.row.isEdit" v-model="scope.row.problem" :placeholder="$t('请输入')+$t('问题及处理')"/>
  578. <span v-else>{{ scope.row.problem }}</span>
  579. </template>
  580. </el-table-column>
  581. <el-table-column :label="$t('检查结论')" align="center" prop="con" :formatter="conFormat">
  582. <template slot-scope="scope">
  583. <el-select v-if="scope.row.isEdit" v-model="scope.row.con" :placeholder="$t('请选择')+$t('检查结论')">
  584. <el-option
  585. v-for="dict in conOptions"
  586. :key="dict.dictValue"
  587. :label="dict.dictLabel"
  588. :value="dict.dictValue"
  589. ></el-option>
  590. </el-select>
  591. <span v-if="scope.row.isEdit === false && scope.row.con != null">{{ conFormat(scope.row) }}</span>
  592. </template>
  593. </el-table-column>
  594. <el-table-column :label="$t('操作')" align="center" fixed="right" width="200"
  595. class-name="small-padding fixed-width">
  596. <template slot-scope="scope">
  597. <el-button
  598. size="mini"
  599. type="text"
  600. icon="el-icon-edit"
  601. @click="handleUpdate(scope.row)"
  602. v-if="!scope.row.isEdit"
  603. v-hasPermi="['sems:reportYlrq:edit']"
  604. >{{ $t('修改') }}
  605. </el-button>
  606. <el-button
  607. size="mini"
  608. type="text"
  609. icon="el-icon-tickets"
  610. @click="handleHistory(scope.row)"
  611. v-if="!scope.row.isEdit"
  612. v-hasPermi="['sems:reportYlrq:edit']"
  613. >{{ $t('历史报告') }}
  614. </el-button>
  615. <el-button
  616. size="mini"
  617. type="text"
  618. icon="el-icon-delete"
  619. @click="handleDelete(scope.row)"
  620. v-if="!scope.row.isEdit"
  621. v-hasPermi="['sems:reportYlrq:remove']"
  622. >{{ $t('删除') }}
  623. </el-button>
  624. <el-button
  625. v-hasPermi="['sems:reportYlrq:edit']"
  626. type="text"
  627. size="mini"
  628. v-if="scope.row.isEdit"
  629. @click="handleSave(scope.row)"
  630. >{{ $t('保存') }}
  631. </el-button>
  632. <el-button
  633. type="text"
  634. size="small"
  635. v-if="scope.row.isEdit"
  636. @click="handleCancel(scope.row, scope.$index)"
  637. >{{ $t('取消') }}
  638. </el-button>
  639. </template>
  640. </el-table-column>
  641. </el-table>
  642. <pagination
  643. v-show="total>0"
  644. :total="total"
  645. :page.sync="queryParams.pageNum"
  646. :limit.sync="queryParams.pageSize"
  647. @pagination="getList"
  648. />
  649. <!-- 历史报告对话框 -->
  650. <el-dialog v-dialogDrag :title="title" :visible.sync="open" width="1800px" append-to-body>
  651. <el-table :data="historyYlrqList" border>
  652. <el-table-column :label="$t('生成时间')" align="center" prop="buildDate" fixed="left" width="100">
  653. <template slot-scope="scope">
  654. <span>{{ parseTime(scope.row.buildDate, '{y}-{m}-{d}') }}</span>
  655. </template>
  656. </el-table-column>
  657. <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :show-overflow-tooltip="true"/>
  658. <el-table-column :label="$t('单元')" align="center" prop="unit" :show-overflow-tooltip="true"/>
  659. <el-table-column :label="$t('位号')" align="center" prop="devno" :show-overflow-tooltip="true"/>
  660. <el-table-column :label="$t('名称')" align="center" prop="devname" :show-overflow-tooltip="true"/>
  661. <el-table-column :label="$t('使用证号码')" align="center" prop="useno" :show-overflow-tooltip="true"/>
  662. <el-table-column :label="$t('注册代码')" align="center" prop="regno" :show-overflow-tooltip="true"/>
  663. <el-table-column :label="$t('介质')" align="center" prop="medium" :show-overflow-tooltip="true"/>
  664. <el-table-column :label="$t('设计压力')" align="center" prop="desPressure" :show-overflow-tooltip="true"/>
  665. <el-table-column :label="$t('设计温度')" align="center" prop="desTemp" :show-overflow-tooltip="true"/>
  666. <el-table-column :label="$t('操作压力')" align="center" prop="optPressure" :show-overflow-tooltip="true"/>
  667. <el-table-column :label="$t('操作温度')" align="center" prop="optTemp" :show-overflow-tooltip="true"/>
  668. <el-table-column :label="$t('安全状况等级')" align="center" prop="safeClass" :show-overflow-tooltip="true"/>
  669. <el-table-column :label="$t('下次定期检验日期')" align="center" prop="nextWarnDate" width="100">
  670. <template slot-scope="scope">
  671. <span>{{ parseTime(scope.row.nextWarnDate, '{y}-{m}-{d}') }}</span>
  672. </template>
  673. </el-table-column>
  674. <el-table-column :label="$t('年检报告编号')" align="center" prop="yearReportNo" :show-overflow-tooltip="true"/>
  675. <el-table-column label="1" align="center" prop="pj1" :formatter="pj1Format" :render-header="renderHeader"/>
  676. <el-table-column label="2" align="center" prop="pj2" :formatter="pj2Format" :render-header="renderHeader"/>
  677. <el-table-column label="3" align="center" prop="pj3" :formatter="pj3Format" :render-header="renderHeader"/>
  678. <el-table-column label="4" align="center" prop="pj4" :formatter="pj4Format" :render-header="renderHeader"/>
  679. <el-table-column label="5" align="center" prop="pj5" :formatter="pj5Format" :render-header="renderHeader"/>
  680. <el-table-column label="6" align="center" prop="pj6" :formatter="pj6Format" :render-header="renderHeader"/>
  681. <el-table-column label="7" align="center" prop="pj7" :formatter="pj7Format" :render-header="renderHeader"/>
  682. <el-table-column label="8" align="center" prop="pj8" :formatter="pj8Format" :render-header="renderHeader"/>
  683. <el-table-column label="9" align="center" prop="pj9" :formatter="pj9Format" :render-header="renderHeader"/>
  684. <el-table-column label="10" align="center" prop="pj10" :formatter="pj10Format" :render-header="renderHeader"/>
  685. <el-table-column label="11" align="center" prop="pj11" :formatter="pj11Format" :render-header="renderHeader"/>
  686. <el-table-column label="12" align="center" prop="pj12" :formatter="pj12Format" :render-header="renderHeader"/>
  687. <el-table-column label="13" align="center" prop="pj13" :formatter="pj13Format" :render-header="renderHeader"/>
  688. <el-table-column label="14" align="center" prop="pj14" :formatter="pj14Format" :render-header="renderHeader"/>
  689. <el-table-column label="15" align="center" prop="pj15" :formatter="pj15Format" :render-header="renderHeader"/>
  690. <el-table-column label="16" align="center" prop="pj16" :formatter="pj16Format" :render-header="renderHeader"/>
  691. <el-table-column label="17" align="center" prop="pj17" :formatter="pj17Format" :render-header="renderHeader"/>
  692. <el-table-column label="18" align="center" prop="pj18" :formatter="pj18Format" :render-header="renderHeader"/>
  693. <el-table-column label="19" align="center" prop="pj19" :formatter="pj19Format" :render-header="renderHeader"/>
  694. <el-table-column label="20" align="center" prop="pj20" :formatter="pj20Format" :render-header="renderHeader"/>
  695. <el-table-column label="21" align="center" prop="pj21" :formatter="pj21Format" :render-header="renderHeader"/>
  696. <el-table-column label="22" align="center" prop="pj22" :formatter="pj22Format" :render-header="renderHeader"/>
  697. <el-table-column label="23" align="center" prop="pj23" :formatter="pj23Format" :render-header="renderHeader"/>
  698. <el-table-column label="24" align="center" prop="pj24" :formatter="pj24Format" :render-header="renderHeader"/>
  699. <el-table-column label="25" align="center" prop="pj25" :formatter="pj25Format" :render-header="renderHeader"/>
  700. <el-table-column label="26" align="center" prop="pj26" :formatter="pj26Format" :render-header="renderHeader"/>
  701. <el-table-column label="27" align="center" prop="pj27" :formatter="pj27Format" :render-header="renderHeader"/>
  702. <el-table-column label="28" align="center" prop="pj28" :formatter="pj28Format" :render-header="renderHeader"/>
  703. <el-table-column label="29" align="center" prop="pj29" :formatter="pj29Format" :render-header="renderHeader"/>
  704. <el-table-column label="30" align="center" prop="pj30" :formatter="pj30Format" :render-header="renderHeader"/>
  705. <el-table-column label="31" align="center" prop="pj31" :formatter="pj31Format" :render-header="renderHeader"/>
  706. <el-table-column label="32" align="center" prop="pj32" :formatter="pj32Format" :render-header="renderHeader"/>
  707. <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
  708. <el-table-column :label="$t('检查日期')" align="center" prop="checkDate" width="100">
  709. <template slot-scope="scope">
  710. <span>{{ parseTime(scope.row.checkDate, '{y}-{m}-{d}') }}</span>
  711. </template>
  712. </el-table-column>
  713. <el-table-column :label="$t('下次年度检查日期')" align="center" prop="nextCheckDate" width="100">
  714. <template slot-scope="scope">
  715. <span>{{ parseTime(scope.row.nextCheckDate, '{y}-{m}-{d}') }}</span>
  716. </template>
  717. </el-table-column>
  718. <el-table-column :label="$t('问题及处理')" align="center" prop="problem" :show-overflow-tooltip="true"/>
  719. <el-table-column :label="$t('检查结论')" align="center" prop="con" :formatter="conFormat"/>
  720. <el-table-column :label="$t('操作')" align="center" fixed="right" width="120"
  721. class-name="small-padding fixed-width">
  722. <template slot-scope="scope">
  723. <el-button v-hasPermi="['sems:historyYlgd:export']" type="text" size="small"
  724. @click="downloadReport(scope.row)">{{ $t('下载报告') }}
  725. </el-button>
  726. </template>
  727. </el-table-column>
  728. </el-table>
  729. <form ref="downloadForm" :action="downloadAction" target="FORMSUBMIT">
  730. <input name="id" v-model="downloadForm.id" hidden/>
  731. </form>
  732. </el-dialog>
  733. <year-approve v-if="approveVisible" ref="yearApprove" @refreshDataList="getList"></year-approve>
  734. <form ref="downloadForm2" :action="downloadAction2" target="FORMSUBMIT">
  735. <input name="year" v-model="downloadForm2.year" hidden/>
  736. </form>
  737. <!-- 批量导出年检报告的历史报告 -->
  738. <el-dialog
  739. title="选择需要导出的历史报告年份"
  740. :visible.sync="dialogVisible"
  741. width="20%">
  742. <el-date-picker
  743. v-model="exportCheckYear"
  744. type="year"
  745. placeholder="选择需要导出的历史报告年份">
  746. </el-date-picker>
  747. <span slot="footer" class="dialog-footer">
  748. <el-button @click="dialogVisible = false">取 消</el-button>
  749. <el-button type="primary" @click="exportDataForYear">确 定</el-button>
  750. </span>
  751. </el-dialog>
  752. </div>
  753. </template>
  754. <script>
  755. import {
  756. listReportYlrq,
  757. getReportYlrq,
  758. delReportYlrq,
  759. addReportYlrq,
  760. updateReportYlrq,
  761. exportReportYlrq,
  762. importTemplate,
  763. syncReportYlrq
  764. } from "@/api/sems/reportYlrq";
  765. import {listHistoryYlrq} from "@/api/sems/historyYlrq";
  766. import {treeselect} from "@/api/system/dept";
  767. import Treeselect from "@riophae/vue-treeselect";
  768. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  769. import YearApprove from './yearapprove'
  770. export default {
  771. name: "ReportYlrq",
  772. components: {Treeselect, YearApprove},
  773. data() {
  774. return {
  775. exportCheckYear: null,
  776. dialogVisible: false,
  777. // 遮罩层
  778. loading: true,
  779. approveVisible: false,
  780. // 选中数组
  781. ids: [],
  782. dataListSelections: [],
  783. // 非单个禁用
  784. single: true,
  785. // 非多个禁用
  786. multiple: true,
  787. // 显示搜索条件
  788. showSearch: false,
  789. // 总条数
  790. total: 0,
  791. // 压力容器年检报告表格数据
  792. reportYlrqList: [],
  793. // 压力容器报告历史表格数据
  794. historyYlrqList: [],
  795. // 弹出层标题
  796. title: "",
  797. // 部门树选项
  798. deptOptions: undefined,
  799. clientHeight: 300,
  800. // 是否显示弹出层
  801. open: false,
  802. approveStatusOptions: [],
  803. // 1字典
  804. pj1Options: [],
  805. // 2字典
  806. pj2Options: [],
  807. // 3字典
  808. pj3Options: [],
  809. // 4字典
  810. pj4Options: [],
  811. // 5字典
  812. pj5Options: [],
  813. // 6字典
  814. pj6Options: [],
  815. // 7字典
  816. pj7Options: [],
  817. // 8字典
  818. pj8Options: [],
  819. // 9字典
  820. pj9Options: [],
  821. // 10字典
  822. pj10Options: [],
  823. // 11字典
  824. pj11Options: [],
  825. // 12字典
  826. pj12Options: [],
  827. // 13字典
  828. pj13Options: [],
  829. // 14字典
  830. pj14Options: [],
  831. // 15字典
  832. pj15Options: [],
  833. // 16字典
  834. pj16Options: [],
  835. // 17字典
  836. pj17Options: [],
  837. // 18字典
  838. pj18Options: [],
  839. // 19字典
  840. pj19Options: [],
  841. // 20字典
  842. pj20Options: [],
  843. // 21字典
  844. pj21Options: [],
  845. // 22字典
  846. pj22Options: [],
  847. // 23字典
  848. pj23Options: [],
  849. // 24字典
  850. pj24Options: [],
  851. // 25字典
  852. pj25Options: [],
  853. // 26字典
  854. pj26Options: [],
  855. // 27字典
  856. pj27Options: [],
  857. // 28字典
  858. pj28Options: [],
  859. // 29字典
  860. pj29Options: [],
  861. // 30字典
  862. pj30Options: [],
  863. // 31字典
  864. pj31Options: [],
  865. // 32字典
  866. pj32Options: [],
  867. // 检查结论字典
  868. conOptions: [],
  869. // 查询参数
  870. queryParams: {
  871. plantCode: null,
  872. unit: null,
  873. approveStatus: null,
  874. devno: null,
  875. pageNum: 1,
  876. pageSize: 20,
  877. },
  878. // 查询参数
  879. queryHistoryParams: {
  880. pageNum: 1,
  881. pageSize: 20,
  882. reportId: null,
  883. },
  884. // 表单参数
  885. form: {},
  886. //下载参数
  887. downloadForm: {
  888. id: '',
  889. },
  890. downloadForm2: {
  891. year: '',
  892. },
  893. downloadAction: process.env.VUE_APP_BASE_API + '/sems/historyYlrq/exportPDF',
  894. downloadAction2: process.env.VUE_APP_BASE_API + '/sems/historyYlrq/exportPDFForYear',
  895. // 表单校验
  896. rules: {
  897. devId: [
  898. {required: true, message: this.$t('设备id') + this.$t('不能为空'), trigger: "blur"}
  899. ],
  900. }
  901. };
  902. },
  903. watch: {
  904. // 根据名称筛选部门树
  905. deptName(val) {
  906. this.$refs.tree.filter(val);
  907. }
  908. },
  909. created() {
  910. //设置表格高度对应屏幕高度
  911. this.$nextTick(() => {
  912. this.clientHeight = (document.body.clientHeight - 80) * 0.8
  913. })
  914. this.getList();
  915. this.getTreeselect();
  916. this.getDicts("spec_approve_status").then(response => {
  917. this.approveStatusOptions = response.data;
  918. });
  919. this.getDicts("TEST_RESULT").then(response => {
  920. this.pj1Options = response.data;
  921. });
  922. this.getDicts("TEST_RESULT").then(response => {
  923. this.pj2Options = response.data;
  924. });
  925. this.getDicts("TEST_RESULT").then(response => {
  926. this.pj3Options = response.data;
  927. });
  928. this.getDicts("TEST_RESULT").then(response => {
  929. this.pj4Options = response.data;
  930. });
  931. this.getDicts("TEST_RESULT").then(response => {
  932. this.pj5Options = response.data;
  933. });
  934. this.getDicts("TEST_RESULT").then(response => {
  935. this.pj6Options = response.data;
  936. });
  937. this.getDicts("TEST_RESULT").then(response => {
  938. this.pj7Options = response.data;
  939. });
  940. this.getDicts("TEST_RESULT").then(response => {
  941. this.pj8Options = response.data;
  942. });
  943. this.getDicts("TEST_RESULT").then(response => {
  944. this.pj9Options = response.data;
  945. });
  946. this.getDicts("TEST_RESULT").then(response => {
  947. this.pj10Options = response.data;
  948. });
  949. this.getDicts("TEST_RESULT").then(response => {
  950. this.pj11Options = response.data;
  951. });
  952. this.getDicts("TEST_RESULT").then(response => {
  953. this.pj12Options = response.data;
  954. });
  955. this.getDicts("TEST_RESULT").then(response => {
  956. this.pj13Options = response.data;
  957. });
  958. this.getDicts("TEST_RESULT").then(response => {
  959. this.pj14Options = response.data;
  960. });
  961. this.getDicts("TEST_RESULT").then(response => {
  962. this.pj15Options = response.data;
  963. });
  964. this.getDicts("TEST_RESULT").then(response => {
  965. this.pj16Options = response.data;
  966. });
  967. this.getDicts("TEST_RESULT").then(response => {
  968. this.pj17Options = response.data;
  969. });
  970. this.getDicts("TEST_RESULT").then(response => {
  971. this.pj18Options = response.data;
  972. });
  973. this.getDicts("TEST_RESULT").then(response => {
  974. this.pj19Options = response.data;
  975. });
  976. this.getDicts("TEST_RESULT").then(response => {
  977. this.pj20Options = response.data;
  978. });
  979. this.getDicts("TEST_RESULT").then(response => {
  980. this.pj21Options = response.data;
  981. });
  982. this.getDicts("TEST_RESULT").then(response => {
  983. this.pj22Options = response.data;
  984. });
  985. this.getDicts("TEST_RESULT").then(response => {
  986. this.pj23Options = response.data;
  987. });
  988. this.getDicts("TEST_RESULT").then(response => {
  989. this.pj24Options = response.data;
  990. });
  991. this.getDicts("TEST_RESULT").then(response => {
  992. this.pj25Options = response.data;
  993. });
  994. this.getDicts("TEST_RESULT").then(response => {
  995. this.pj26Options = response.data;
  996. });
  997. this.getDicts("TEST_RESULT").then(response => {
  998. this.pj27Options = response.data;
  999. });
  1000. this.getDicts("TEST_RESULT").then(response => {
  1001. this.pj28Options = response.data;
  1002. });
  1003. this.getDicts("TEST_RESULT").then(response => {
  1004. this.pj29Options = response.data;
  1005. });
  1006. this.getDicts("TEST_RESULT").then(response => {
  1007. this.pj30Options = response.data;
  1008. });
  1009. this.getDicts("TEST_RESULT").then(response => {
  1010. this.pj31Options = response.data;
  1011. });
  1012. this.getDicts("TEST_RESULT").then(response => {
  1013. this.pj32Options = response.data;
  1014. });
  1015. this.getDicts("REPORT_CON").then(response => {
  1016. this.conOptions = response.data;
  1017. });
  1018. },
  1019. methods: {
  1020. /** 查询压力容器年检报告列表 */
  1021. getList() {
  1022. this.loading = true;
  1023. console.log(this.queryParams.approveStatus);
  1024. listReportYlrq(this.queryParams).then(response => {
  1025. response.rows.forEach(element => {
  1026. element["isEdit"] = false
  1027. });
  1028. this.reportYlrqList = response.rows;
  1029. this.total = response.total;
  1030. this.loading = false;
  1031. this.$nextTick(() => {
  1032. this.$refs.reportTable.doLayout(); // 解决表格错位
  1033. });
  1034. });
  1035. },
  1036. /** 查询部门下拉树结构 */
  1037. getTreeselect() {
  1038. treeselect().then(response => {
  1039. this.deptOptions = response.data;
  1040. });
  1041. },
  1042. // 申请状态字典翻译
  1043. approveStatusFormat(row, column) {
  1044. return this.selectDictLabel(this.approveStatusOptions, row.approveStatus);
  1045. },
  1046. // 1字典翻译
  1047. pj1Format(row, column) {
  1048. return this.selectDictLabel(this.pj1Options, row.pj1);
  1049. },
  1050. // 2字典翻译
  1051. pj2Format(row, column) {
  1052. return this.selectDictLabel(this.pj2Options, row.pj2);
  1053. },
  1054. // 3字典翻译
  1055. pj3Format(row, column) {
  1056. return this.selectDictLabel(this.pj3Options, row.pj3);
  1057. },
  1058. // 4字典翻译
  1059. pj4Format(row, column) {
  1060. return this.selectDictLabel(this.pj4Options, row.pj4);
  1061. },
  1062. // 5字典翻译
  1063. pj5Format(row, column) {
  1064. return this.selectDictLabel(this.pj5Options, row.pj5);
  1065. },
  1066. // 6字典翻译
  1067. pj6Format(row, column) {
  1068. return this.selectDictLabel(this.pj6Options, row.pj6);
  1069. },
  1070. // 7字典翻译
  1071. pj7Format(row, column) {
  1072. return this.selectDictLabel(this.pj7Options, row.pj7);
  1073. },
  1074. // 8字典翻译
  1075. pj8Format(row, column) {
  1076. return this.selectDictLabel(this.pj8Options, row.pj8);
  1077. },
  1078. // 9字典翻译
  1079. pj9Format(row, column) {
  1080. return this.selectDictLabel(this.pj9Options, row.pj9);
  1081. },
  1082. // 10字典翻译
  1083. pj10Format(row, column) {
  1084. return this.selectDictLabel(this.pj10Options, row.pj10);
  1085. },
  1086. // 11字典翻译
  1087. pj11Format(row, column) {
  1088. return this.selectDictLabel(this.pj11Options, row.pj11);
  1089. },
  1090. // 12字典翻译
  1091. pj12Format(row, column) {
  1092. return this.selectDictLabel(this.pj12Options, row.pj12);
  1093. },
  1094. // 13字典翻译
  1095. pj13Format(row, column) {
  1096. return this.selectDictLabel(this.pj13Options, row.pj13);
  1097. },
  1098. // 14字典翻译
  1099. pj14Format(row, column) {
  1100. return this.selectDictLabel(this.pj14Options, row.pj14);
  1101. },
  1102. // 15字典翻译
  1103. pj15Format(row, column) {
  1104. return this.selectDictLabel(this.pj15Options, row.pj15);
  1105. },
  1106. // 16字典翻译
  1107. pj16Format(row, column) {
  1108. return this.selectDictLabel(this.pj16Options, row.pj16);
  1109. },
  1110. // 17字典翻译
  1111. pj17Format(row, column) {
  1112. return this.selectDictLabel(this.pj17Options, row.pj17);
  1113. },
  1114. // 18字典翻译
  1115. pj18Format(row, column) {
  1116. return this.selectDictLabel(this.pj18Options, row.pj18);
  1117. },
  1118. // 19字典翻译
  1119. pj19Format(row, column) {
  1120. return this.selectDictLabel(this.pj19Options, row.pj19);
  1121. },
  1122. // 20字典翻译
  1123. pj20Format(row, column) {
  1124. return this.selectDictLabel(this.pj20Options, row.pj20);
  1125. },
  1126. // 21字典翻译
  1127. pj21Format(row, column) {
  1128. return this.selectDictLabel(this.pj21Options, row.pj21);
  1129. },
  1130. // 22字典翻译
  1131. pj22Format(row, column) {
  1132. return this.selectDictLabel(this.pj22Options, row.pj22);
  1133. },
  1134. // 23字典翻译
  1135. pj23Format(row, column) {
  1136. return this.selectDictLabel(this.pj23Options, row.pj23);
  1137. },
  1138. // 24字典翻译
  1139. pj24Format(row, column) {
  1140. return this.selectDictLabel(this.pj24Options, row.pj24);
  1141. },
  1142. // 25字典翻译
  1143. pj25Format(row, column) {
  1144. return this.selectDictLabel(this.pj25Options, row.pj25);
  1145. },
  1146. // 26字典翻译
  1147. pj26Format(row, column) {
  1148. return this.selectDictLabel(this.pj26Options, row.pj26);
  1149. },
  1150. // 27字典翻译
  1151. pj27Format(row, column) {
  1152. return this.selectDictLabel(this.pj27Options, row.pj27);
  1153. },
  1154. // 28字典翻译
  1155. pj28Format(row, column) {
  1156. return this.selectDictLabel(this.pj28Options, row.pj28);
  1157. },
  1158. // 29字典翻译
  1159. pj29Format(row, column) {
  1160. return this.selectDictLabel(this.pj29Options, row.pj29);
  1161. },
  1162. // 30字典翻译
  1163. pj30Format(row, column) {
  1164. return this.selectDictLabel(this.pj30Options, row.pj30);
  1165. },
  1166. // 31字典翻译
  1167. pj31Format(row, column) {
  1168. return this.selectDictLabel(this.pj31Options, row.pj31);
  1169. },
  1170. // 32字典翻译
  1171. pj32Format(row, column) {
  1172. return this.selectDictLabel(this.pj32Options, row.pj32);
  1173. },
  1174. // 检查结论字典翻译
  1175. conFormat(row, column) {
  1176. return this.selectDictLabel(this.conOptions, row.con);
  1177. },
  1178. // 表单重置
  1179. reset() {
  1180. this.form = {
  1181. id: null,
  1182. devId: null,
  1183. medium: null,
  1184. desPressure: null,
  1185. desTemp: null,
  1186. optPressure: null,
  1187. optTemp: null,
  1188. pj1: null,
  1189. pj2: null,
  1190. pj3: null,
  1191. pj4: null,
  1192. pj5: null,
  1193. pj6: null,
  1194. pj7: null,
  1195. pj8: null,
  1196. pj9: null,
  1197. pj10: null,
  1198. pj11: null,
  1199. pj12: null,
  1200. pj13: null,
  1201. pj14: null,
  1202. pj15: null,
  1203. pj16: null,
  1204. pj17: null,
  1205. pj18: null,
  1206. pj19: null,
  1207. pj20: null,
  1208. pj21: null,
  1209. pj22: null,
  1210. pj23: null,
  1211. pj24: null,
  1212. pj25: null,
  1213. pj26: null,
  1214. pj27: null,
  1215. pj28: null,
  1216. pj29: null,
  1217. pj30: null,
  1218. pj31: null,
  1219. pj32: null,
  1220. remarks: null,
  1221. checkDate: null,
  1222. nextCheckDate: null,
  1223. problem: null,
  1224. con: null,
  1225. approveStatus: 0,
  1226. approveTime: null,
  1227. deptId: null,
  1228. delFlag: null,
  1229. createrCode: null,
  1230. createdate: null,
  1231. updaterCode: null,
  1232. updatedate: null
  1233. };
  1234. this.resetForm("form");
  1235. },
  1236. /** 搜索按钮操作 */
  1237. handleQuery() {
  1238. this.queryParams.pageNum = 1;
  1239. this.getList();
  1240. },
  1241. /** 重置按钮操作 */
  1242. resetQuery() {
  1243. this.resetForm("queryForm");
  1244. this.handleQuery();
  1245. },
  1246. // 多选框选中数据
  1247. handleSelectionChange(selection) {
  1248. this.ids = selection.map(item => item.id)
  1249. this.single = selection.length !== 1
  1250. this.multiple = !selection.length
  1251. this.dataListSelections = selection
  1252. },
  1253. /** 历史报告按钮操作 */
  1254. handleHistory(row) {
  1255. this.queryHistoryParams.reportId = row.id;
  1256. listHistoryYlrq(this.queryHistoryParams).then(response => {
  1257. this.historyYlrqList = response.rows;
  1258. this.open = true;
  1259. this.title = row.devno + this.$t('空格') + this.$t('历史报告');
  1260. });
  1261. },
  1262. /** 修改按钮操作 */
  1263. handleUpdate(row) {
  1264. // 备份原始数据
  1265. row['oldRow'] = JSON.parse(JSON.stringify(row));
  1266. this.$nextTick(() => {
  1267. row.isEdit = true;
  1268. })
  1269. },
  1270. /** 保存按钮操作 */
  1271. handleSave(row) {
  1272. row.isEdit = false;
  1273. this.loading = true;
  1274. this.form = row;
  1275. updateReportYlrq(this.form).then(response => {
  1276. this.msgSuccess(this.$t('修改成功'));
  1277. this.getList();
  1278. });
  1279. },
  1280. /** 取消按钮操作 */
  1281. handleCancel(row, index) {
  1282. // 还原数据
  1283. for (const i in row.oldRow) {
  1284. row[i] = row.oldRow[i]
  1285. }
  1286. row.isEdit = false
  1287. },
  1288. /** 删除按钮操作 */
  1289. handleDelete(row) {
  1290. const ids = row.id || this.ids;
  1291. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  1292. confirmButtonText: this.$t('确定'),
  1293. cancelButtonText: this.$t('取消'),
  1294. type: "warning"
  1295. }).then(function () {
  1296. return delReportYlrq(ids);
  1297. }).then(() => {
  1298. this.getList();
  1299. this.msgSuccess(this.$t('删除成功'));
  1300. })
  1301. },
  1302. //提交报告
  1303. approveHandle(row) {
  1304. var rows = this.dataListSelections.map(item => {
  1305. return item
  1306. })
  1307. for (let i = 0; i < rows.length; i++) {
  1308. if (rows[i].approveStatus != 0) {
  1309. this.$alert(this.$t('当前设备正在申请中,无法重复申请'), this.$t('提示'), {
  1310. type: 'warning'
  1311. })
  1312. return
  1313. }
  1314. }
  1315. this.approveVisible = true
  1316. this.$nextTick(() => {
  1317. this.$refs.yearApprove.init(rows)
  1318. })
  1319. },
  1320. // 根据压力容器台账数据进行同步
  1321. syncData() {
  1322. syncReportYlrq().then(response => {
  1323. this.$message({
  1324. message: response.msg,
  1325. type: 'success'
  1326. });
  1327. this.getList();
  1328. })
  1329. },
  1330. //结论备注
  1331. renderHeader(h, {column, $index}) {
  1332. return [
  1333. column.label,
  1334. h(
  1335. "el-tooltip",
  1336. {
  1337. props: {
  1338. content: (function () {
  1339. if (column.label == 1) {
  1340. return `管理制度、操作规程、运行记录`
  1341. } else if (column.label == 2) {
  1342. return `设计文件、竣工图样、产品合格证、质量证明文件、安装使用说明`
  1343. } else if (column.label == 3) {
  1344. return `监督检验证书以及安装、改造、修理等资料`
  1345. } else if (column.label == 4) {
  1346. return `使用登记证,使用登记表是否与实际相符`
  1347. } else if (column.label == 5) {
  1348. return `日常维护保养、定期安全检查记录`
  1349. } else if (column.label == 6) {
  1350. return `年度检查、定期检验报告齐全,报告中问题解决`
  1351. } else if (column.label == 7) {
  1352. return `作业人员定期培训情况`
  1353. } else if (column.label == 8) {
  1354. return `设备铭牌、漆色、标志、使用证号码`
  1355. } else if (column.label == 9) {
  1356. return `本体裂、过热、变形、泄漏、损伤情况`
  1357. } else if (column.label == 10) {
  1358. return `接口部位、焊接接头等裂纹、泄漏、损伤情况`
  1359. } else if (column.label == 11) {
  1360. return `外表面腐蚀、异常结霜、结露情况`
  1361. } else if (column.label == 12) {
  1362. return `保温层、隔热层、衬里情况`
  1363. } else if (column.label == 13) {
  1364. return `检漏孔、信号孔`
  1365. } else if (column.label == 14) {
  1366. return `容器与相邻管道、构件间异常振动、响声、摩擦`
  1367. } else if (column.label == 15) {
  1368. return `支承、支座、基础、紧固螺栓`
  1369. } else if (column.label == 16) {
  1370. return `遮阳罩、操作台紧固`
  1371. } else if (column.label == 17) {
  1372. return `罐体与底盘等连接`
  1373. } else if (column.label == 18) {
  1374. return `波板、罐内扶梯与罐体连接`
  1375. } else if (column.label == 19) {
  1376. return `罐车拉紧带、鞍座、中间支座`
  1377. } else if (column.label == 20) {
  1378. return `气液相管及其它管路`
  1379. } else if (column.label == 21) {
  1380. return `疏水、排放、排污装置`
  1381. } else if (column.label == 22) {
  1382. return `设备运行稳定情况`
  1383. } else if (column.label == 23) {
  1384. return `接地装置`
  1385. } else if (column.label == 24) {
  1386. return `安全状况等级为4级的压力容器的监控措施`
  1387. } else if (column.label == 25) {
  1388. return `安全阀`
  1389. } else if (column.label == 26) {
  1390. return `压力表`
  1391. } else if (column.label == 27) {
  1392. return `爆破片`
  1393. } else if (column.label == 28) {
  1394. return `测温仪表`
  1395. } else if (column.label == 29) {
  1396. return `液位计`
  1397. } else if (column.label == 30) {
  1398. return `快开门安全联锁装置`
  1399. } else if (column.label == 31) {
  1400. return `紧急切断装置`
  1401. } else if (column.label == 32) {
  1402. return `装卸软管、装卸阀门`
  1403. } else {
  1404. return ` `
  1405. }
  1406. })(),
  1407. placement: "top"
  1408. }
  1409. },
  1410. [
  1411. h("span", {
  1412. class: {
  1413. "el-icon-question": true,
  1414. "report-headerTips": true
  1415. }
  1416. })
  1417. ]
  1418. )
  1419. ]
  1420. },
  1421. //下载报告
  1422. downloadReport(row) {
  1423. this.downloadForm.id = row.id;
  1424. this.$nextTick(() => {
  1425. this.$refs['downloadForm'].submit()
  1426. })
  1427. },
  1428. //批量下载某年份的历史报告
  1429. exportDataForYear() {
  1430. //将控件时间转为年,如果未选中年份,默认当前年
  1431. if (this.exportCheckYear == null) {
  1432. this.exportCheckYear = Date.now();
  1433. }
  1434. var date = new Date(this.exportCheckYear)
  1435. this.downloadForm2.year = date.getFullYear();
  1436. this.$nextTick(() => {
  1437. this.$refs['downloadForm2'].submit()
  1438. })
  1439. //下载完成后关闭弹窗
  1440. this.dialogVisible = false;
  1441. }
  1442. }
  1443. };
  1444. </script>