index.vue 73 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839
  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="syncData"
  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. <el-col :span="1.5">
  73. <el-button
  74. type="info"
  75. icon="el-icon-upload2"
  76. size="mini"
  77. @click="handleImport"
  78. v-hasPermi="['sems:reportYlrq:edit']"
  79. >{{ $t('导入更新数据') }}
  80. </el-button>
  81. </el-col>
  82. <el-col :span="1.5">
  83. <el-button
  84. type="warning"
  85. icon="el-icon-download"
  86. size="mini"
  87. @click="handleExport"
  88. v-hasPermi="['sems:reportYlrq:export']"
  89. >{{ $t('导出') }}
  90. </el-button>
  91. </el-col>
  92. <el-col :span="1.5">
  93. <el-button
  94. type="success"
  95. size="mini"
  96. @click="importThirdParty"
  97. >{{ $t('上传第三方数据') }}
  98. </el-button>
  99. </el-col>
  100. <el-col :span="1.5">
  101. <el-button
  102. type="success"
  103. size="mini"
  104. @click="thirdPartyList"
  105. >{{ $t('第三方数据列表') }}
  106. </el-button>
  107. </el-col>
  108. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  109. </el-row>
  110. <u-table v-loading="loading" ref="reportTable" :data="reportYlrqList"
  111. :row-key="row => { return row.id }"
  112. @selection-change="handleSelectionChange"
  113. use-virtual
  114. showBodyOverflow="title"
  115. :height="clientHeight" border>
  116. <u-table-column type="selection" width="55" :reserve-selection="true" align="center"/>
  117. <u-table-column :label="$t('装置')" align="center" fixed="left" prop="plantCode" :show-overflow-tooltip="true"/>
  118. <u-table-column :label="$t('单元')" align="center" fixed="left" prop="unit" :show-overflow-tooltip="true"/>
  119. <u-table-column :label="$t('位号')" align="center" fixed="left" prop="devno" :show-overflow-tooltip="true"/>
  120. <u-table-column :label="$t('申请状态')" align="center" fixed="left" prop="approveStatus"
  121. :formatter="approveStatusFormat"/>
  122. <u-table-column :label="$t('设备名称')" align="center" prop="devname" width="200" :show-overflow-tooltip="true"/>
  123. <u-table-column :label="$t('使用证号码')" align="center" prop="useno" :show-overflow-tooltip="true"/>
  124. <u-table-column :label="$t('注册编号')" align="center" prop="regno" :show-overflow-tooltip="true"/>
  125. <u-table-column :label="$t('介质')" align="center" prop="medium" :show-overflow-tooltip="true" :render-header="renderHeader">
  126. <template slot-scope="scope">
  127. <el-input v-if="scope.row.isEdit" v-model="scope.row.medium" :placeholder="$t('请输入')+$t('介质')"/>
  128. <span v-else>{{ scope.row.medium }}</span>
  129. </template>
  130. </u-table-column>
  131. <u-table-column :label="$t('设计压力')+'(MPa)'" align="center" prop="desPressure" :show-overflow-tooltip="true" :render-header="renderHeader">
  132. <template slot-scope="scope">
  133. <el-input v-if="scope.row.isEdit" v-model="scope.row.desPressure" :placeholder="$t('请输入')+$t('设计压力')+'(MPa)'"/>
  134. <span v-else>{{ scope.row.desPressure }}</span>
  135. </template>
  136. </u-table-column>
  137. <u-table-column :label="$t('设计温度')+'(℃)'" align="center" prop="desTemp" :show-overflow-tooltip="true" :render-header="renderHeader">
  138. <template slot-scope="scope">
  139. <el-input v-if="scope.row.isEdit" v-model="scope.row.desTemp" :placeholder="$t('请输入')+$t('设计温度')+'(℃)'"/>
  140. <span v-else>{{ scope.row.desTemp }}</span>
  141. </template>
  142. </u-table-column>
  143. <u-table-column :label="$t('操作压力')+'(MPa)'" align="center" prop="optPressure" :show-overflow-tooltip="true" :render-header="renderHeader">
  144. <template slot-scope="scope">
  145. <el-input v-if="scope.row.isEdit" v-model="scope.row.optPressure" :placeholder="$t('请输入')+$t('操作压力')+'(MPa)'"/>
  146. <span v-else>{{ scope.row.optPressure }}</span>
  147. </template>
  148. </u-table-column>
  149. <u-table-column :label="$t('操作温度')+'(℃)'" align="center" prop="optTemp" :show-overflow-tooltip="true" :render-header="renderHeader">
  150. <template slot-scope="scope">
  151. <el-input v-if="scope.row.isEdit" v-model="scope.row.optTemp" :placeholder="$t('请输入')+$t('操作温度')+'(℃)'"/>
  152. <span v-else>{{ scope.row.optTemp }}</span>
  153. </template>
  154. </u-table-column>
  155. <u-table-column :label="$t('安全状况等级')" align="center" prop="safeClass" :show-overflow-tooltip="true"/>
  156. <u-table-column :label="$t('下次定期检验日期')" align="center" prop="nextWarnDate" width="100">
  157. <template slot-scope="scope">
  158. <span>{{ parseTime(scope.row.nextWarnDate, '{y}-{m}-{d}') }}</span>
  159. </template>
  160. </u-table-column>
  161. <u-table-column :label="$t('容器管理')" header-align="center">
  162. <u-table-column label="1" align="center" prop="pj1" :render-header="renderHeader">
  163. <template slot-scope="scope">
  164. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj1" :placeholder="$t('请选择')">
  165. <el-option
  166. v-for="dict in pj1Options"
  167. :key="dict.dictValue"
  168. :label="dict.dictLabel"
  169. :value="dict.dictValue"
  170. ></el-option>
  171. </el-select>
  172. <span v-if="scope.row.isEdit === false && scope.row.pj1 != null">{{ pj1Format(scope.row) }}</span>
  173. </template>
  174. </u-table-column>
  175. <u-table-column label="2" align="center" prop="pj2" :render-header="renderHeader">
  176. <template slot-scope="scope">
  177. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj2" :placeholder="$t('请选择')">
  178. <el-option
  179. v-for="dict in pj2Options"
  180. :key="dict.dictValue"
  181. :label="dict.dictLabel"
  182. :value="dict.dictValue"
  183. ></el-option>
  184. </el-select>
  185. <span v-if="scope.row.isEdit === false && scope.row.pj2 != null">{{ pj2Format(scope.row) }}</span>
  186. </template>
  187. </u-table-column>
  188. <u-table-column label="3" align="center" prop="pj3" :render-header="renderHeader">
  189. <template slot-scope="scope">
  190. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj3" :placeholder="$t('请选择')">
  191. <el-option
  192. v-for="dict in pj3Options"
  193. :key="dict.dictValue"
  194. :label="dict.dictLabel"
  195. :value="dict.dictValue"
  196. ></el-option>
  197. </el-select>
  198. <span v-if="scope.row.isEdit === false && scope.row.pj3 != null">{{ pj3Format(scope.row) }}</span>
  199. </template>
  200. </u-table-column>
  201. <u-table-column label="4" align="center" prop="pj4" :render-header="renderHeader">
  202. <template slot-scope="scope">
  203. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj4" :placeholder="$t('请选择')">
  204. <el-option
  205. v-for="dict in pj4Options"
  206. :key="dict.dictValue"
  207. :label="dict.dictLabel"
  208. :value="dict.dictValue"
  209. ></el-option>
  210. </el-select>
  211. <span v-if="scope.row.isEdit === false && scope.row.pj4 != null">{{ pj4Format(scope.row) }}</span>
  212. </template>
  213. </u-table-column>
  214. <u-table-column label="5" align="center" prop="pj5" :render-header="renderHeader">
  215. <template slot-scope="scope">
  216. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj5" :placeholder="$t('请选择')">
  217. <el-option
  218. v-for="dict in pj5Options"
  219. :key="dict.dictValue"
  220. :label="dict.dictLabel"
  221. :value="dict.dictValue"
  222. ></el-option>
  223. </el-select>
  224. <span v-if="scope.row.isEdit === false && scope.row.pj5 != null">{{ pj5Format(scope.row) }}</span>
  225. </template>
  226. </u-table-column>
  227. <u-table-column label="6" align="center" prop="pj6" :render-header="renderHeader">
  228. <template slot-scope="scope">
  229. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj6" :placeholder="$t('请选择')">
  230. <el-option
  231. v-for="dict in pj6Options"
  232. :key="dict.dictValue"
  233. :label="dict.dictLabel"
  234. :value="dict.dictValue"
  235. ></el-option>
  236. </el-select>
  237. <span v-if="scope.row.isEdit === false && scope.row.pj6 != null">{{ pj6Format(scope.row) }}</span>
  238. </template>
  239. </u-table-column>
  240. <u-table-column label="7" align="center" prop="pj7" :render-header="renderHeader">
  241. <template slot-scope="scope">
  242. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj7" :placeholder="$t('请选择')">
  243. <el-option
  244. v-for="dict in pj7Options"
  245. :key="dict.dictValue"
  246. :label="dict.dictLabel"
  247. :value="dict.dictValue"
  248. ></el-option>
  249. </el-select>
  250. <span v-if="scope.row.isEdit === false && scope.row.pj7 != null">{{ pj7Format(scope.row) }}</span>
  251. </template>
  252. </u-table-column>
  253. </u-table-column>
  254. <u-table-column :label="$t('本体及运行情况')" header-align="center">
  255. <u-table-column label="8" align="center" prop="pj8" :render-header="renderHeader">
  256. <template slot-scope="scope">
  257. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj8" :placeholder="$t('请选择')">
  258. <el-option
  259. v-for="dict in pj8Options"
  260. :key="dict.dictValue"
  261. :label="dict.dictLabel"
  262. :value="dict.dictValue"
  263. ></el-option>
  264. </el-select>
  265. <span v-if="scope.row.isEdit === false && scope.row.pj8 != null">{{ pj8Format(scope.row) }}</span>
  266. </template>
  267. </u-table-column>
  268. <u-table-column label="9" align="center" prop="pj9" :render-header="renderHeader">
  269. <template slot-scope="scope">
  270. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj9" :placeholder="$t('请选择')">
  271. <el-option
  272. v-for="dict in pj9Options"
  273. :key="dict.dictValue"
  274. :label="dict.dictLabel"
  275. :value="dict.dictValue"
  276. ></el-option>
  277. </el-select>
  278. <span v-if="scope.row.isEdit === false && scope.row.pj9 != null">{{ pj9Format(scope.row) }}</span>
  279. </template>
  280. </u-table-column>
  281. <u-table-column label="10" align="center" prop="pj10" :render-header="renderHeader">
  282. <template slot-scope="scope">
  283. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj10" :placeholder="$t('请选择')">
  284. <el-option
  285. v-for="dict in pj10Options"
  286. :key="dict.dictValue"
  287. :label="dict.dictLabel"
  288. :value="dict.dictValue"
  289. ></el-option>
  290. </el-select>
  291. <span v-if="scope.row.isEdit === false && scope.row.pj10 != null">{{ pj10Format(scope.row) }}</span>
  292. </template>
  293. </u-table-column>
  294. <u-table-column label="11" align="center" prop="pj11" :render-header="renderHeader">
  295. <template slot-scope="scope">
  296. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj11" :placeholder="$t('请选择')">
  297. <el-option
  298. v-for="dict in pj11Options"
  299. :key="dict.dictValue"
  300. :label="dict.dictLabel"
  301. :value="dict.dictValue"
  302. ></el-option>
  303. </el-select>
  304. <span v-if="scope.row.isEdit === false && scope.row.pj11 != null">{{ pj11Format(scope.row) }}</span>
  305. </template>
  306. </u-table-column>
  307. <u-table-column label="12" align="center" prop="pj12" :render-header="renderHeader">
  308. <template slot-scope="scope">
  309. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj12" :placeholder="$t('请选择')">
  310. <el-option
  311. v-for="dict in pj12Options"
  312. :key="dict.dictValue"
  313. :label="dict.dictLabel"
  314. :value="dict.dictValue"
  315. ></el-option>
  316. </el-select>
  317. <span v-if="scope.row.isEdit === false && scope.row.pj12 != null">{{ pj12Format(scope.row) }}</span>
  318. </template>
  319. </u-table-column>
  320. <u-table-column label="13" align="center" prop="pj13" :render-header="renderHeader">
  321. <template slot-scope="scope">
  322. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj13" :placeholder="$t('请选择')">
  323. <el-option
  324. v-for="dict in pj13Options"
  325. :key="dict.dictValue"
  326. :label="dict.dictLabel"
  327. :value="dict.dictValue"
  328. ></el-option>
  329. </el-select>
  330. <span v-if="scope.row.isEdit === false && scope.row.pj13 != null">{{ pj13Format(scope.row) }}</span>
  331. </template>
  332. </u-table-column>
  333. <u-table-column label="14" align="center" prop="pj14" :render-header="renderHeader">
  334. <template slot-scope="scope">
  335. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj14" :placeholder="$t('请选择')">
  336. <el-option
  337. v-for="dict in pj14Options"
  338. :key="dict.dictValue"
  339. :label="dict.dictLabel"
  340. :value="dict.dictValue"
  341. ></el-option>
  342. </el-select>
  343. <span v-if="scope.row.isEdit === false && scope.row.pj14 != null">{{ pj14Format(scope.row) }}</span>
  344. </template>
  345. </u-table-column>
  346. <u-table-column label="15" align="center" prop="pj15" :render-header="renderHeader">
  347. <template slot-scope="scope">
  348. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj15" :placeholder="$t('请选择')">
  349. <el-option
  350. v-for="dict in pj15Options"
  351. :key="dict.dictValue"
  352. :label="dict.dictLabel"
  353. :value="dict.dictValue"
  354. ></el-option>
  355. </el-select>
  356. <span v-if="scope.row.isEdit === false && scope.row.pj15 != null">{{ pj15Format(scope.row) }}</span>
  357. </template>
  358. </u-table-column>
  359. <u-table-column label="16" align="center" prop="pj16" :render-header="renderHeader">
  360. <template slot-scope="scope">
  361. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj16" :placeholder="$t('请选择')">
  362. <el-option
  363. v-for="dict in pj16Options"
  364. :key="dict.dictValue"
  365. :label="dict.dictLabel"
  366. :value="dict.dictValue"
  367. ></el-option>
  368. </el-select>
  369. <span v-if="scope.row.isEdit === false && scope.row.pj16 != null">{{ pj16Format(scope.row) }}</span>
  370. </template>
  371. </u-table-column>
  372. <u-table-column label="17" align="center" prop="pj17" :render-header="renderHeader">
  373. <template slot-scope="scope">
  374. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj17" :placeholder="$t('请选择')">
  375. <el-option
  376. v-for="dict in pj17Options"
  377. :key="dict.dictValue"
  378. :label="dict.dictLabel"
  379. :value="dict.dictValue"
  380. ></el-option>
  381. </el-select>
  382. <span v-if="scope.row.isEdit === false && scope.row.pj17 != null">{{ pj17Format(scope.row) }}</span>
  383. </template>
  384. </u-table-column>
  385. <u-table-column label="18" align="center" prop="pj18" :render-header="renderHeader">
  386. <template slot-scope="scope">
  387. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj18" :placeholder="$t('请选择')">
  388. <el-option
  389. v-for="dict in pj18Options"
  390. :key="dict.dictValue"
  391. :label="dict.dictLabel"
  392. :value="dict.dictValue"
  393. ></el-option>
  394. </el-select>
  395. <span v-if="scope.row.isEdit === false && scope.row.pj18 != null">{{ pj18Format(scope.row) }}</span>
  396. </template>
  397. </u-table-column>
  398. <u-table-column label="19" align="center" prop="pj19" :render-header="renderHeader">
  399. <template slot-scope="scope">
  400. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj19" :placeholder="$t('请选择')">
  401. <el-option
  402. v-for="dict in pj19Options"
  403. :key="dict.dictValue"
  404. :label="dict.dictLabel"
  405. :value="dict.dictValue"
  406. ></el-option>
  407. </el-select>
  408. <span v-if="scope.row.isEdit === false && scope.row.pj19 != null">{{ pj19Format(scope.row) }}</span>
  409. </template>
  410. </u-table-column>
  411. <u-table-column label="20" align="center" prop="pj20" :render-header="renderHeader">
  412. <template slot-scope="scope">
  413. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj20" :placeholder="$t('请选择')">
  414. <el-option
  415. v-for="dict in pj20Options"
  416. :key="dict.dictValue"
  417. :label="dict.dictLabel"
  418. :value="dict.dictValue"
  419. ></el-option>
  420. </el-select>
  421. <span v-if="scope.row.isEdit === false && scope.row.pj20 != null">{{ pj20Format(scope.row) }}</span>
  422. </template>
  423. </u-table-column>
  424. <u-table-column label="21" align="center" prop="pj21" :render-header="renderHeader">
  425. <template slot-scope="scope">
  426. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj21" :placeholder="$t('请选择')">
  427. <el-option
  428. v-for="dict in pj21Options"
  429. :key="dict.dictValue"
  430. :label="dict.dictLabel"
  431. :value="dict.dictValue"
  432. ></el-option>
  433. </el-select>
  434. <span v-if="scope.row.isEdit === false && scope.row.pj21 != null">{{ pj21Format(scope.row) }}</span>
  435. </template>
  436. </u-table-column>
  437. <u-table-column label="22" align="center" prop="pj22" :render-header="renderHeader">
  438. <template slot-scope="scope">
  439. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj22" :placeholder="$t('请选择')">
  440. <el-option
  441. v-for="dict in pj22Options"
  442. :key="dict.dictValue"
  443. :label="dict.dictLabel"
  444. :value="dict.dictValue"
  445. ></el-option>
  446. </el-select>
  447. <span v-if="scope.row.isEdit === false && scope.row.pj22 != null">{{ pj22Format(scope.row) }}</span>
  448. </template>
  449. </u-table-column>
  450. <u-table-column label="23" align="center" prop="pj23" :render-header="renderHeader">
  451. <template slot-scope="scope">
  452. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj23" :placeholder="$t('请选择')">
  453. <el-option
  454. v-for="dict in pj23Options"
  455. :key="dict.dictValue"
  456. :label="dict.dictLabel"
  457. :value="dict.dictValue"
  458. ></el-option>
  459. </el-select>
  460. <span v-if="scope.row.isEdit === false && scope.row.pj23 != null">{{ pj23Format(scope.row) }}</span>
  461. </template>
  462. </u-table-column>
  463. <u-table-column label="24" align="center" prop="pj24" :render-header="renderHeader">
  464. <template slot-scope="scope">
  465. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj24" :placeholder="$t('请选择')">
  466. <el-option
  467. v-for="dict in pj24Options"
  468. :key="dict.dictValue"
  469. :label="dict.dictLabel"
  470. :value="dict.dictValue"
  471. ></el-option>
  472. </el-select>
  473. <span v-if="scope.row.isEdit === false && scope.row.pj24 != null">{{ pj24Format(scope.row) }}</span>
  474. </template>
  475. </u-table-column>
  476. </u-table-column>
  477. <u-table-column :label="$t('安全附件及设施')" header-align="center">
  478. <u-table-column label="25" align="center" prop="pj25" :render-header="renderHeader">
  479. <template slot-scope="scope">
  480. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj25" :placeholder="$t('请选择')">
  481. <el-option
  482. v-for="dict in pj25Options"
  483. :key="dict.dictValue"
  484. :label="dict.dictLabel"
  485. :value="dict.dictValue"
  486. ></el-option>
  487. </el-select>
  488. <span v-if="scope.row.isEdit === false && scope.row.pj25 != null">{{ pj25Format(scope.row) }}</span>
  489. </template>
  490. </u-table-column>
  491. <u-table-column label="26" align="center" prop="pj26" :render-header="renderHeader">
  492. <template slot-scope="scope">
  493. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj26" :placeholder="$t('请选择')">
  494. <el-option
  495. v-for="dict in pj26Options"
  496. :key="dict.dictValue"
  497. :label="dict.dictLabel"
  498. :value="dict.dictValue"
  499. ></el-option>
  500. </el-select>
  501. <span v-if="scope.row.isEdit === false && scope.row.pj26 != null">{{ pj26Format(scope.row) }}</span>
  502. </template>
  503. </u-table-column>
  504. <u-table-column label="27" align="center" prop="pj27" :render-header="renderHeader">
  505. <template slot-scope="scope">
  506. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj27" :placeholder="$t('请选择')">
  507. <el-option
  508. v-for="dict in pj27Options"
  509. :key="dict.dictValue"
  510. :label="dict.dictLabel"
  511. :value="dict.dictValue"
  512. ></el-option>
  513. </el-select>
  514. <span v-if="scope.row.isEdit === false && scope.row.pj27 != null">{{ pj27Format(scope.row) }}</span>
  515. </template>
  516. </u-table-column>
  517. <u-table-column label="28" align="center" prop="pj28" :render-header="renderHeader">
  518. <template slot-scope="scope">
  519. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj28" :placeholder="$t('请选择')">
  520. <el-option
  521. v-for="dict in pj28Options"
  522. :key="dict.dictValue"
  523. :label="dict.dictLabel"
  524. :value="dict.dictValue"
  525. ></el-option>
  526. </el-select>
  527. <span v-if="scope.row.isEdit === false && scope.row.pj28 != null">{{ pj28Format(scope.row) }}</span>
  528. </template>
  529. </u-table-column>
  530. <u-table-column label="29" align="center" prop="pj29" :render-header="renderHeader">
  531. <template slot-scope="scope">
  532. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj29" :placeholder="$t('请选择')">
  533. <el-option
  534. v-for="dict in pj29Options"
  535. :key="dict.dictValue"
  536. :label="dict.dictLabel"
  537. :value="dict.dictValue"
  538. ></el-option>
  539. </el-select>
  540. <span v-if="scope.row.isEdit === false && scope.row.pj29 != null">{{ pj29Format(scope.row) }}</span>
  541. </template>
  542. </u-table-column>
  543. <u-table-column label="30" align="center" prop="pj30" :render-header="renderHeader">
  544. <template slot-scope="scope">
  545. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj30" :placeholder="$t('请选择')">
  546. <el-option
  547. v-for="dict in pj30Options"
  548. :key="dict.dictValue"
  549. :label="dict.dictLabel"
  550. :value="dict.dictValue"
  551. ></el-option>
  552. </el-select>
  553. <span v-if="scope.row.isEdit === false && scope.row.pj30 != null">{{ pj30Format(scope.row) }}</span>
  554. </template>
  555. </u-table-column>
  556. <u-table-column label="31" align="center" prop="pj31" :render-header="renderHeader">
  557. <template slot-scope="scope">
  558. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj31" :placeholder="$t('请选择')">
  559. <el-option
  560. v-for="dict in pj31Options"
  561. :key="dict.dictValue"
  562. :label="dict.dictLabel"
  563. :value="dict.dictValue"
  564. ></el-option>
  565. </el-select>
  566. <span v-if="scope.row.isEdit === false && scope.row.pj31 != null">{{ pj31Format(scope.row) }}</span>
  567. </template>
  568. </u-table-column>
  569. </u-table-column>
  570. <u-table-column :label="$t('其他')" header-align="center">
  571. <u-table-column label="32" align="center" prop="pj32" :render-header="renderHeader">
  572. <template slot-scope="scope">
  573. <el-select v-if="scope.row.isEdit" v-model="scope.row.pj32" :placeholder="$t('请选择')">
  574. <el-option
  575. v-for="dict in pj32Options"
  576. :key="dict.dictValue"
  577. :label="dict.dictLabel"
  578. :value="dict.dictValue"
  579. ></el-option>
  580. </el-select>
  581. <span v-if="scope.row.isEdit === false && scope.row.pj32 != null">{{ pj32Format(scope.row) }}</span>
  582. </template>
  583. </u-table-column>
  584. </u-table-column>
  585. <u-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true">
  586. <template slot-scope="scope">
  587. <el-input v-if="scope.row.isEdit" v-model="scope.row.remarks" :placeholder="$t('请输入')+$t('备注')"/>
  588. <span v-else>{{ scope.row.remarks }}</span>
  589. </template>
  590. </u-table-column>
  591. <u-table-column :label="$t('检查日期')" align="center" prop="checkDate" width="100">
  592. <template slot-scope="scope">
  593. <el-date-picker clearable size="small" style="width: 200px"
  594. v-model="scope.row.checkDate"
  595. type="date"
  596. v-if="scope.row.isEdit"
  597. value-format="yyyy-MM-dd"
  598. :placeholder="$t('请选择')+$t('检查日期')">
  599. </el-date-picker>
  600. <span v-else>{{ parseTime(scope.row.checkDate, '{y}-{m}-{d}') }}</span>
  601. </template>
  602. </u-table-column>
  603. <u-table-column :label="$t('下次年度检查日期')" align="center" prop="nextCheckDate" width="100">
  604. <template slot-scope="scope">
  605. <el-date-picker clearable size="small" style="width: 200px"
  606. v-model="scope.row.nextCheckDate"
  607. type="date"
  608. v-if="scope.row.isEdit"
  609. value-format="yyyy-MM-dd"
  610. :placeholder="$t('请选择')+$t('下次年度检查日期')">
  611. </el-date-picker>
  612. <span v-else>{{ parseTime(scope.row.nextCheckDate, '{y}-{m}-{d}') }}</span>
  613. </template>
  614. </u-table-column>
  615. <u-table-column :label="$t('问题及处理')" align="center" prop="problem" :show-overflow-tooltip="true">
  616. <template slot-scope="scope">
  617. <el-input v-if="scope.row.isEdit" v-model="scope.row.problem" :placeholder="$t('请输入')+$t('问题及处理')"/>
  618. <span v-else>{{ scope.row.problem }}</span>
  619. </template>
  620. </u-table-column>
  621. <u-table-column :label="$t('检查结论')" align="center" prop="con" :formatter="conFormat">
  622. <template slot-scope="scope">
  623. <el-select v-if="scope.row.isEdit" v-model="scope.row.con" :placeholder="$t('请选择')+$t('检查结论')">
  624. <el-option
  625. v-for="dict in conOptions"
  626. :key="dict.dictValue"
  627. :label="dict.dictLabel"
  628. :value="dict.dictValue"
  629. ></el-option>
  630. </el-select>
  631. <span v-if="scope.row.isEdit === false && scope.row.con != null">{{ conFormat(scope.row) }}</span>
  632. </template>
  633. </u-table-column>
  634. <u-table-column :label="$t('年检报告编号')" align="center" prop="yearReportNo" :show-overflow-tooltip="true">
  635. <template slot-scope="scope">
  636. <el-input v-if="scope.row.isEdit" v-model="scope.row.yearReportNo" :placeholder="$t('请输入')+$t('年检报告编号')"/>
  637. <span v-else>{{ scope.row.yearReportNo }}</span>
  638. </template>
  639. </u-table-column>
  640. <u-table-column :label="$t('操作')" align="center" fixed="right" width="200"
  641. class-name="small-padding">
  642. <template slot-scope="scope">
  643. <el-button
  644. size="mini"
  645. type="text"
  646. icon="el-icon-edit"
  647. @click="handleUpdate(scope.row)"
  648. v-if="!scope.row.isEdit"
  649. v-hasPermi="['sems:reportYlrq:edit']"
  650. >{{ $t('修改') }}
  651. </el-button>
  652. <el-button
  653. size="mini"
  654. type="text"
  655. icon="el-icon-tickets"
  656. @click="handleHistory(scope.row)"
  657. v-if="!scope.row.isEdit"
  658. v-hasPermi="['sems:reportYlrq:edit']"
  659. >{{ $t('历史报告') }}
  660. </el-button>
  661. <el-button
  662. size="mini"
  663. type="text"
  664. icon="el-icon-delete"
  665. @click="handleDelete(scope.row)"
  666. v-if="!scope.row.isEdit"
  667. v-hasPermi="['sems:reportYlrq:remove']"
  668. >{{ $t('删除') }}
  669. </el-button>
  670. <el-button
  671. v-hasPermi="['sems:reportYlrq:edit']"
  672. type="text"
  673. size="mini"
  674. v-if="scope.row.isEdit"
  675. @click="handleSave(scope.row)"
  676. >{{ $t('保存') }}
  677. </el-button>
  678. <el-button
  679. type="text"
  680. size="small"
  681. v-if="scope.row.isEdit"
  682. @click="handleCancel(scope.row, scope.$index)"
  683. >{{ $t('取消') }}
  684. </el-button>
  685. </template>
  686. </u-table-column>
  687. </u-table>
  688. <pagination
  689. v-show="total>0"
  690. :total="total"
  691. :page-sizes="[20,100,300,500]"
  692. :page.sync="queryParams.pageNum"
  693. :limit.sync="queryParams.pageSize"
  694. @pagination="getList"
  695. />
  696. <!-- 历史报告对话框 -->
  697. <el-dialog v-dialogDrag :title="title" :visible.sync="open" width="90%" append-to-body>
  698. <el-table :data="historyYlrqList" border>
  699. <el-table-column :label="$t('生成时间')" align="center" prop="buildDate" fixed="left" width="100">
  700. <template slot-scope="scope">
  701. <span>{{ parseTime(scope.row.buildDate, '{y}-{m}-{d}') }}</span>
  702. </template>
  703. </el-table-column>
  704. <el-table-column :label="$t('装置名称')" align="center" prop="plantCode" :show-overflow-tooltip="true"/>
  705. <el-table-column :label="$t('单元')" align="center" prop="unit" :show-overflow-tooltip="true"/>
  706. <el-table-column :label="$t('位号')" align="center" prop="devno" :show-overflow-tooltip="true"/>
  707. <el-table-column :label="$t('名称')" align="center" prop="devname" :show-overflow-tooltip="true"/>
  708. <el-table-column :label="$t('使用证号码')" align="center" prop="useno" :show-overflow-tooltip="true"/>
  709. <el-table-column :label="$t('注册代码')" align="center" prop="regno" :show-overflow-tooltip="true"/>
  710. <el-table-column :label="$t('介质')" align="center" prop="medium" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  711. <el-table-column :label="$t('设计压力')+'(MPa)'" align="center" prop="desPressure" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  712. <el-table-column :label="$t('设计温度')+'(℃)'" align="center" prop="desTemp" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  713. <el-table-column :label="$t('操作压力')+'(MPa)'" align="center" prop="optPressure" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  714. <el-table-column :label="$t('操作温度')+'(℃)'" align="center" prop="optTemp" :show-overflow-tooltip="true" :render-header="renderHeader"/>
  715. <el-table-column :label="$t('安全状况等级')" align="center" prop="safeClass" :show-overflow-tooltip="true"/>
  716. <el-table-column :label="$t('下次定期检验日期')" align="center" prop="nextWarnDate" width="100">
  717. <template slot-scope="scope">
  718. <span>{{ parseTime(scope.row.nextWarnDate, '{y}-{m}-{d}') }}</span>
  719. </template>
  720. </el-table-column>
  721. <el-table-column :label="$t('年检报告编号')" align="center" prop="yearReportNo" :show-overflow-tooltip="true"/>
  722. <el-table-column :label="$t('容器管理')" header-align="center">
  723. <el-table-column label="1" align="center" prop="pj1" :formatter="pj1Format" :render-header="renderHeader"/>
  724. <el-table-column label="2" align="center" prop="pj2" :formatter="pj2Format" :render-header="renderHeader"/>
  725. <el-table-column label="3" align="center" prop="pj3" :formatter="pj3Format" :render-header="renderHeader"/>
  726. <el-table-column label="4" align="center" prop="pj4" :formatter="pj4Format" :render-header="renderHeader"/>
  727. <el-table-column label="5" align="center" prop="pj5" :formatter="pj5Format" :render-header="renderHeader"/>
  728. <el-table-column label="6" align="center" prop="pj6" :formatter="pj6Format" :render-header="renderHeader"/>
  729. <el-table-column label="7" align="center" prop="pj7" :formatter="pj7Format" :render-header="renderHeader"/>
  730. </el-table-column>
  731. <el-table-column :label="$t('容器本体及运行情况')" header-align="center">
  732. <el-table-column label="8" align="center" prop="pj8" :formatter="pj8Format" :render-header="renderHeader"/>
  733. <el-table-column label="9" align="center" prop="pj9" :formatter="pj9Format" :render-header="renderHeader"/>
  734. <el-table-column label="10" align="center" prop="pj10" :formatter="pj10Format" :render-header="renderHeader"/>
  735. <el-table-column label="11" align="center" prop="pj11" :formatter="pj11Format" :render-header="renderHeader"/>
  736. <el-table-column label="12" align="center" prop="pj12" :formatter="pj12Format" :render-header="renderHeader"/>
  737. <el-table-column label="13" align="center" prop="pj13" :formatter="pj13Format" :render-header="renderHeader"/>
  738. <el-table-column label="14" align="center" prop="pj14" :formatter="pj14Format" :render-header="renderHeader"/>
  739. <el-table-column label="15" align="center" prop="pj15" :formatter="pj15Format" :render-header="renderHeader"/>
  740. <el-table-column label="16" align="center" prop="pj16" :formatter="pj16Format" :render-header="renderHeader"/>
  741. <el-table-column label="17" align="center" prop="pj17" :formatter="pj17Format" :render-header="renderHeader"/>
  742. <el-table-column label="18" align="center" prop="pj18" :formatter="pj18Format" :render-header="renderHeader"/>
  743. <el-table-column label="19" align="center" prop="pj19" :formatter="pj19Format" :render-header="renderHeader"/>
  744. <el-table-column label="20" align="center" prop="pj20" :formatter="pj20Format" :render-header="renderHeader"/>
  745. <el-table-column label="21" align="center" prop="pj21" :formatter="pj21Format" :render-header="renderHeader"/>
  746. <el-table-column label="22" align="center" prop="pj22" :formatter="pj22Format" :render-header="renderHeader"/>
  747. <el-table-column label="23" align="center" prop="pj23" :formatter="pj23Format" :render-header="renderHeader"/>
  748. <el-table-column label="24" align="center" prop="pj24" :formatter="pj24Format" :render-header="renderHeader"/>
  749. </el-table-column>
  750. <el-table-column :label="$t('安全附件或设施')" header-align="center">
  751. <el-table-column label="25" align="center" prop="pj25" :formatter="pj25Format" :render-header="renderHeader"/>
  752. <el-table-column label="26" align="center" prop="pj26" :formatter="pj26Format" :render-header="renderHeader"/>
  753. <el-table-column label="27" align="center" prop="pj27" :formatter="pj27Format" :render-header="renderHeader"/>
  754. <el-table-column label="28" align="center" prop="pj28" :formatter="pj28Format" :render-header="renderHeader"/>
  755. <el-table-column label="29" align="center" prop="pj29" :formatter="pj29Format" :render-header="renderHeader"/>
  756. <el-table-column label="30" align="center" prop="pj30" :formatter="pj30Format" :render-header="renderHeader"/>
  757. <el-table-column label="31" align="center" prop="pj31" :formatter="pj31Format" :render-header="renderHeader"/>
  758. </el-table-column>
  759. <el-table-column :label="$t('其他')" header-align="center">
  760. <el-table-column label="32" align="center" prop="pj32" :formatter="pj32Format" :render-header="renderHeader"/>
  761. </el-table-column>
  762. <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
  763. <el-table-column :label="$t('检查日期')" align="center" prop="checkDate" width="100">
  764. <template slot-scope="scope">
  765. <span>{{ parseTime(scope.row.checkDate, '{y}-{m}-{d}') }}</span>
  766. </template>
  767. </el-table-column>
  768. <el-table-column :label="$t('下次年度检查日期')" align="center" prop="nextCheckDate" width="100">
  769. <template slot-scope="scope">
  770. <span>{{ parseTime(scope.row.nextCheckDate, '{y}-{m}-{d}') }}</span>
  771. </template>
  772. </el-table-column>
  773. <el-table-column :label="$t('问题及处理')" align="center" prop="problem" :show-overflow-tooltip="true"/>
  774. <el-table-column :label="$t('检查结论')" align="center" prop="con" :formatter="conFormat"/>
  775. <el-table-column :label="$t('操作')" align="center" fixed="right" width="120"
  776. class-name="small-padding fixed-width">
  777. <template slot-scope="scope">
  778. <el-button v-hasPermi="['sems:historyYlgd:export']" type="text" size="small"
  779. @click="handleDownloadReport(scope.row)">{{ $t('下载报告') }}
  780. </el-button>
  781. </template>
  782. </el-table-column>
  783. </el-table>
  784. <form ref="downloadForm" :action="downloadAction" target="FORMSUBMIT">
  785. <input name="id" v-model="downloadForm.id" hidden/>
  786. </form>
  787. </el-dialog>
  788. <year-approve v-if="approveVisible" ref="yearApprove" @refreshDataList="getList"></year-approve>
  789. <form ref="downloadForm2" :action="downloadAction2" target="FORMSUBMIT">
  790. <input name="year" v-model="downloadForm2.year" hidden/>
  791. </form>
  792. <!-- 批量导出年检报告的历史报告 -->
  793. <el-dialog
  794. title="选择需要导出的历史报告年份"
  795. :visible.sync="dialogVisible"
  796. width="20%">
  797. <el-date-picker
  798. v-model="exportCheckYear"
  799. type="year"
  800. placeholder="选择需要导出的历史报告年份">
  801. </el-date-picker>
  802. <span slot="footer" class="dialog-footer">
  803. <el-button @click="dialogVisible = false">取 消</el-button>
  804. <el-button type="primary" @click="exportDataForYear">确 定</el-button>
  805. </span>
  806. </el-dialog>
  807. <!-- 用户导入对话框 -->
  808. <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
  809. <el-form ref="dateform" label-width="120px">
  810. <el-form-item>
  811. <span>{{$t('已选择')}} {{dataListSelections.length}}</span>
  812. </el-form-item>
  813. <el-form-item>
  814. <el-button type="primary" :disabled="dataListSelections.length <= 0" @click="downloadDev(2)">{{$t('downloadSelect')}}</el-button>
  815. </el-form-item>
  816. <el-upload
  817. ref="upload"
  818. :limit="1"
  819. accept=".xlsx, .xls"
  820. :headers="upload.headers"
  821. :action="upload.url + '?updateSupport=' + upload.updateSupport"
  822. :disabled="upload.isUploading"
  823. :on-progress="handleFileUploadProgress"
  824. :on-success="handleFileSuccess"
  825. :auto-upload="false"
  826. drag
  827. >
  828. <i class="el-icon-upload"></i>
  829. <div class="el-upload__text">
  830. 将文件拖到此处,或
  831. <em>点击上传</em>
  832. </div>
  833. <!--<div class="el-upload__tip" slot="tip">-->
  834. <!--<el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>-->
  835. <!--</div>-->
  836. <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
  837. </el-upload>
  838. </el-form>
  839. <div slot="footer" class="dialog-footer">
  840. <el-button type="primary" @click="submitFileForm"
  841. v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
  842. <el-button @click="upload.open = false">取 消</el-button>
  843. </div>
  844. </el-dialog>
  845. <!-- 第三方导入对话框 -->
  846. <el-dialog :title="thirdUpload.title" :visible.sync="thirdUpload.open" width="400px" append-to-body>
  847. <div>{{ $t('装置') }}:
  848. <el-select v-model="plantCodeThird" :placeholder="$t('请选择') + $t('导入装置')" clearable size="small">
  849. <el-option
  850. v-for="dict in plantOptions"
  851. :key="dict.name"
  852. :label="dict.name"
  853. :value="dict.name"
  854. />
  855. </el-select>
  856. </div>
  857. <div>{{ $t('年份') }}:
  858. <el-date-picker
  859. v-model="importThirdYear"
  860. type="year"
  861. placeholder="选择导入的第三方数据年份">
  862. </el-date-picker>
  863. </div>
  864. <el-upload
  865. ref="thirdUpload"
  866. :limit="1"
  867. accept=".xlsx, .xls"
  868. :data="submitData"
  869. :headers="thirdUpload.headers"
  870. :action="thirdUpload.url + '?updateSupport=' + thirdUpload.updateSupport"
  871. :disabled="thirdUpload.isUploading"
  872. :on-progress="handleFileUploadProgressThird"
  873. :on-success="handleFileSuccessThird"
  874. :auto-upload="false"
  875. drag
  876. >
  877. <i class="el-icon-upload"></i>
  878. <div class="el-upload__text">
  879. 将文件拖到此处,或
  880. <em>点击上传</em>
  881. </div>
  882. <!-- <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>-->
  883. </el-upload>
  884. <div slot="footer" class="dialog-footer">
  885. <el-button type="primary" @click="thirdSubmitFileForm"
  886. v-loading.fullscreen.lock="fullscreenLoading">确 定</el-button>
  887. <el-button @click="thirdUpload.open = false">取 消</el-button>
  888. </div>
  889. </el-dialog>
  890. <!-- 第三方数据列表对话框 -->
  891. <el-dialog :title="thirdList.title" :visible.sync="thirdList.open" width="650px" append-to-body>
  892. <el-table
  893. :data="reportYlrqThirdList"
  894. style="width: 100%">
  895. <el-table-column
  896. prop="plantCode"
  897. :label="$t('装置名称')"
  898. width="100"
  899. :show-overflow-tooltip="true"
  900. align="center"/>
  901. <el-table-column
  902. prop="year"
  903. :label="$t('年份')"
  904. width="100"
  905. :show-overflow-tooltip="true"
  906. align="center"/>
  907. <el-table-column
  908. prop="fileName"
  909. :label="$t('文件名称')"
  910. width="300"
  911. :show-overflow-tooltip="true"
  912. align="center">
  913. <template slot-scope="scope">
  914. <a class="link-type" @click="handleDownload(scope.row)">
  915. <span>{{ scope.row.fileName }}</span>
  916. </a>
  917. </template>
  918. </el-table-column>
  919. <el-table-column :label="$t('操作')" align="center" fixed="right">
  920. <template slot-scope="scope">
  921. <el-button
  922. size="mini"
  923. type="text"
  924. icon="el-icon-delete"
  925. v-hasPermi="['sems:reportYlgd:remove']"
  926. @click="handleDeleteThird(scope.row)"
  927. >{{ $t('删除') }}
  928. </el-button>
  929. </template>
  930. </el-table-column>
  931. </el-table>
  932. </el-dialog>
  933. <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
  934. <input name="type" :value="upload.type" hidden/>
  935. </form>
  936. </div>
  937. </template>
  938. <script>
  939. import {
  940. listReportYlrq,
  941. delReportYlrq,
  942. updateReportYlrq,
  943. exportReportYlrq,
  944. syncReportYlrq,
  945. exportReportYlrqSelected,exportPDF
  946. } from "@/api/sems/reportYlrq";
  947. import {listHistoryYlrq} from "@/api/sems/historyYlrq";
  948. import {treeselect} from "@/api/system/dept";
  949. import Treeselect from "@riophae/vue-treeselect";
  950. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  951. import YearApprove from './yearapprove'
  952. import {getToken} from "@/utils/auth";
  953. import {mylistPlant} from "@/api/system/plant";
  954. import {listTReportThird,delReportThird} from "@/api/sems/tReportThird";
  955. export default {
  956. name: "ReportYlrq",
  957. components: {Treeselect, YearApprove},
  958. data() {
  959. return {
  960. submitData: {
  961. plantCode: null,
  962. year: null,
  963. },
  964. thirdListQuery: {
  965. type: 1,
  966. },
  967. reportYlrqThirdList: [],
  968. plantOptions: [],
  969. plantCodeThird: null,
  970. importThirdYear: null,
  971. exportCheckYear: null,
  972. dialogVisible: false,
  973. // 遮罩层
  974. loading: true,
  975. approveVisible: false,
  976. // 选中数组
  977. ids: [],
  978. dataListSelections: [],
  979. // 非单个禁用
  980. single: true,
  981. // 非多个禁用
  982. multiple: true,
  983. // 显示搜索条件
  984. showSearch: false,
  985. // 总条数
  986. total: 0,
  987. // 压力容器年检报告表格数据
  988. reportYlrqList: [],
  989. // 压力容器报告历史表格数据
  990. historyYlrqList: [],
  991. // 弹出层标题
  992. title: "",
  993. // 部门树选项
  994. deptOptions: undefined,
  995. clientHeight: 300,
  996. // 是否显示弹出层
  997. open: false,
  998. approveStatusOptions: [],
  999. // 1字典
  1000. pj1Options: [],
  1001. // 2字典
  1002. pj2Options: [],
  1003. // 3字典
  1004. pj3Options: [],
  1005. // 4字典
  1006. pj4Options: [],
  1007. // 5字典
  1008. pj5Options: [],
  1009. // 6字典
  1010. pj6Options: [],
  1011. // 7字典
  1012. pj7Options: [],
  1013. // 8字典
  1014. pj8Options: [],
  1015. // 9字典
  1016. pj9Options: [],
  1017. // 10字典
  1018. pj10Options: [],
  1019. // 11字典
  1020. pj11Options: [],
  1021. // 12字典
  1022. pj12Options: [],
  1023. // 13字典
  1024. pj13Options: [],
  1025. // 14字典
  1026. pj14Options: [],
  1027. // 15字典
  1028. pj15Options: [],
  1029. // 16字典
  1030. pj16Options: [],
  1031. // 17字典
  1032. pj17Options: [],
  1033. // 18字典
  1034. pj18Options: [],
  1035. // 19字典
  1036. pj19Options: [],
  1037. // 20字典
  1038. pj20Options: [],
  1039. // 21字典
  1040. pj21Options: [],
  1041. // 22字典
  1042. pj22Options: [],
  1043. // 23字典
  1044. pj23Options: [],
  1045. // 24字典
  1046. pj24Options: [],
  1047. // 25字典
  1048. pj25Options: [],
  1049. // 26字典
  1050. pj26Options: [],
  1051. // 27字典
  1052. pj27Options: [],
  1053. // 28字典
  1054. pj28Options: [],
  1055. // 29字典
  1056. pj29Options: [],
  1057. // 30字典
  1058. pj30Options: [],
  1059. // 31字典
  1060. pj31Options: [],
  1061. // 32字典
  1062. pj32Options: [],
  1063. // 检查结论字典
  1064. conOptions: [],
  1065. // 查询参数
  1066. queryParams: {
  1067. plantCode: null,
  1068. unit: null,
  1069. approveStatus: null,
  1070. devno: null,
  1071. pageNum: 1,
  1072. pageSize: 20,
  1073. orderByColumn: null,
  1074. isAsc: null,
  1075. },
  1076. // 查询参数
  1077. queryHistoryParams: {
  1078. pageNum: 1,
  1079. pageSize: 50,
  1080. reportId: null,
  1081. },
  1082. // 表单参数
  1083. form: {},
  1084. //下载参数
  1085. downloadForm: {
  1086. id: '',
  1087. },
  1088. downloadForm2: {
  1089. year: '',
  1090. },
  1091. downloadAction: process.env.VUE_APP_BASE_API + '/sems/historyYlrq/exportPDF',
  1092. downloadAction2: process.env.VUE_APP_BASE_API + '/sems/historyYlrq/exportPDFForYear',
  1093. // 表单校验
  1094. rules: {
  1095. devId: [
  1096. {required: true, message: this.$t('设备id') + this.$t('不能为空'), trigger: "blur"}
  1097. ],
  1098. },
  1099. // 用户导入参数
  1100. upload: {
  1101. downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
  1102. type: "reportYlrq",
  1103. // 是否显示弹出层(用户导入)
  1104. open: false,
  1105. // 弹出层标题(用户导入)
  1106. title: "",
  1107. // 是否禁用上传
  1108. isUploading: false,
  1109. // 是否更新已经存在的用户数据
  1110. updateSupport: 0,
  1111. // 设置上传的请求头部
  1112. headers: {Authorization: "Bearer " + getToken()},
  1113. // 上传的地址
  1114. url: process.env.VUE_APP_BASE_API + "/sems/reportYlrq/importForUpdate"
  1115. },
  1116. fullscreenLoading: false,
  1117. // 第三方导入参数
  1118. thirdUpload: {
  1119. // 是否显示弹出层(用户导入)
  1120. open: false,
  1121. // 弹出层标题(用户导入)
  1122. title: "",
  1123. // 是否禁用上传
  1124. isUploading: false,
  1125. // 是否更新已经存在的用户数据
  1126. updateSupport: 0,
  1127. // 设置上传的请求头部
  1128. headers: {Authorization: "Bearer " + getToken()},
  1129. // 上传的地址
  1130. url: process.env.VUE_APP_BASE_API + "/sems/reportYlrq/importForThird"
  1131. },
  1132. // 第三方数据列表
  1133. thirdList: {
  1134. // 是否显示弹出层(用户导入)
  1135. open: false,
  1136. // 弹出层标题(用户导入)
  1137. title: "",
  1138. },
  1139. };
  1140. },
  1141. watch: {
  1142. // 根据名称筛选部门树
  1143. deptName(val) {
  1144. this.$refs.tree.filter(val);
  1145. }
  1146. },
  1147. created() {
  1148. //设置表格高度对应屏幕高度
  1149. this.$nextTick(() => {
  1150. this.clientHeight = (document.body.clientHeight - 80) * 0.8
  1151. })
  1152. this.getList();
  1153. this.getTreeselect();
  1154. this.getDicts("spec_approve_status").then(response => {
  1155. for (let i = 0; i < response.data.length; i++) {
  1156. if ( ["0","7","8"].includes(response.data[i].dictValue)){
  1157. this.approveStatusOptions.push(response.data[i])
  1158. }
  1159. }
  1160. });
  1161. this.getDicts("TEST_RESULT").then(response => {
  1162. this.pj1Options = response.data;
  1163. });
  1164. this.getDicts("TEST_RESULT").then(response => {
  1165. this.pj2Options = response.data;
  1166. });
  1167. this.getDicts("TEST_RESULT").then(response => {
  1168. this.pj3Options = response.data;
  1169. });
  1170. this.getDicts("TEST_RESULT").then(response => {
  1171. this.pj4Options = response.data;
  1172. });
  1173. this.getDicts("TEST_RESULT").then(response => {
  1174. this.pj5Options = response.data;
  1175. });
  1176. this.getDicts("TEST_RESULT").then(response => {
  1177. this.pj6Options = response.data;
  1178. });
  1179. this.getDicts("TEST_RESULT").then(response => {
  1180. this.pj7Options = response.data;
  1181. });
  1182. this.getDicts("TEST_RESULT").then(response => {
  1183. this.pj8Options = response.data;
  1184. });
  1185. this.getDicts("TEST_RESULT").then(response => {
  1186. this.pj9Options = response.data;
  1187. });
  1188. this.getDicts("TEST_RESULT").then(response => {
  1189. this.pj10Options = response.data;
  1190. });
  1191. this.getDicts("TEST_RESULT").then(response => {
  1192. this.pj11Options = response.data;
  1193. });
  1194. this.getDicts("TEST_RESULT").then(response => {
  1195. this.pj12Options = response.data;
  1196. });
  1197. this.getDicts("TEST_RESULT").then(response => {
  1198. this.pj13Options = response.data;
  1199. });
  1200. this.getDicts("TEST_RESULT").then(response => {
  1201. this.pj14Options = response.data;
  1202. });
  1203. this.getDicts("TEST_RESULT").then(response => {
  1204. this.pj15Options = response.data;
  1205. });
  1206. this.getDicts("TEST_RESULT").then(response => {
  1207. this.pj16Options = response.data;
  1208. });
  1209. this.getDicts("TEST_RESULT").then(response => {
  1210. this.pj17Options = response.data;
  1211. });
  1212. this.getDicts("TEST_RESULT").then(response => {
  1213. this.pj18Options = response.data;
  1214. });
  1215. this.getDicts("TEST_RESULT").then(response => {
  1216. this.pj19Options = response.data;
  1217. });
  1218. this.getDicts("TEST_RESULT").then(response => {
  1219. this.pj20Options = response.data;
  1220. });
  1221. this.getDicts("TEST_RESULT").then(response => {
  1222. this.pj21Options = response.data;
  1223. });
  1224. this.getDicts("TEST_RESULT").then(response => {
  1225. this.pj22Options = response.data;
  1226. });
  1227. this.getDicts("TEST_RESULT").then(response => {
  1228. this.pj23Options = response.data;
  1229. });
  1230. this.getDicts("TEST_RESULT").then(response => {
  1231. this.pj24Options = response.data;
  1232. });
  1233. this.getDicts("TEST_RESULT").then(response => {
  1234. this.pj25Options = response.data;
  1235. });
  1236. this.getDicts("TEST_RESULT").then(response => {
  1237. this.pj26Options = response.data;
  1238. });
  1239. this.getDicts("TEST_RESULT").then(response => {
  1240. this.pj27Options = response.data;
  1241. });
  1242. this.getDicts("TEST_RESULT").then(response => {
  1243. this.pj28Options = response.data;
  1244. });
  1245. this.getDicts("TEST_RESULT").then(response => {
  1246. this.pj29Options = response.data;
  1247. });
  1248. this.getDicts("TEST_RESULT").then(response => {
  1249. this.pj30Options = response.data;
  1250. });
  1251. this.getDicts("TEST_RESULT").then(response => {
  1252. this.pj31Options = response.data;
  1253. });
  1254. this.getDicts("TEST_RESULT").then(response => {
  1255. this.pj32Options = response.data;
  1256. });
  1257. this.getDicts("REPORT_CON").then(response => {
  1258. this.conOptions = response.data;
  1259. });
  1260. this.getDicts("PLANT_DIVIDE").then(response => {
  1261. this.plantCodeOptions = response.data;
  1262. });
  1263. let plantParams = {
  1264. pType: 1
  1265. }
  1266. mylistPlant(plantParams).then(response => {
  1267. this.plantOptions = response.data;
  1268. });
  1269. },
  1270. methods: {
  1271. //导出excel
  1272. downloadDev(type){
  1273. var rows = this.dataListSelections.map(item => {
  1274. return item.id
  1275. })
  1276. const queryParams = {ids: null};
  1277. queryParams.ids = rows.join()
  1278. exportReportYlrqSelected(queryParams).then(response => {
  1279. this.download(response.msg);
  1280. })
  1281. },
  1282. /** 查询压力容器年检报告列表 */
  1283. getList() {
  1284. this.loading = true;
  1285. console.log(this.queryParams.approveStatus);
  1286. listReportYlrq(this.queryParams).then(response => {
  1287. response.rows.forEach(element => {
  1288. element["isEdit"] = false
  1289. });
  1290. this.reportYlrqList = response.rows;
  1291. this.total = response.total;
  1292. this.loading = false;
  1293. this.$nextTick(() => {
  1294. this.$refs.reportTable.doLayout(); // 解决表格错位
  1295. });
  1296. });
  1297. },
  1298. /** 查询部门下拉树结构 */
  1299. getTreeselect() {
  1300. treeselect().then(response => {
  1301. this.deptOptions = response.data;
  1302. });
  1303. },
  1304. // 申请状态字典翻译
  1305. approveStatusFormat(row, column) {
  1306. return this.selectDictLabel(this.approveStatusOptions, row.approveStatus);
  1307. },
  1308. // 1字典翻译
  1309. pj1Format(row, column) {
  1310. return this.selectDictLabel(this.pj1Options, row.pj1);
  1311. },
  1312. // 2字典翻译
  1313. pj2Format(row, column) {
  1314. return this.selectDictLabel(this.pj2Options, row.pj2);
  1315. },
  1316. // 3字典翻译
  1317. pj3Format(row, column) {
  1318. return this.selectDictLabel(this.pj3Options, row.pj3);
  1319. },
  1320. // 4字典翻译
  1321. pj4Format(row, column) {
  1322. return this.selectDictLabel(this.pj4Options, row.pj4);
  1323. },
  1324. // 5字典翻译
  1325. pj5Format(row, column) {
  1326. return this.selectDictLabel(this.pj5Options, row.pj5);
  1327. },
  1328. // 6字典翻译
  1329. pj6Format(row, column) {
  1330. return this.selectDictLabel(this.pj6Options, row.pj6);
  1331. },
  1332. // 7字典翻译
  1333. pj7Format(row, column) {
  1334. return this.selectDictLabel(this.pj7Options, row.pj7);
  1335. },
  1336. // 8字典翻译
  1337. pj8Format(row, column) {
  1338. return this.selectDictLabel(this.pj8Options, row.pj8);
  1339. },
  1340. // 9字典翻译
  1341. pj9Format(row, column) {
  1342. return this.selectDictLabel(this.pj9Options, row.pj9);
  1343. },
  1344. // 10字典翻译
  1345. pj10Format(row, column) {
  1346. return this.selectDictLabel(this.pj10Options, row.pj10);
  1347. },
  1348. // 11字典翻译
  1349. pj11Format(row, column) {
  1350. return this.selectDictLabel(this.pj11Options, row.pj11);
  1351. },
  1352. // 12字典翻译
  1353. pj12Format(row, column) {
  1354. return this.selectDictLabel(this.pj12Options, row.pj12);
  1355. },
  1356. // 13字典翻译
  1357. pj13Format(row, column) {
  1358. return this.selectDictLabel(this.pj13Options, row.pj13);
  1359. },
  1360. // 14字典翻译
  1361. pj14Format(row, column) {
  1362. return this.selectDictLabel(this.pj14Options, row.pj14);
  1363. },
  1364. // 15字典翻译
  1365. pj15Format(row, column) {
  1366. return this.selectDictLabel(this.pj15Options, row.pj15);
  1367. },
  1368. // 16字典翻译
  1369. pj16Format(row, column) {
  1370. return this.selectDictLabel(this.pj16Options, row.pj16);
  1371. },
  1372. // 17字典翻译
  1373. pj17Format(row, column) {
  1374. return this.selectDictLabel(this.pj17Options, row.pj17);
  1375. },
  1376. // 18字典翻译
  1377. pj18Format(row, column) {
  1378. return this.selectDictLabel(this.pj18Options, row.pj18);
  1379. },
  1380. // 19字典翻译
  1381. pj19Format(row, column) {
  1382. return this.selectDictLabel(this.pj19Options, row.pj19);
  1383. },
  1384. // 20字典翻译
  1385. pj20Format(row, column) {
  1386. return this.selectDictLabel(this.pj20Options, row.pj20);
  1387. },
  1388. // 21字典翻译
  1389. pj21Format(row, column) {
  1390. return this.selectDictLabel(this.pj21Options, row.pj21);
  1391. },
  1392. // 22字典翻译
  1393. pj22Format(row, column) {
  1394. return this.selectDictLabel(this.pj22Options, row.pj22);
  1395. },
  1396. // 23字典翻译
  1397. pj23Format(row, column) {
  1398. return this.selectDictLabel(this.pj23Options, row.pj23);
  1399. },
  1400. // 24字典翻译
  1401. pj24Format(row, column) {
  1402. return this.selectDictLabel(this.pj24Options, row.pj24);
  1403. },
  1404. // 25字典翻译
  1405. pj25Format(row, column) {
  1406. return this.selectDictLabel(this.pj25Options, row.pj25);
  1407. },
  1408. // 26字典翻译
  1409. pj26Format(row, column) {
  1410. return this.selectDictLabel(this.pj26Options, row.pj26);
  1411. },
  1412. // 27字典翻译
  1413. pj27Format(row, column) {
  1414. return this.selectDictLabel(this.pj27Options, row.pj27);
  1415. },
  1416. // 28字典翻译
  1417. pj28Format(row, column) {
  1418. return this.selectDictLabel(this.pj28Options, row.pj28);
  1419. },
  1420. // 29字典翻译
  1421. pj29Format(row, column) {
  1422. return this.selectDictLabel(this.pj29Options, row.pj29);
  1423. },
  1424. // 30字典翻译
  1425. pj30Format(row, column) {
  1426. return this.selectDictLabel(this.pj30Options, row.pj30);
  1427. },
  1428. // 31字典翻译
  1429. pj31Format(row, column) {
  1430. return this.selectDictLabel(this.pj31Options, row.pj31);
  1431. },
  1432. // 32字典翻译
  1433. pj32Format(row, column) {
  1434. return this.selectDictLabel(this.pj32Options, row.pj32);
  1435. },
  1436. // 检查结论字典翻译
  1437. conFormat(row, column) {
  1438. return this.selectDictLabel(this.conOptions, row.con);
  1439. },
  1440. // 表单重置
  1441. reset() {
  1442. this.form = {
  1443. id: null,
  1444. devId: null,
  1445. medium: null,
  1446. desPressure: null,
  1447. desTemp: null,
  1448. optPressure: null,
  1449. optTemp: null,
  1450. pj1: null,
  1451. pj2: null,
  1452. pj3: null,
  1453. pj4: null,
  1454. pj5: null,
  1455. pj6: null,
  1456. pj7: null,
  1457. pj8: null,
  1458. pj9: null,
  1459. pj10: null,
  1460. pj11: null,
  1461. pj12: null,
  1462. pj13: null,
  1463. pj14: null,
  1464. pj15: null,
  1465. pj16: null,
  1466. pj17: null,
  1467. pj18: null,
  1468. pj19: null,
  1469. pj20: null,
  1470. pj21: null,
  1471. pj22: null,
  1472. pj23: null,
  1473. pj24: null,
  1474. pj25: null,
  1475. pj26: null,
  1476. pj27: null,
  1477. pj28: null,
  1478. pj29: null,
  1479. pj30: null,
  1480. pj31: null,
  1481. pj32: null,
  1482. remarks: null,
  1483. checkDate: null,
  1484. nextCheckDate: null,
  1485. problem: null,
  1486. con: null,
  1487. approveStatus: 0,
  1488. approveTime: null,
  1489. deptId: null,
  1490. delFlag: null,
  1491. createrCode: null,
  1492. createdate: null,
  1493. updaterCode: null,
  1494. updatedate: null
  1495. };
  1496. this.resetForm("form");
  1497. },
  1498. /** 搜索按钮操作 */
  1499. handleQuery() {
  1500. this.queryParams.pageNum = 1;
  1501. this.getList();
  1502. },
  1503. /** 重置按钮操作 */
  1504. resetQuery() {
  1505. this.resetForm("queryForm");
  1506. this.handleQuery();
  1507. },
  1508. // 多选框选中数据
  1509. handleSelectionChange(selection) {
  1510. this.ids = selection.map(item => item.id)
  1511. this.single = selection.length !== 1
  1512. this.multiple = !selection.length
  1513. this.dataListSelections = selection
  1514. },
  1515. /** 历史报告按钮操作 */
  1516. handleHistory(row) {
  1517. this.queryHistoryParams.reportId = row.id;
  1518. listHistoryYlrq(this.queryHistoryParams).then(response => {
  1519. this.historyYlrqList = response.rows;
  1520. this.open = true;
  1521. this.title = row.devno + this.$t('空格') + this.$t('历史报告');
  1522. });
  1523. },
  1524. /** 修改按钮操作 */
  1525. handleUpdate(row) {
  1526. // 备份原始数据
  1527. row['oldRow'] = JSON.parse(JSON.stringify(row));
  1528. this.$nextTick(() => {
  1529. row.isEdit = true;
  1530. })
  1531. },
  1532. /** 保存按钮操作 */
  1533. handleSave(row) {
  1534. row.isEdit = false;
  1535. this.loading = true;
  1536. this.form = row;
  1537. updateReportYlrq(this.form).then(response => {
  1538. this.msgSuccess(this.$t('修改成功'));
  1539. this.getList();
  1540. });
  1541. },
  1542. /** 取消按钮操作 */
  1543. handleCancel(row, index) {
  1544. // 还原数据
  1545. for (const i in row.oldRow) {
  1546. row[i] = row.oldRow[i]
  1547. }
  1548. row.isEdit = false
  1549. },
  1550. /** 删除按钮操作 */
  1551. handleDelete(row) {
  1552. const ids = row.id || this.ids;
  1553. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  1554. confirmButtonText: this.$t('确定'),
  1555. cancelButtonText: this.$t('取消'),
  1556. type: "warning"
  1557. }).then(function () {
  1558. return delReportYlrq(ids);
  1559. }).then(() => {
  1560. this.getList();
  1561. this.msgSuccess(this.$t('删除成功'));
  1562. })
  1563. },
  1564. /** 第三方文件删除按钮操作 */
  1565. handleDeleteThird(row) {
  1566. const ids = row.id;
  1567. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  1568. confirmButtonText: this.$t('确定'),
  1569. cancelButtonText: this.$t('取消'),
  1570. type: "warning"
  1571. }).then(function () {
  1572. return delReportThird(ids);
  1573. }).then(() => {
  1574. this.thirdPartyList();
  1575. this.msgSuccess(this.$t('删除成功'));
  1576. })
  1577. },
  1578. //提交报告
  1579. approveHandle(row) {
  1580. var rows = this.dataListSelections.map(item => {
  1581. return item
  1582. })
  1583. for (let i = 0; i < rows.length; i++) {
  1584. if (rows[i].approveStatus != 0) {
  1585. this.$alert(this.$t('当前设备正在申请中,无法重复申请'), this.$t('提示'), {
  1586. type: 'warning'
  1587. })
  1588. return
  1589. }
  1590. }
  1591. this.approveVisible = true
  1592. this.$nextTick(() => {
  1593. this.$refs.yearApprove.init(rows)
  1594. })
  1595. },
  1596. // 根据压力容器台账数据进行同步
  1597. syncData() {
  1598. syncReportYlrq().then(response => {
  1599. this.$message({
  1600. message: response.msg,
  1601. type: 'success'
  1602. });
  1603. this.getList();
  1604. })
  1605. },
  1606. //结论备注
  1607. renderHeader(h, {column, $index}) {
  1608. let _this = this
  1609. return [
  1610. column.label,
  1611. h(
  1612. "el-tooltip",
  1613. {
  1614. props: {
  1615. content: (function () {
  1616. if (column.label == 1) {
  1617. return `管理制度、操作规程、运行记录`
  1618. } else if (column.label == 2) {
  1619. return `设计文件、竣工图样、产品合格证、质量证明文件、安装使用说明`
  1620. } else if (column.label == 3) {
  1621. return `监督检验证书以及安装、改造、修理等资料`
  1622. } else if (column.label == 4) {
  1623. return `使用登记证,使用登记表是否与实际相符`
  1624. } else if (column.label == 5) {
  1625. return `日常维护保养、定期安全检查记录`
  1626. } else if (column.label == 6) {
  1627. return `年度检查、定期检验报告齐全,报告中问题解决`
  1628. } else if (column.label == 7) {
  1629. return `作业人员定期培训情况`
  1630. } else if (column.label == 8) {
  1631. return `设备铭牌、漆色、标志、使用证号码`
  1632. } else if (column.label == 9) {
  1633. return `本体裂、过热、变形、泄漏、损伤情况`
  1634. } else if (column.label == 10) {
  1635. return `接口部位、焊接接头等裂纹、泄漏、损伤情况`
  1636. } else if (column.label == 11) {
  1637. return `外表面腐蚀、异常结霜、结露情况`
  1638. } else if (column.label == 12) {
  1639. return `保温层、隔热层、衬里情况`
  1640. } else if (column.label == 13) {
  1641. return `检漏孔、信号孔`
  1642. } else if (column.label == 14) {
  1643. return `容器与相邻管道、构件间异常振动、响声、摩擦`
  1644. } else if (column.label == 15) {
  1645. return `支承、支座、基础、紧固螺栓`
  1646. } else if (column.label == 16) {
  1647. return `遮阳罩、操作台紧固`
  1648. } else if (column.label == 17) {
  1649. return `罐体与底盘等连接`
  1650. } else if (column.label == 18) {
  1651. return `波板、罐内扶梯与罐体连接`
  1652. } else if (column.label == 19) {
  1653. return `罐车拉紧带、鞍座、中间支座`
  1654. } else if (column.label == 20) {
  1655. return `气液相管及其它管路`
  1656. } else if (column.label == 21) {
  1657. return `疏水、排放、排污装置`
  1658. } else if (column.label == 22) {
  1659. return `设备运行稳定情况`
  1660. } else if (column.label == 23) {
  1661. return `接地装置`
  1662. } else if (column.label == 24) {
  1663. return `安全状况等级为4级的压力容器的监控措施`
  1664. } else if (column.label == 25) {
  1665. return `安全阀`
  1666. } else if (column.label == 26) {
  1667. return `压力表`
  1668. } else if (column.label == 27) {
  1669. return `爆破片`
  1670. } else if (column.label == 28) {
  1671. return `测温仪表`
  1672. } else if (column.label == 29) {
  1673. return `液位计`
  1674. } else if (column.label == 30) {
  1675. return `快开门安全联锁装置`
  1676. } else if (column.label == 31) {
  1677. return `紧急切断装置`
  1678. } else if (column.label == 32) {
  1679. return `装卸软管、装卸阀门`
  1680. }else {
  1681. return _this.$t('如果是多腔压力容器')
  1682. }
  1683. })(),
  1684. placement: "top"
  1685. }
  1686. },
  1687. [
  1688. h("span", {
  1689. class: {
  1690. "el-icon-question": true,
  1691. "report-headerTips": true
  1692. }
  1693. })
  1694. ]
  1695. )
  1696. ]
  1697. },
  1698. //下载报告
  1699. downloadReport(row) {
  1700. this.downloadForm.id = row.id;
  1701. this.$nextTick(() => {
  1702. this.$refs['downloadForm'].submit()
  1703. })
  1704. },
  1705. // 文件下载处理
  1706. handleDownloadReport(row) {
  1707. let param = {
  1708. id: row.id
  1709. }
  1710. exportPDF(param).then(response => {
  1711. let url = response;
  1712. var name = response;
  1713. var suffix = url.substring(url.lastIndexOf("."), url.length);
  1714. console.log(url)
  1715. const a = document.createElement('a')
  1716. a.setAttribute('download', name)
  1717. a.setAttribute('target', '_blank')
  1718. a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
  1719. a.click()
  1720. });
  1721. },
  1722. //批量下载某年份的历史报告
  1723. exportDataForYear() {
  1724. //将控件时间转为年,如果未选中年份,默认当前年
  1725. if (this.exportCheckYear == null) {
  1726. this.exportCheckYear = Date.now();
  1727. }
  1728. var date = new Date(this.exportCheckYear)
  1729. this.downloadForm2.year = date.getFullYear();
  1730. this.$nextTick(() => {
  1731. this.$refs['downloadForm2'].submit()
  1732. })
  1733. //下载完成后关闭弹窗
  1734. this.dialogVisible = false;
  1735. },
  1736. /** 导入按钮操作 */
  1737. handleImport() {
  1738. this.upload.title = "用户导入";
  1739. this.upload.open = true;
  1740. },
  1741. /** 下载模板操作 */
  1742. importTemplate() {
  1743. this.$refs['downloadFileForm'].submit()
  1744. },
  1745. // 文件上传中处理
  1746. handleFileUploadProgress(event, file, fileList) {
  1747. this.upload.isUploading = true;
  1748. },
  1749. // 文件上传成功处理
  1750. handleFileSuccess(response, file, fileList) {
  1751. this.upload.open = false;
  1752. this.upload.isUploading = false;
  1753. this.$refs.upload.clearFiles();
  1754. this.fullscreenLoading = false;
  1755. if (response.data.length > 0) {
  1756. let failrow = ''
  1757. for (let i = 0; i < response.data.length; i++) {
  1758. failrow += response.data[i] + ','
  1759. }
  1760. this.$alert(this.$t('导入成功条数:') + response.msg + '<br>' + this.$t('失败行数:') + failrow, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
  1761. } else {
  1762. this.$alert(this.$t('导入成功条数:') + response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
  1763. }
  1764. this.getList();
  1765. },
  1766. // 提交上传文件
  1767. submitFileForm() {
  1768. this.$refs.upload.submit();
  1769. this.fullscreenLoading = true;
  1770. },
  1771. /** 导出按钮操作 */
  1772. handleExport() {
  1773. const queryParams = this.queryParams;
  1774. this.$confirm(this.$t('是否确认导出所有特种设备压力容器年检报告数据项?'), this.$t('警告'), {
  1775. confirmButtonText: this.$t('确定'),
  1776. cancelButtonText: this.$t('取消'),
  1777. type: "warning"
  1778. }).then(function () {
  1779. return exportReportYlrq(queryParams);
  1780. }).then(response => {
  1781. this.download(response.msg);
  1782. })
  1783. },
  1784. //导入第三方数据
  1785. importThirdParty() {
  1786. this.thirdUpload.title = "第三方数据导入";
  1787. this.thirdUpload.open = true;
  1788. },
  1789. thirdSubmitFileForm() {
  1790. this.submitData.plantCode = this.plantCodeThird;
  1791. this.submitData.year = new Date(this.importThirdYear).getFullYear();
  1792. this.$refs.thirdUpload.submit();
  1793. this.fullscreenLoading = true;
  1794. },
  1795. //第三方数据列表
  1796. thirdPartyList() {
  1797. listTReportThird(this.thirdListQuery).then(response => {
  1798. this.reportYlrqThirdList = response.data;
  1799. });
  1800. this.thirdList.title = "第三方数据列表";
  1801. this.thirdList.open = true;
  1802. },
  1803. // 第三方文件上传中处理
  1804. handleFileUploadProgressThird(event, file, fileList) {
  1805. this.thirdUpload.isUploading = true;
  1806. },
  1807. // 第三方文件上传成功处理
  1808. handleFileSuccessThird(response, file, fileList) {
  1809. this.thirdUpload.open = false;
  1810. this.thirdUpload.isUploading = false;
  1811. this.$refs.thirdUpload.clearFiles();
  1812. this.fullscreenLoading = false;
  1813. if (response.data.length > 0) {
  1814. this.$alert(this.$t('导入成功'));
  1815. } else {
  1816. this.$alert(this.$t('导入成功'));
  1817. }
  1818. this.getList();
  1819. },
  1820. // 文件下载处理
  1821. handleDownload(row) {
  1822. var name = row.fileName;
  1823. var url = row.filePath;
  1824. var suffix = url.substring(url.lastIndexOf("."), url.length);
  1825. const a = document.createElement('a')
  1826. a.setAttribute('download', name)
  1827. a.setAttribute('target', '_blank')
  1828. a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
  1829. a.click()
  1830. },
  1831. }
  1832. };
  1833. </script>