h116.vue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321
  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="巡检日期" prop="recordTime">
  5. <el-date-picker
  6. v-model="queryParams.recordTime"
  7. type="month"
  8. value-format="yyyy-MM"
  9. placeholder="选择巡检日期">
  10. </el-date-picker>
  11. </el-form-item>
  12. <el-form-item>
  13. <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  14. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  15. </el-form-item>
  16. </el-form>
  17. <el-row :gutter="10" class="mb8">
  18. <el-col :span="1.5">
  19. <el-button
  20. type="success"
  21. icon="el-icon-edit"
  22. size="mini"
  23. :disabled="single"
  24. @click="handleUpdate"
  25. v-hasPermi="['production:pressure:edit']"
  26. >修改</el-button>
  27. </el-col>
  28. <el-col :span="1.5">
  29. <el-button
  30. type="danger"
  31. icon="el-icon-delete"
  32. size="mini"
  33. :disabled="multiple"
  34. @click="handleDelete"
  35. v-hasPermi="['production:pressure:remove']"
  36. >删除</el-button>
  37. </el-col>
  38. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  39. </el-row>
  40. <el-table v-loading="loading" :data="pressureList" @selection-change="handleSelectionChange" :height="clientHeight" border>
  41. <el-table-column type="selection" width="55" align="center" />
  42. <el-table-column label="裂解炉名称" align="center" prop="furnanceName" :show-overflow-tooltip="true" width="100"/>
  43. <el-table-column label="巡检日期" align="center" prop="recordTime" width="150">
  44. <template slot-scope="scope">
  45. <span>{{ parseTime(scope.row.recordTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="班组" align="center" prop="team" :show-overflow-tooltip="true" width="80" :formatter="teamFormat"/>
  49. <el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true" width="80" :formatter="statusFormat"/>
  50. <el-table-column label="PASS1出口" align="center" prop="pass1" :show-overflow-tooltip="true">
  51. <!--<el-table-column label="入口" align="center" width="60">-->
  52. <el-table-column label="PG1213G" align="center" width="100">
  53. <template slot-scope="scope">
  54. <span>{{ scope.row.pass1[10] }}</span>
  55. </template>
  56. </el-table-column>
  57. <!--<el-table-column v-for="(item,index) in 10" :label="(index+1).toString()" align="center" width="60">-->
  58. <el-table-column v-for="(item,index) in 10" :label="'PG1214G'+alphabets[index]" align="center" width="100">
  59. <template slot-scope="scope">
  60. <span>{{ scope.row.pass1[index] }}</span>
  61. </template>
  62. </el-table-column>
  63. </el-table-column>
  64. <el-table-column label="PASS2出口" align="center" prop="pass2" :show-overflow-tooltip="true">
  65. <!--<el-table-column label="入口" align="center" width="60">-->
  66. <el-table-column label="PG1223G" align="center" width="100">
  67. <template slot-scope="scope">
  68. <span>{{ scope.row.pass2[10] }}</span>
  69. </template>
  70. </el-table-column>
  71. <!--<el-table-column v-for="(item,index) in 10" :label="(index+1).toString()" align="center" width="60">-->
  72. <el-table-column v-for="(item,index) in 10" :label="'PG1224G'+alphabets[index]" align="center" width="100">
  73. <template slot-scope="scope">
  74. <span>{{ scope.row.pass2[index] }}</span>
  75. </template>
  76. </el-table-column>
  77. </el-table-column>
  78. <el-table-column label="PASS3出口" align="center" prop="pass3" :show-overflow-tooltip="true">
  79. <!--<el-table-column label="入口" align="center" width="60">-->
  80. <el-table-column label="PG1233G" align="center" width="100">
  81. <template slot-scope="scope">
  82. <span>{{ scope.row.pass3[10] }}</span>
  83. </template>
  84. </el-table-column>
  85. <!--<el-table-column v-for="(item,index) in 10" :label="(index+1).toString()" align="center" width="60">-->
  86. <el-table-column v-for="(item,index) in 10" :label="'PG1234G'+alphabets[index]" align="center" width="100">
  87. <template slot-scope="scope">
  88. <span>{{ scope.row.pass3[index] }}</span>
  89. </template>
  90. </el-table-column>
  91. </el-table-column>
  92. <el-table-column label="PASS4出口" align="center" prop="pass4" :show-overflow-tooltip="true">
  93. <!--<el-table-column label="入口" align="center" width="60">-->
  94. <el-table-column label="PG1243G" align="center" width="100">
  95. <template slot-scope="scope">
  96. <span>{{ scope.row.pass4[10] }}</span>
  97. </template>
  98. </el-table-column>
  99. <!--<el-table-column v-for="(item,index) in 10" :label="(index+1).toString()" align="center" width="60">-->
  100. <el-table-column v-for="(item,index) in 10" :label="'PG1244G'+alphabets[index]" align="center" width="100">
  101. <template slot-scope="scope">
  102. <span>{{ scope.row.pass4[index] }}</span>
  103. </template>
  104. </el-table-column>
  105. </el-table-column>
  106. <el-table-column label="PASS5出口" align="center" prop="pass5" :show-overflow-tooltip="true">
  107. <!--<el-table-column label="入口" align="center" width="60">-->
  108. <el-table-column label="PG1253G" align="center" width="100">
  109. <template slot-scope="scope">
  110. <span>{{ scope.row.pass5[10] }}</span>
  111. </template>
  112. </el-table-column>
  113. <!--<el-table-column v-for="(item,index) in 10" :label="(index+1).toString()" align="center" width="60">-->
  114. <el-table-column v-for="(item,index) in 10" :label="'PG1254G'+alphabets[index]" align="center" width="100">
  115. <template slot-scope="scope">
  116. <span>{{ scope.row.pass5[index] }}</span>
  117. </template>
  118. </el-table-column>
  119. </el-table-column>
  120. <el-table-column label="PASS6出口" align="center" prop="pass6" :show-overflow-tooltip="true">
  121. <!--<el-table-column label="入口" align="center" width="60">-->
  122. <el-table-column label="PG1263G" align="center" width="100">
  123. <template slot-scope="scope">
  124. <span>{{ scope.row.pass6[10] }}</span>
  125. </template>
  126. </el-table-column>
  127. <!--<el-table-column v-for="(item,index) in 10" :label="(index+1).toString()" align="center" width="60">-->
  128. <el-table-column v-for="(item,index) in 10" :label="'PG1264G'+alphabets[index]" align="center" width="100">
  129. <template slot-scope="scope">
  130. <span>{{ scope.row.pass6[index] }}</span>
  131. </template>
  132. </el-table-column>
  133. </el-table-column>
  134. <el-table-column label="PASS7出口" align="center" prop="pass7" :show-overflow-tooltip="true">
  135. <!--<el-table-column label="入口" align="center" width="60">-->
  136. <el-table-column label="PG1273G" align="center" width="100">
  137. <template slot-scope="scope">
  138. <span>{{ scope.row.pass7[10] }}</span>
  139. </template>
  140. </el-table-column>
  141. <!--<el-table-column v-for="(item,index) in 10" :label="(index+1).toString()" align="center" width="60">-->
  142. <el-table-column v-for="(item,index) in 10" :label="'PG1274G'+alphabets[index]" align="center" width="100">
  143. <template slot-scope="scope">
  144. <span>{{ scope.row.pass7[index] }}</span>
  145. </template>
  146. </el-table-column>
  147. </el-table-column>
  148. <el-table-column label="PASS8出口" align="center" prop="pass8" :show-overflow-tooltip="true">
  149. <!--<el-table-column label="入口" align="center" width="60">-->
  150. <el-table-column label="PG1283G" align="center" width="100">
  151. <template slot-scope="scope">
  152. <span>{{ scope.row.pass8[10] }}</span>
  153. </template>
  154. </el-table-column>
  155. <!--<el-table-column v-for="(item,index) in 10" :label="(index+1).toString()" align="center" width="60">-->
  156. <el-table-column v-for="(item,index) in 10" :label="'PG1284G'+alphabets[index]" align="center" width="100">
  157. <template slot-scope="scope">
  158. <span>{{ scope.row.pass8[index] }}</span>
  159. </template>
  160. </el-table-column>
  161. </el-table-column>
  162. <el-table-column label="操作" align="center" fixed="right" width="200" class-name="small-padding fixed-width">
  163. <template slot-scope="scope">
  164. <el-button
  165. size="mini"
  166. type="text"
  167. @click="handlePhoto(scope.row)"
  168. >现场照片</el-button>
  169. <el-button
  170. size="mini"
  171. type="text"
  172. icon="el-icon-edit"
  173. @click="handleUpdate(scope.row)"
  174. v-hasPermi="['production:pressure:edit']"
  175. >修改</el-button>
  176. <el-button
  177. size="mini"
  178. type="text"
  179. icon="el-icon-delete"
  180. @click="handleDelete(scope.row)"
  181. v-hasPermi="['production:pressure:remove']"
  182. >删除</el-button>
  183. </template>
  184. </el-table-column>
  185. </el-table>
  186. <pagination
  187. v-show="total>0"
  188. :total="total"
  189. :page.sync="queryParams.pageNum"
  190. :limit.sync="queryParams.pageSize"
  191. @pagination="getList"
  192. />
  193. <!-- 添加或修改裂解炉炉管测压对话框 -->
  194. <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
  195. <el-form ref="form" :model="form" :rules="rules" label-width="100px">
  196. <el-form-item label="裂解炉名称" prop="furnanceName">
  197. <el-input v-model="form.furnanceName" placeholder="请输入裂解炉名称" />
  198. </el-form-item>
  199. <el-form-item label="巡检日期" prop="recordTimeYmd">
  200. <el-date-picker clearable size="small" style="width: 200px"
  201. v-model="recordTimeYmd"
  202. type="date"
  203. value-format="yyyy-MM-dd"
  204. placeholder="选择巡检日期">
  205. </el-date-picker>
  206. </el-form-item>
  207. <el-form-item label="巡检时间" prop="recordTimeHms">
  208. <el-time-picker
  209. v-model="recordTimeHms"
  210. :picker-options="{selectableRange: '00:00:01 - 23:59:59'}"
  211. placeholder="请选择时间"
  212. value-format="HH:mm:ss"
  213. size="small"
  214. style="width: 200px">
  215. </el-time-picker>
  216. </el-form-item>
  217. <el-form-item label="班组">
  218. <el-select v-model="form.team" placeholder="请选择" size="small">
  219. <el-option
  220. v-for="item in teamOptions"
  221. :key="item.dictValue"
  222. :label="item.dictLabel"
  223. :value="item.dictValue">
  224. </el-option>
  225. </el-select>
  226. </el-form-item>
  227. <el-form-item label="记录人">
  228. <el-select v-model="form.recorder" placeholder="请选择" size="small">
  229. <el-option
  230. v-for="item in userList"
  231. :key="item.userId"
  232. :label="item.nickName"
  233. :value="item.userId">
  234. </el-option>
  235. </el-select>
  236. </el-form-item>
  237. <el-form-item label="状态">
  238. <el-select v-model="form.status" placeholder="请选择" size="small" @change="handleChange">
  239. <el-option
  240. v-for="item in statusOptions"
  241. :key="item.dictValue"
  242. :label="item.dictLabel"
  243. :value="item.dictValue">
  244. </el-option>
  245. </el-select>
  246. </el-form-item>
  247. <el-form-item label="归属部门" prop="deptId">
  248. <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
  249. </el-form-item>
  250. </el-form>
  251. <el-descriptions title="PASS1出口" direction="vertical" :column="6" border>
  252. <!--<el-descriptions-item label="入口">-->
  253. <el-descriptions-item label="PG1213G">
  254. <el-input v-model="pass1[10]"/>
  255. </el-descriptions-item>
  256. <!--<el-descriptions-item v-for="(item, index) in 10" :label="(index+1).toString()">-->
  257. <el-descriptions-item v-for="(item, index) in 10" :label="'PG1214G'+alphabets[index]">
  258. <el-input v-model="pass1[index]"/>
  259. </el-descriptions-item>
  260. <el-descriptions-item label=""></el-descriptions-item>
  261. </el-descriptions><br/>
  262. <el-descriptions title="PASS2出口" direction="vertical" :column="6" border>
  263. <!--<el-descriptions-item label="入口">-->
  264. <el-descriptions-item label="PG1223G">
  265. <el-input v-model="pass2[10]"/>
  266. </el-descriptions-item>
  267. <!--<el-descriptions-item v-for="(item, index) in 10" :label="(index+1).toString()">-->
  268. <el-descriptions-item v-for="(item, index) in 10" :label="'PG1224G'+alphabets[index]">
  269. <el-input v-model="pass2[index]"/>
  270. </el-descriptions-item>
  271. <el-descriptions-item label=""></el-descriptions-item>
  272. </el-descriptions><br/>
  273. <el-descriptions title="PASS3出口" direction="vertical" :column="6" border>
  274. <!--<el-descriptions-item label="入口">-->
  275. <el-descriptions-item label="PG1233G">
  276. <el-input v-model="pass3[10]"/>
  277. </el-descriptions-item>
  278. <!--<el-descriptions-item v-for="(item, index) in 10" :label="(index+1).toString()">-->
  279. <el-descriptions-item v-for="(item, index) in 10" :label="'PG1234G'+alphabets[index]">
  280. <el-input v-model="pass3[index]"/>
  281. </el-descriptions-item>
  282. <el-descriptions-item label=""></el-descriptions-item>
  283. </el-descriptions><br/>
  284. <el-descriptions title="PASS4出口" direction="vertical" :column="6" border>
  285. <!--<el-descriptions-item label="入口">-->
  286. <el-descriptions-item label="PG1243G">
  287. <el-input v-model="pass4[10]"/>
  288. </el-descriptions-item>
  289. <!--<el-descriptions-item v-for="(item, index) in 10" :label="(index+1).toString()">-->
  290. <el-descriptions-item v-for="(item, index) in 10" :label="'PG1244G'+alphabets[index]">
  291. <el-input v-model="pass4[index]"/>
  292. </el-descriptions-item>
  293. <el-descriptions-item label=""></el-descriptions-item>
  294. </el-descriptions><br/>
  295. <el-descriptions title="PASS5出口" direction="vertical" :column="6" border>
  296. <!--<el-descriptions-item label="入口">-->
  297. <el-descriptions-item label="PG1253G">
  298. <el-input v-model="pass5[10]"/>
  299. </el-descriptions-item>
  300. <!--<el-descriptions-item v-for="(item, index) in 10" :label="(index+1).toString()">-->
  301. <el-descriptions-item v-for="(item, index) in 10" :label="'PG1254G'+alphabets[index]">
  302. <el-input v-model="pass5[index]"/>
  303. </el-descriptions-item>
  304. <el-descriptions-item label=""></el-descriptions-item>
  305. </el-descriptions><br/>
  306. <el-descriptions title="PASS6出口" direction="vertical" :column="6" border>
  307. <!--<el-descriptions-item label="入口">-->
  308. <el-descriptions-item label="PG1263G">
  309. <el-input v-model="pass6[10]"/>
  310. </el-descriptions-item>
  311. <!--<el-descriptions-item v-for="(item, index) in 10" :label="(index+1).toString()">-->
  312. <el-descriptions-item v-for="(item, index) in 10" :label="'PG1264G'+alphabets[index]">
  313. <el-input v-model="pass6[index]"/>
  314. </el-descriptions-item>
  315. <el-descriptions-item label=""></el-descriptions-item>
  316. </el-descriptions><br/>
  317. <el-descriptions title="PASS7出口" direction="vertical" :column="6" border>
  318. <!--<el-descriptions-item label="入口">-->
  319. <el-descriptions-item label="PG1273G">
  320. <el-input v-model="pass7[10]"/>
  321. </el-descriptions-item>
  322. <!--<el-descriptions-item v-for="(item, index) in 10" :label="(index+1).toString()">-->
  323. <el-descriptions-item v-for="(item, index) in 10" :label="'PG1274G'+alphabets[index]">
  324. <el-input v-model="pass7[index]"/>
  325. </el-descriptions-item>
  326. <el-descriptions-item label=""></el-descriptions-item>
  327. </el-descriptions><br/>
  328. <el-descriptions title="PASS8出口" direction="vertical" :column="6" border>
  329. <!--<el-descriptions-item label="入口">-->
  330. <el-descriptions-item label="PG1283G">
  331. <el-input v-model="pass8[10]"/>
  332. </el-descriptions-item>
  333. <!--<el-descriptions-item v-for="(item, index) in 10" :label="(index+1).toString()">-->
  334. <el-descriptions-item v-for="(item, index) in 10" :label="'PG1284G'+alphabets[index]">
  335. <el-input v-model="pass8[index]"/>
  336. </el-descriptions-item>
  337. <el-descriptions-item label=""></el-descriptions-item>
  338. </el-descriptions>
  339. <div slot="footer" class="dialog-footer">
  340. <el-button type="primary" @click="submitForm">确 定</el-button>
  341. <el-button @click="cancel">取 消</el-button>
  342. </div>
  343. </el-dialog>
  344. <!-- 用户导入对话框 -->
  345. <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
  346. <el-upload
  347. ref="upload"
  348. :limit="1"
  349. accept=".xlsx, .xls"
  350. :headers="upload.headers"
  351. :action="upload.url + '?updateSupport=' + upload.updateSupport"
  352. :disabled="upload.isUploading"
  353. :on-progress="handleFileUploadProgress"
  354. :on-success="handleFileSuccess"
  355. :auto-upload="false"
  356. drag
  357. >
  358. <i class="el-icon-upload"></i>
  359. <div class="el-upload__text">
  360. 将文件拖到此处,或
  361. <em>点击上传</em>
  362. </div>
  363. <div class="el-upload__tip" slot="tip">
  364. <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
  365. <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
  366. </div>
  367. <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
  368. </el-upload>
  369. <div slot="footer" class="dialog-footer">
  370. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  371. <el-button @click="upload.open = false">取 消</el-button>
  372. </div>
  373. </el-dialog>
  374. <!-- 现场照片 -->
  375. <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="800px" append-to-body >
  376. <el-tabs tab-position="left">
  377. <el-tab-pane label="PASS1">
  378. <el-upload ref="doc"
  379. :limit="1"
  380. :headers="doc.headers"
  381. :action="doc.url + '?pType=furnancePressurePass1&pId=' + doc.pId"
  382. :disabled="doc.isUploading"
  383. :on-progress="handleFileDocProgress"
  384. :on-success="handleFileDocSuccess"
  385. :auto-upload="true"
  386. drag
  387. >
  388. <i class="el-icon-upload"></i>
  389. <div class="el-upload__text">
  390. {{ $t('将文件拖到此处,或') }}
  391. <em>{{ $t('点击上传') }}</em>
  392. </div>
  393. </el-upload>
  394. <el-table :data="doc.commonfileList1" border>
  395. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  396. <template slot-scope="scope">
  397. <a class="link-type" @click="handleDownload(scope.row)">
  398. <span>{{ scope.row.fileName }}</span>
  399. </a>
  400. </template>
  401. </el-table-column>
  402. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  403. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  404. <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
  405. <template slot-scope="scope">
  406. <el-button
  407. size="mini"
  408. type="text"
  409. icon="el-icon-download"
  410. @click="handleDownload(scope.row)"
  411. >{{ $t('下载') }}</el-button>
  412. <el-button
  413. size="mini"
  414. type="text"
  415. icon="el-icon-delete"
  416. @click="handleDeleteDoc(scope.row)"
  417. >{{ $t('删除') }}</el-button>
  418. </template>
  419. </el-table-column>
  420. </el-table>
  421. </el-tab-pane>
  422. <el-tab-pane label="PASS2">
  423. <el-upload ref="doc"
  424. :limit="1"
  425. :headers="doc.headers"
  426. :action="doc.url + '?pType=furnancePressurePass2&pId=' + doc.pId"
  427. :disabled="doc.isUploading"
  428. :on-progress="handleFileDocProgress"
  429. :on-success="handleFileDocSuccess"
  430. :auto-upload="true"
  431. drag
  432. >
  433. <i class="el-icon-upload"></i>
  434. <div class="el-upload__text">
  435. {{ $t('将文件拖到此处,或') }}
  436. <em>{{ $t('点击上传') }}</em>
  437. </div>
  438. </el-upload>
  439. <el-table :data="doc.commonfileList2" border>
  440. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  441. <template slot-scope="scope">
  442. <a class="link-type" @click="handleDownload(scope.row)">
  443. <span>{{ scope.row.fileName }}</span>
  444. </a>
  445. </template>
  446. </el-table-column>
  447. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  448. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  449. <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
  450. <template slot-scope="scope">
  451. <el-button
  452. size="mini"
  453. type="text"
  454. icon="el-icon-download"
  455. @click="handleDownload(scope.row)"
  456. >{{ $t('下载') }}</el-button>
  457. <el-button
  458. size="mini"
  459. type="text"
  460. icon="el-icon-delete"
  461. @click="handleDeleteDoc(scope.row)"
  462. >{{ $t('删除') }}</el-button>
  463. </template>
  464. </el-table-column>
  465. </el-table>
  466. </el-tab-pane>
  467. <el-tab-pane label="PASS3">
  468. <el-upload ref="doc"
  469. :limit="1"
  470. :headers="doc.headers"
  471. :action="doc.url + '?pType=furnancePressurePass3&pId=' + doc.pId"
  472. :disabled="doc.isUploading"
  473. :on-progress="handleFileDocProgress"
  474. :on-success="handleFileDocSuccess"
  475. :auto-upload="true"
  476. drag
  477. >
  478. <i class="el-icon-upload"></i>
  479. <div class="el-upload__text">
  480. {{ $t('将文件拖到此处,或') }}
  481. <em>{{ $t('点击上传') }}</em>
  482. </div>
  483. </el-upload>
  484. <el-table :data="doc.commonfileList3" border>
  485. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  486. <template slot-scope="scope">
  487. <a class="link-type" @click="handleDownload(scope.row)">
  488. <span>{{ scope.row.fileName }}</span>
  489. </a>
  490. </template>
  491. </el-table-column>
  492. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  493. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  494. <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
  495. <template slot-scope="scope">
  496. <el-button
  497. size="mini"
  498. type="text"
  499. icon="el-icon-download"
  500. @click="handleDownload(scope.row)"
  501. >{{ $t('下载') }}</el-button>
  502. <el-button
  503. size="mini"
  504. type="text"
  505. icon="el-icon-delete"
  506. @click="handleDeleteDoc(scope.row)"
  507. >{{ $t('删除') }}</el-button>
  508. </template>
  509. </el-table-column>
  510. </el-table>
  511. </el-tab-pane>
  512. <el-tab-pane label="PASS4">
  513. <el-upload ref="doc"
  514. :limit="1"
  515. :headers="doc.headers"
  516. :action="doc.url + '?pType=furnancePressurePass4&pId=' + doc.pId"
  517. :disabled="doc.isUploading"
  518. :on-progress="handleFileDocProgress"
  519. :on-success="handleFileDocSuccess"
  520. :auto-upload="true"
  521. drag
  522. >
  523. <i class="el-icon-upload"></i>
  524. <div class="el-upload__text">
  525. {{ $t('将文件拖到此处,或') }}
  526. <em>{{ $t('点击上传') }}</em>
  527. </div>
  528. </el-upload>
  529. <el-table :data="doc.commonfileList4" border>
  530. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  531. <template slot-scope="scope">
  532. <a class="link-type" @click="handleDownload(scope.row)">
  533. <span>{{ scope.row.fileName }}</span>
  534. </a>
  535. </template>
  536. </el-table-column>
  537. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  538. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  539. <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
  540. <template slot-scope="scope">
  541. <el-button
  542. size="mini"
  543. type="text"
  544. icon="el-icon-download"
  545. @click="handleDownload(scope.row)"
  546. >{{ $t('下载') }}</el-button>
  547. <el-button
  548. size="mini"
  549. type="text"
  550. icon="el-icon-delete"
  551. @click="handleDeleteDoc(scope.row)"
  552. >{{ $t('删除') }}</el-button>
  553. </template>
  554. </el-table-column>
  555. </el-table>
  556. </el-tab-pane>
  557. <el-tab-pane label="PASS5">
  558. <el-upload ref="doc"
  559. :limit="1"
  560. :headers="doc.headers"
  561. :action="doc.url + '?pType=furnancePressurePass5&pId=' + doc.pId"
  562. :disabled="doc.isUploading"
  563. :on-progress="handleFileDocProgress"
  564. :on-success="handleFileDocSuccess"
  565. :auto-upload="true"
  566. drag
  567. >
  568. <i class="el-icon-upload"></i>
  569. <div class="el-upload__text">
  570. {{ $t('将文件拖到此处,或') }}
  571. <em>{{ $t('点击上传') }}</em>
  572. </div>
  573. </el-upload>
  574. <el-table :data="doc.commonfileList5" border>
  575. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  576. <template slot-scope="scope">
  577. <a class="link-type" @click="handleDownload(scope.row)">
  578. <span>{{ scope.row.fileName }}</span>
  579. </a>
  580. </template>
  581. </el-table-column>
  582. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  583. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  584. <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
  585. <template slot-scope="scope">
  586. <el-button
  587. size="mini"
  588. type="text"
  589. icon="el-icon-download"
  590. @click="handleDownload(scope.row)"
  591. >{{ $t('下载') }}</el-button>
  592. <el-button
  593. size="mini"
  594. type="text"
  595. icon="el-icon-delete"
  596. @click="handleDeleteDoc(scope.row)"
  597. >{{ $t('删除') }}</el-button>
  598. </template>
  599. </el-table-column>
  600. </el-table>
  601. </el-tab-pane>
  602. <el-tab-pane label="PASS6">
  603. <el-upload ref="doc"
  604. :limit="1"
  605. :headers="doc.headers"
  606. :action="doc.url + '?pType=furnancePressurePass6&pId=' + doc.pId"
  607. :disabled="doc.isUploading"
  608. :on-progress="handleFileDocProgress"
  609. :on-success="handleFileDocSuccess"
  610. :auto-upload="true"
  611. drag
  612. >
  613. <i class="el-icon-upload"></i>
  614. <div class="el-upload__text">
  615. {{ $t('将文件拖到此处,或') }}
  616. <em>{{ $t('点击上传') }}</em>
  617. </div>
  618. </el-upload>
  619. <el-table :data="doc.commonfileList6" border>
  620. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  621. <template slot-scope="scope">
  622. <a class="link-type" @click="handleDownload(scope.row)">
  623. <span>{{ scope.row.fileName }}</span>
  624. </a>
  625. </template>
  626. </el-table-column>
  627. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  628. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  629. <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
  630. <template slot-scope="scope">
  631. <el-button
  632. size="mini"
  633. type="text"
  634. icon="el-icon-download"
  635. @click="handleDownload(scope.row)"
  636. >{{ $t('下载') }}</el-button>
  637. <el-button
  638. size="mini"
  639. type="text"
  640. icon="el-icon-delete"
  641. @click="handleDeleteDoc(scope.row)"
  642. >{{ $t('删除') }}</el-button>
  643. </template>
  644. </el-table-column>
  645. </el-table>
  646. </el-tab-pane>
  647. <el-tab-pane label="PASS7">
  648. <el-upload ref="doc"
  649. :limit="1"
  650. :headers="doc.headers"
  651. :action="doc.url + '?pType=furnancePressurePass7&pId=' + doc.pId"
  652. :disabled="doc.isUploading"
  653. :on-progress="handleFileDocProgress"
  654. :on-success="handleFileDocSuccess"
  655. :auto-upload="true"
  656. drag
  657. >
  658. <i class="el-icon-upload"></i>
  659. <div class="el-upload__text">
  660. {{ $t('将文件拖到此处,或') }}
  661. <em>{{ $t('点击上传') }}</em>
  662. </div>
  663. </el-upload>
  664. <el-table :data="doc.commonfileList7" border>
  665. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  666. <template slot-scope="scope">
  667. <a class="link-type" @click="handleDownload(scope.row)">
  668. <span>{{ scope.row.fileName }}</span>
  669. </a>
  670. </template>
  671. </el-table-column>
  672. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  673. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  674. <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
  675. <template slot-scope="scope">
  676. <el-button
  677. size="mini"
  678. type="text"
  679. icon="el-icon-download"
  680. @click="handleDownload(scope.row)"
  681. >{{ $t('下载') }}</el-button>
  682. <el-button
  683. size="mini"
  684. type="text"
  685. icon="el-icon-delete"
  686. @click="handleDeleteDoc(scope.row)"
  687. >{{ $t('删除') }}</el-button>
  688. </template>
  689. </el-table-column>
  690. </el-table>
  691. </el-tab-pane>
  692. <el-tab-pane label="PASS8">
  693. <el-upload ref="doc"
  694. :limit="1"
  695. :headers="doc.headers"
  696. :action="doc.url + '?pType=furnancePressurePass8&pId=' + doc.pId"
  697. :disabled="doc.isUploading"
  698. :on-progress="handleFileDocProgress"
  699. :on-success="handleFileDocSuccess"
  700. :auto-upload="true"
  701. drag
  702. >
  703. <i class="el-icon-upload"></i>
  704. <div class="el-upload__text">
  705. {{ $t('将文件拖到此处,或') }}
  706. <em>{{ $t('点击上传') }}</em>
  707. </div>
  708. </el-upload>
  709. <el-table :data="doc.commonfileList8" border>
  710. <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
  711. <template slot-scope="scope">
  712. <a class="link-type" @click="handleDownload(scope.row)">
  713. <span>{{ scope.row.fileName }}</span>
  714. </a>
  715. </template>
  716. </el-table-column>
  717. <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
  718. <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
  719. <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
  720. <template slot-scope="scope">
  721. <el-button
  722. size="mini"
  723. type="text"
  724. icon="el-icon-download"
  725. @click="handleDownload(scope.row)"
  726. >{{ $t('下载') }}</el-button>
  727. <el-button
  728. size="mini"
  729. type="text"
  730. icon="el-icon-delete"
  731. @click="handleDeleteDoc(scope.row)"
  732. >{{ $t('删除') }}</el-button>
  733. </template>
  734. </el-table-column>
  735. </el-table>
  736. </el-tab-pane>
  737. </el-tabs>
  738. <div slot="footer" class="dialog-footer">
  739. <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
  740. </div>
  741. </el-dialog>
  742. </div>
  743. </template>
  744. <script>
  745. import { listPressure, getPressure, delPressure, addPressure, updatePressure, exportPressure, importTemplate} from "@/api/production/pressure";
  746. import { treeselect } from "@/api/system/dept";
  747. import { getToken } from "@/utils/auth";
  748. import Treeselect from "@riophae/vue-treeselect";
  749. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  750. import { listUserNoPage, getUserId } from "@/api/system/user";
  751. import {addCommonfile, allFileList, delCommonfile, updateCommonfile} from "@/api/common/commonfile";
  752. export default {
  753. name: "Pressure",
  754. components: { Treeselect },
  755. data() {
  756. return {
  757. // 遮罩层
  758. loading: true,
  759. // 选中数组
  760. ids: [],
  761. // 非单个禁用
  762. single: true,
  763. // 非多个禁用
  764. multiple: true,
  765. // 显示搜索条件
  766. showSearch: true,
  767. // 总条数
  768. total: 0,
  769. // 裂解炉炉管测压表格数据
  770. pressureList: [],
  771. // 弹出层标题
  772. title: "",
  773. // 部门树选项
  774. deptOptions: undefined,
  775. clientHeight:300,
  776. // 是否显示弹出层
  777. open: false,
  778. // 用户导入参数
  779. upload: {
  780. // 是否显示弹出层(用户导入)
  781. open: false,
  782. // 弹出层标题(用户导入)
  783. title: "",
  784. // 是否禁用上传
  785. isUploading: false,
  786. // 是否更新已经存在的用户数据
  787. updateSupport: 0,
  788. // 设置上传的请求头部
  789. headers: { Authorization: "Bearer " + getToken() },
  790. // 上传的地址
  791. url: process.env.VUE_APP_BASE_API + "/production/pressure/importData"
  792. },
  793. // 查询参数
  794. queryParams: {
  795. pageNum: 1,
  796. pageSize: 20,
  797. furnanceName: null,
  798. recordTime: null,
  799. pass1: null,
  800. pass2: null,
  801. pass3: null,
  802. pass4: null,
  803. pass5: null,
  804. pass6: null,
  805. pass7: null,
  806. pass8: null,
  807. pass9: null,
  808. pass10: null,
  809. pass11: null,
  810. pass12: null,
  811. pass13: null,
  812. pass14: null,
  813. pass15: null,
  814. pass16: null,
  815. deptId: null,
  816. },
  817. recordTime: null,
  818. // 表单参数
  819. form: {},
  820. pass1:[],
  821. pass2:[],
  822. pass3:[],
  823. pass4:[],
  824. pass5:[],
  825. pass6:[],
  826. pass7:[],
  827. pass8:[],
  828. pass9:[],
  829. pass10:[],
  830. pass11:[],
  831. pass12:[],
  832. pass13:[],
  833. pass14:[],
  834. pass15:[],
  835. pass16:[],
  836. // 表单校验
  837. rules: {
  838. id: [
  839. { required: true, message: "主键id不能为空", trigger: "blur" }
  840. ],
  841. },
  842. // 状态字典
  843. statusOptions: [],
  844. // 班组字典
  845. teamOptions: [],
  846. recordTimeYmd: null,
  847. recordTimeHms: null,
  848. // 用户列表
  849. userList: [],doc: {
  850. file: "",
  851. // 是否显示弹出层(报告附件)
  852. open: false,
  853. // 弹出层标题(报告附件)
  854. title: "附件",
  855. // 是否禁用上传
  856. isUploading: false,
  857. // 是否更新已经存在的用户数据
  858. updateSupport: 0,
  859. // 报告附件上传位置编号
  860. ids: 0,
  861. // 设置上传的请求头部
  862. headers: { Authorization: "Bearer " + getToken() },
  863. // 上传的地址
  864. url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
  865. commonfileList1: null,
  866. commonfileList2: null,
  867. commonfileList3: null,
  868. commonfileList4: null,
  869. commonfileList5: null,
  870. commonfileList6: null,
  871. commonfileList7: null,
  872. commonfileList8: null,
  873. queryParams: {
  874. pId: null
  875. },
  876. pId: null,
  877. form: {},
  878. alphabets: null,
  879. },
  880. };
  881. },
  882. watch: {
  883. // 根据名称筛选部门树
  884. deptName(val) {
  885. this.$refs.tree.filter(val);
  886. }
  887. },
  888. created() {
  889. //设置表格高度对应屏幕高度
  890. this.$nextTick(() => {
  891. this.clientHeight = document.body.clientHeight -250
  892. })
  893. // this.getList();
  894. this.getTreeselect();
  895. this.getDicts("FURNANCE_STATUS").then(response => {
  896. this.statusOptions = response.data;
  897. });
  898. this.getDicts("TEAM_DIVIDE").then(response => {
  899. this.teamOptions = response.data;
  900. });
  901. this.listUser();
  902. this.alphabets = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N'];
  903. },
  904. methods: {
  905. init() {
  906. this.getList();
  907. },
  908. // 现场照片
  909. handlePhoto(row) {
  910. this.doc.id = row.id;
  911. this.doc.title = row.furnanceName + " " + row.recordTime + " 现场照片";
  912. this.doc.open = true;
  913. this.doc.queryParams.pId = row.id
  914. this.doc.pId = row.id
  915. this.doc.commonfileList1 = null;
  916. this.doc.commonfileList2 = null;
  917. this.doc.commonfileList3 = null;
  918. this.doc.commonfileList4 = null;
  919. this.doc.commonfileList5 = null;
  920. this.doc.commonfileList6 = null;
  921. this.doc.commonfileList7 = null;
  922. this.doc.commonfileList8 = null;
  923. this.getFileList1();
  924. this.getFileList2();
  925. this.getFileList3();
  926. this.getFileList4();
  927. this.getFileList5();
  928. this.getFileList6();
  929. this.getFileList7();
  930. this.getFileList8();
  931. },
  932. getFileList1() {
  933. allFileList({
  934. "pId": this.doc.queryParams.pId,
  935. "pType": "furnancePressurePass1"
  936. }).then(response => {
  937. this.doc.commonfileList1 = response;
  938. });
  939. },
  940. getFileList2() {
  941. allFileList({
  942. "pId": this.doc.queryParams.pId,
  943. "pType": "furnancePressurePass2"
  944. }).then(response => {
  945. this.doc.commonfileList2 = response;
  946. });
  947. },
  948. getFileList3() {
  949. allFileList({
  950. "pId": this.doc.queryParams.pId,
  951. "pType": "furnancePressurePass3"
  952. }).then(response => {
  953. this.doc.commonfileList3 = response;
  954. });
  955. },
  956. getFileList4() {
  957. allFileList({
  958. "pId": this.doc.queryParams.pId,
  959. "pType": "furnancePressurePass4"
  960. }).then(response => {
  961. this.doc.commonfileList4 = response;
  962. });
  963. },
  964. getFileList5() {
  965. allFileList({
  966. "pId": this.doc.queryParams.pId,
  967. "pType": "furnancePressurePass5"
  968. }).then(response => {
  969. this.doc.commonfileList5 = response;
  970. });
  971. },
  972. getFileList6() {
  973. allFileList({
  974. "pId": this.doc.queryParams.pId,
  975. "pType": "furnancePressurePass6"
  976. }).then(response => {
  977. this.doc.commonfileList6 = response;
  978. });
  979. },
  980. getFileList7() {
  981. allFileList({
  982. "pId": this.doc.queryParams.pId,
  983. "pType": "furnancePressurePass7"
  984. }).then(response => {
  985. this.doc.commonfileList7 = response;
  986. });
  987. },
  988. getFileList8() {
  989. allFileList({
  990. "pId": this.doc.queryParams.pId,
  991. "pType": "furnancePressurePass8"
  992. }).then(response => {
  993. this.doc.commonfileList8 = response;
  994. });
  995. },
  996. //附件上传中处理
  997. handleFileDocProgress(event, file, fileList) {
  998. this.doc.file = file;
  999. this.doc.isUploading = true;
  1000. },
  1001. //附件上传成功处理
  1002. handleFileDocSuccess(response, file, fileList) {
  1003. this.doc.isUploading = false;
  1004. this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
  1005. this.getFileList1()
  1006. this.getFileList2()
  1007. this.getFileList3()
  1008. this.getFileList4()
  1009. this.getFileList5()
  1010. this.getFileList6()
  1011. this.getFileList7()
  1012. this.getFileList8()
  1013. },
  1014. // 文件下载处理
  1015. handleDownload(row) {
  1016. var name = row.fileName;
  1017. var url = row.fileUrl;
  1018. var suffix = url.substring(url.lastIndexOf("."), url.length);
  1019. const a = document.createElement('a')
  1020. a.setAttribute('download', name)
  1021. a.setAttribute('target', '_blank')
  1022. a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
  1023. a.click()
  1024. },
  1025. /** 删除按钮操作 */
  1026. handleDeleteDoc(row) {
  1027. const ids = row.id || this.ids;
  1028. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  1029. confirmButtonText: this.$t('确定'),
  1030. cancelButtonText: this.$t('取消'),
  1031. type: "warning"
  1032. }).then(function () {
  1033. return delCommonfile(ids);
  1034. }).then(() => {
  1035. this.getFileList1();
  1036. this.getFileList2();
  1037. this.getFileList3();
  1038. this.getFileList4();
  1039. this.getFileList5();
  1040. this.getFileList6();
  1041. this.getFileList7();
  1042. this.getFileList8();
  1043. this.msgSuccess(this.$t('删除成功'));
  1044. })
  1045. },
  1046. listUser() {
  1047. listUserNoPage().then(response => {
  1048. this.userList = response.data;
  1049. });
  1050. },
  1051. // 班值字典翻译
  1052. teamFormat(row, column) {
  1053. return this.selectDictLabel(this.teamOptions, row.team);
  1054. },
  1055. // 字典翻译
  1056. statusFormat(row, column) {
  1057. return this.selectDictLabel(this.statusOptions, row.status);
  1058. },
  1059. handleChange() {
  1060. if (this.form.status === '1') {
  1061. this.pass1 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1062. this.pass2 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1063. this.pass3 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1064. this.pass4 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1065. this.pass5 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1066. this.pass6 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1067. this.pass7 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1068. this.pass8 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1069. this.pass9 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1070. this.pass10 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1071. this.pass11 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1072. this.pass12 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1073. this.pass13 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1074. this.pass14 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1075. this.pass15 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1076. this.pass16 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1077. } else {
  1078. this.pass1 = [];
  1079. this.pass2 = [];
  1080. this.pass3 = [];
  1081. this.pass4 = [];
  1082. this.pass5 = [];
  1083. this.pass6 = [];
  1084. this.pass7 = [];
  1085. this.pass8 = [];
  1086. this.pass9 = [];
  1087. this.pass10 = [];
  1088. this.pass11 = [];
  1089. this.pass12 = [];
  1090. this.pass13 = [];
  1091. this.pass14 = [];
  1092. this.pass15 = [];
  1093. this.pass16 = [];
  1094. }
  1095. },
  1096. /** 查询裂解炉炉管测压列表 */
  1097. getList() {
  1098. this.loading = true;
  1099. this.queryParams.furnanceName = "H116";
  1100. listPressure(this.queryParams).then(response => {
  1101. for (let i = 0; i< response.rows.length; i++) {
  1102. if (response.rows[i].pass1 == null) { response.rows[i].pass1 = []; } else { response.rows[i].pass1 = response.rows[i].pass1.split(','); }
  1103. if (response.rows[i].pass2 == null) { response.rows[i].pass2 = []; } else { response.rows[i].pass2 = response.rows[i].pass2.split(','); }
  1104. if (response.rows[i].pass3 == null) { response.rows[i].pass3 = []; } else { response.rows[i].pass3 = response.rows[i].pass3.split(','); }
  1105. if (response.rows[i].pass4 == null) { response.rows[i].pass4 = []; } else { response.rows[i].pass4 = response.rows[i].pass4.split(','); }
  1106. if (response.rows[i].pass5 == null) { response.rows[i].pass5 = []; } else { response.rows[i].pass5 = response.rows[i].pass5.split(','); }
  1107. if (response.rows[i].pass6 == null) { response.rows[i].pass6 = []; } else { response.rows[i].pass6 = response.rows[i].pass6.split(','); }
  1108. if (response.rows[i].pass7 == null) { response.rows[i].pass7 = []; } else { response.rows[i].pass7 = response.rows[i].pass7.split(','); }
  1109. if (response.rows[i].pass8 == null) { response.rows[i].pass8 = []; } else { response.rows[i].pass8 = response.rows[i].pass8.split(','); }
  1110. }
  1111. this.pressureList = response.rows;
  1112. this.total = response.total;
  1113. this.loading = false;
  1114. });
  1115. },
  1116. /** 查询部门下拉树结构 */
  1117. getTreeselect() {
  1118. treeselect().then(response => {
  1119. this.deptOptions = response.data;
  1120. });
  1121. },
  1122. // 取消按钮
  1123. cancel() {
  1124. this.open = false;
  1125. this.reset();
  1126. },
  1127. // 表单重置
  1128. reset() {
  1129. this.form = {
  1130. id: null,
  1131. furnanceName: null,
  1132. recordTime: null,
  1133. pass1: null,
  1134. pass2: null,
  1135. pass3: null,
  1136. pass4: null,
  1137. pass5: null,
  1138. pass6: null,
  1139. pass7: null,
  1140. pass8: null,
  1141. pass9: null,
  1142. pass10: null,
  1143. pass11: null,
  1144. pass12: null,
  1145. pass13: null,
  1146. pass14: null,
  1147. pass15: null,
  1148. pass16: null,
  1149. deptId: null,
  1150. delFlag: null,
  1151. createBy: null,
  1152. createTime: null,
  1153. updateBy: null,
  1154. updateTime: null,
  1155. };
  1156. this.pass1 = [];
  1157. this.pass2 = [];
  1158. this.pass3 = [];
  1159. this.pass4 = [];
  1160. this.pass5 = [];
  1161. this.pass6 = [];
  1162. this.pass7 = [];
  1163. this.pass8 = [];
  1164. this.pass9 = [];
  1165. this.pass10 = [];
  1166. this.pass11 = [];
  1167. this.pass12 = [];
  1168. this.pass13 = [];
  1169. this.pass14 = [];
  1170. this.pass15 = [];
  1171. this.pass16 = [];
  1172. this.resetForm("form");
  1173. },
  1174. /** 搜索按钮操作 */
  1175. handleQuery() {
  1176. this.queryParams.pageNum = 1;
  1177. this.getList();
  1178. },
  1179. /** 重置按钮操作 */
  1180. resetQuery() {
  1181. this.resetForm("queryForm");
  1182. this.handleQuery();
  1183. },
  1184. // 多选框选中数据
  1185. handleSelectionChange(selection) {
  1186. this.ids = selection.map(item => item.id)
  1187. this.single = selection.length!==1
  1188. this.multiple = !selection.length
  1189. },
  1190. /** 新增按钮操作 */
  1191. handleAdd() {
  1192. this.reset();
  1193. getUserId().then(response => {
  1194. this.form.recorder = response.data;
  1195. this.form.furnanceName = "H116";
  1196. this.open = true;
  1197. this.title = "添加裂解炉炉管测压";
  1198. });
  1199. },
  1200. /** 修改按钮操作 */
  1201. handleUpdate(row) {
  1202. this.reset();
  1203. const id = row.id || this.ids
  1204. getPressure(id).then(response => {
  1205. this.form = response.data;
  1206. let recordTime = new Date(this.form.recordTime);
  1207. this.recordTimeYmd = recordTime.getFullYear() + "-" + (recordTime.getMonth() + 1) + "-" + recordTime.getDate();
  1208. this.recordTimeHms = recordTime.getHours() + ":" + recordTime.getMinutes() + ":" + recordTime.getSeconds();
  1209. if (response.data.pass1 == null) { this.pass1 = []; } else { this.pass1 = response.data.pass1.split(','); }
  1210. if (response.data.pass2 == null) { this.pass2 = []; } else { this.pass2 = response.data.pass2.split(','); }
  1211. if (response.data.pass3 == null) { this.pass3 = []; } else { this.pass3 = response.data.pass3.split(','); }
  1212. if (response.data.pass4 == null) { this.pass4 = []; } else { this.pass4 = response.data.pass4.split(','); }
  1213. if (response.data.pass5 == null) { this.pass5 = []; } else { this.pass5 = response.data.pass5.split(','); }
  1214. if (response.data.pass6 == null) { this.pass6 = []; } else { this.pass6 = response.data.pass6.split(','); }
  1215. if (response.data.pass7 == null) { this.pass7 = []; } else { this.pass7 = response.data.pass7.split(','); }
  1216. if (response.data.pass8 == null) { this.pass8 = []; } else { this.pass8 = response.data.pass8.split(','); }
  1217. this.open = true;
  1218. this.title = "修改裂解炉炉管测压";
  1219. });
  1220. },
  1221. /** 提交按钮 */
  1222. submitForm() {
  1223. this.form.pass1 = this.pass1.join(",");
  1224. this.form.pass2 = this.pass2.join(",");
  1225. this.form.pass3 = this.pass3.join(",");
  1226. this.form.pass4 = this.pass4.join(",");
  1227. this.form.pass5 = this.pass5.join(",");
  1228. this.form.pass6 = this.pass6.join(",");
  1229. this.form.pass7 = this.pass7.join(",");
  1230. this.form.pass8 = this.pass8.join(",");
  1231. this.form.pass9 = this.pass9.join(",");
  1232. this.form.pass10 = this.pass10.join(",");
  1233. this.form.pass11 = this.pass11.join(",");
  1234. this.form.pass12 = this.pass12.join(",");
  1235. this.form.pass13 = this.pass13.join(",");
  1236. this.form.pass14 = this.pass14.join(",");
  1237. this.form.pass15 = this.pass15.join(",");
  1238. this.form.pass16 = this.pass16.join(",");
  1239. this.form.recordTime = this.recordTimeYmd + " " + this.recordTimeHms;
  1240. this.$refs["form"].validate(valid => {
  1241. if (valid) {
  1242. if (this.form.id != null) {
  1243. updatePressure(this.form).then(response => {
  1244. this.msgSuccess("修改成功");
  1245. this.open = false;
  1246. this.getList();
  1247. });
  1248. } else {
  1249. addPressure(this.form).then(response => {
  1250. this.msgSuccess("新增成功");
  1251. this.open = false;
  1252. this.getList();
  1253. });
  1254. }
  1255. }
  1256. });
  1257. },
  1258. /** 删除按钮操作 */
  1259. handleDelete(row) {
  1260. const ids = row.id || this.ids;
  1261. this.$confirm('是否确认删除?', "警告", {
  1262. confirmButtonText: "确定",
  1263. cancelButtonText: "取消",
  1264. type: "warning"
  1265. }).then(function() {
  1266. return delPressure(ids);
  1267. }).then(() => {
  1268. this.getList();
  1269. this.msgSuccess("删除成功");
  1270. })
  1271. },
  1272. /** 导出按钮操作 */
  1273. handleExport() {
  1274. const queryParams = this.queryParams;
  1275. this.$confirm('是否确认导出所有裂解炉炉管测压数据项?', "警告", {
  1276. confirmButtonText: "确定",
  1277. cancelButtonText: "取消",
  1278. type: "warning"
  1279. }).then(function() {
  1280. return exportPressure(queryParams);
  1281. }).then(response => {
  1282. this.download(response.msg);
  1283. })
  1284. },
  1285. /** 导入按钮操作 */
  1286. handleImport() {
  1287. this.upload.title = "用户导入";
  1288. this.upload.open = true;
  1289. },
  1290. /** 下载模板操作 */
  1291. importTemplate() {
  1292. importTemplate().then(response => {
  1293. this.download(response.msg);
  1294. });
  1295. },
  1296. // 文件上传中处理
  1297. handleFileUploadProgress(event, file, fileList) {
  1298. this.upload.isUploading = true;
  1299. },
  1300. // 文件上传成功处理
  1301. handleFileSuccess(response, file, fileList) {
  1302. this.upload.open = false;
  1303. this.upload.isUploading = false;
  1304. this.$refs.upload.clearFiles();
  1305. this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
  1306. this.getList();
  1307. },
  1308. // 提交上传文件
  1309. submitFileForm() {
  1310. this.$refs.upload.submit();
  1311. }
  1312. }
  1313. };
  1314. </script>