h111.vue 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302
  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="PG1213B" 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="'PG1214B'+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="PG1223B" 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="'PG1224B'+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="PG1233B" 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="'PG1234B'+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="PG1243B" 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="'PG1244B'+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="PG1253B" 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="'PG1254B'+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="PG1263B" 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="'PG1264B'+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="PG1273B" 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="'PG1274B'+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="PG1283B" 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="'PG1284B'+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 :close-on-click-modal="false" :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="PG1213B">
  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="'PG1214B'+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="PG1223B">
  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="'PG1224B'+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="PG1233B">
  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="'PG1234B'+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="PG1243B">
  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="'PG1244B'+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="PG1253B">
  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="'PG1254B'+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="PG1263B">
  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="'PG1264B'+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="PG1273B">
  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="'PG1274B'+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="PG1283B">
  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="'PG1284B'+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. let date = new Date();
  907. this.queryParams.recordTime = date.getFullYear() + "-" + Number(date.getMonth() + 1);
  908. this.getList();
  909. },
  910. // 现场照片
  911. handlePhoto(row) {
  912. this.doc.id = row.id;
  913. this.doc.title = row.furnanceName + " " + row.recordTime + " 现场照片";
  914. this.doc.open = true;
  915. this.doc.queryParams.pId = row.id
  916. this.doc.pId = row.id
  917. this.doc.commonfileList1 = null;
  918. this.doc.commonfileList2 = null;
  919. this.doc.commonfileList3 = null;
  920. this.doc.commonfileList4 = null;
  921. this.doc.commonfileList5 = null;
  922. this.doc.commonfileList6 = null;
  923. this.doc.commonfileList7 = null;
  924. this.doc.commonfileList8 = null;
  925. this.getFileList1();
  926. this.getFileList2();
  927. this.getFileList3();
  928. this.getFileList4();
  929. this.getFileList5();
  930. this.getFileList6();
  931. this.getFileList7();
  932. this.getFileList8();
  933. },
  934. getFileList1() {
  935. allFileList({
  936. "pId": this.doc.queryParams.pId,
  937. "pType": "furnancePressurePass1"
  938. }).then(response => {
  939. this.doc.commonfileList1 = response;
  940. });
  941. },
  942. getFileList2() {
  943. allFileList({
  944. "pId": this.doc.queryParams.pId,
  945. "pType": "furnancePressurePass2"
  946. }).then(response => {
  947. this.doc.commonfileList2 = response;
  948. });
  949. },
  950. getFileList3() {
  951. allFileList({
  952. "pId": this.doc.queryParams.pId,
  953. "pType": "furnancePressurePass3"
  954. }).then(response => {
  955. this.doc.commonfileList3 = response;
  956. });
  957. },
  958. getFileList4() {
  959. allFileList({
  960. "pId": this.doc.queryParams.pId,
  961. "pType": "furnancePressurePass4"
  962. }).then(response => {
  963. this.doc.commonfileList4 = response;
  964. });
  965. },
  966. getFileList5() {
  967. allFileList({
  968. "pId": this.doc.queryParams.pId,
  969. "pType": "furnancePressurePass5"
  970. }).then(response => {
  971. this.doc.commonfileList5 = response;
  972. });
  973. },
  974. getFileList6() {
  975. allFileList({
  976. "pId": this.doc.queryParams.pId,
  977. "pType": "furnancePressurePass6"
  978. }).then(response => {
  979. this.doc.commonfileList6 = response;
  980. });
  981. },
  982. getFileList7() {
  983. allFileList({
  984. "pId": this.doc.queryParams.pId,
  985. "pType": "furnancePressurePass7"
  986. }).then(response => {
  987. this.doc.commonfileList7 = response;
  988. });
  989. },
  990. getFileList8() {
  991. allFileList({
  992. "pId": this.doc.queryParams.pId,
  993. "pType": "furnancePressurePass8"
  994. }).then(response => {
  995. this.doc.commonfileList8 = response;
  996. });
  997. },
  998. //附件上传中处理
  999. handleFileDocProgress(event, file, fileList) {
  1000. this.doc.file = file;
  1001. this.doc.isUploading = true;
  1002. },
  1003. //附件上传成功处理
  1004. handleFileDocSuccess(response, file, fileList) {
  1005. this.doc.isUploading = false;
  1006. this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
  1007. this.getFileList1()
  1008. this.getFileList2()
  1009. this.getFileList3()
  1010. this.getFileList4()
  1011. this.getFileList5()
  1012. this.getFileList6()
  1013. this.getFileList7()
  1014. this.getFileList8()
  1015. },
  1016. // 文件下载处理
  1017. handleDownload(row) {
  1018. var name = row.fileName;
  1019. var url = row.fileUrl;
  1020. var suffix = url.substring(url.lastIndexOf("."), url.length);
  1021. const a = document.createElement('a')
  1022. a.setAttribute('download', name)
  1023. a.setAttribute('target', '_blank')
  1024. a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
  1025. a.click()
  1026. },
  1027. /** 删除按钮操作 */
  1028. handleDeleteDoc(row) {
  1029. const ids = row.id || this.ids;
  1030. this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
  1031. confirmButtonText: this.$t('确定'),
  1032. cancelButtonText: this.$t('取消'),
  1033. type: "warning"
  1034. }).then(function () {
  1035. return delCommonfile(ids);
  1036. }).then(() => {
  1037. this.getFileList1();
  1038. this.getFileList2();
  1039. this.getFileList3();
  1040. this.getFileList4();
  1041. this.getFileList5();
  1042. this.getFileList6();
  1043. this.getFileList7();
  1044. this.getFileList8();
  1045. this.msgSuccess(this.$t('删除成功'));
  1046. })
  1047. },
  1048. listUser() {
  1049. listUserNoPage().then(response => {
  1050. this.userList = response.data;
  1051. });
  1052. },
  1053. // 班值字典翻译
  1054. teamFormat(row, column) {
  1055. return this.selectDictLabel(this.teamOptions, row.team);
  1056. },
  1057. // 字典翻译
  1058. statusFormat(row, column) {
  1059. return this.selectDictLabel(this.statusOptions, row.status);
  1060. },
  1061. handleChange() {
  1062. if (this.form.status === '1') {
  1063. this.pass1 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1064. this.pass2 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1065. this.pass3 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1066. this.pass4 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1067. this.pass5 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1068. this.pass6 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1069. this.pass7 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1070. this.pass8 = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
  1071. }
  1072. },
  1073. /** 查询裂解炉炉管测压列表 */
  1074. getList() {
  1075. this.loading = true;
  1076. this.queryParams.furnanceName = "H111";
  1077. listPressure(this.queryParams).then(response => {
  1078. for (let i = 0; i< response.rows.length; i++) {
  1079. if (response.rows[i].pass1 == null) { response.rows[i].pass1 = []; } else { response.rows[i].pass1 = response.rows[i].pass1.split(','); }
  1080. if (response.rows[i].pass2 == null) { response.rows[i].pass2 = []; } else { response.rows[i].pass2 = response.rows[i].pass2.split(','); }
  1081. if (response.rows[i].pass3 == null) { response.rows[i].pass3 = []; } else { response.rows[i].pass3 = response.rows[i].pass3.split(','); }
  1082. if (response.rows[i].pass4 == null) { response.rows[i].pass4 = []; } else { response.rows[i].pass4 = response.rows[i].pass4.split(','); }
  1083. if (response.rows[i].pass5 == null) { response.rows[i].pass5 = []; } else { response.rows[i].pass5 = response.rows[i].pass5.split(','); }
  1084. if (response.rows[i].pass6 == null) { response.rows[i].pass6 = []; } else { response.rows[i].pass6 = response.rows[i].pass6.split(','); }
  1085. if (response.rows[i].pass7 == null) { response.rows[i].pass7 = []; } else { response.rows[i].pass7 = response.rows[i].pass7.split(','); }
  1086. if (response.rows[i].pass8 == null) { response.rows[i].pass8 = []; } else { response.rows[i].pass8 = response.rows[i].pass8.split(','); }
  1087. }
  1088. this.pressureList = response.rows;
  1089. this.total = response.total;
  1090. this.loading = false;
  1091. });
  1092. },
  1093. /** 查询部门下拉树结构 */
  1094. getTreeselect() {
  1095. treeselect().then(response => {
  1096. this.deptOptions = response.data;
  1097. });
  1098. },
  1099. // 取消按钮
  1100. cancel() {
  1101. this.open = false;
  1102. this.reset();
  1103. },
  1104. // 表单重置
  1105. reset() {
  1106. this.form = {
  1107. id: null,
  1108. furnanceName: null,
  1109. recordTime: null,
  1110. pass1: null,
  1111. pass2: null,
  1112. pass3: null,
  1113. pass4: null,
  1114. pass5: null,
  1115. pass6: null,
  1116. pass7: null,
  1117. pass8: null,
  1118. pass9: null,
  1119. pass10: null,
  1120. pass11: null,
  1121. pass12: null,
  1122. pass13: null,
  1123. pass14: null,
  1124. pass15: null,
  1125. pass16: null,
  1126. deptId: null,
  1127. delFlag: null,
  1128. createBy: null,
  1129. createTime: null,
  1130. updateBy: null,
  1131. updateTime: null,
  1132. };
  1133. this.pass1 = [];
  1134. this.pass2 = [];
  1135. this.pass3 = [];
  1136. this.pass4 = [];
  1137. this.pass5 = [];
  1138. this.pass6 = [];
  1139. this.pass7 = [];
  1140. this.pass8 = [];
  1141. this.pass9 = [];
  1142. this.pass10 = [];
  1143. this.pass11 = [];
  1144. this.pass12 = [];
  1145. this.pass13 = [];
  1146. this.pass14 = [];
  1147. this.pass15 = [];
  1148. this.pass16 = [];
  1149. this.resetForm("form");
  1150. },
  1151. /** 搜索按钮操作 */
  1152. handleQuery() {
  1153. this.queryParams.pageNum = 1;
  1154. this.getList();
  1155. },
  1156. /** 重置按钮操作 */
  1157. resetQuery() {
  1158. this.resetForm("queryForm");
  1159. this.handleQuery();
  1160. },
  1161. // 多选框选中数据
  1162. handleSelectionChange(selection) {
  1163. this.ids = selection.map(item => item.id)
  1164. this.single = selection.length!==1
  1165. this.multiple = !selection.length
  1166. },
  1167. /** 新增按钮操作 */
  1168. handleAdd() {
  1169. this.reset();
  1170. getUserId().then(response => {
  1171. this.form.recorder = response.data;
  1172. this.form.furnanceName = "H111";
  1173. this.open = true;
  1174. this.title = "添加裂解炉炉管测压";
  1175. });
  1176. },
  1177. /** 修改按钮操作 */
  1178. handleUpdate(row) {
  1179. this.reset();
  1180. const id = row.id || this.ids
  1181. getPressure(id).then(response => {
  1182. this.form = response.data;
  1183. let recordTime = new Date(this.form.recordTime);
  1184. this.recordTimeYmd = recordTime.getFullYear() + "-" + (recordTime.getMonth() + 1) + "-" + recordTime.getDate();
  1185. this.recordTimeHms = recordTime.getHours() + ":" + recordTime.getMinutes() + ":" + recordTime.getSeconds();
  1186. if (response.data.pass1 == null) { this.pass1 = []; } else { this.pass1 = response.data.pass1.split(','); }
  1187. if (response.data.pass2 == null) { this.pass2 = []; } else { this.pass2 = response.data.pass2.split(','); }
  1188. if (response.data.pass3 == null) { this.pass3 = []; } else { this.pass3 = response.data.pass3.split(','); }
  1189. if (response.data.pass4 == null) { this.pass4 = []; } else { this.pass4 = response.data.pass4.split(','); }
  1190. if (response.data.pass5 == null) { this.pass5 = []; } else { this.pass5 = response.data.pass5.split(','); }
  1191. if (response.data.pass6 == null) { this.pass6 = []; } else { this.pass6 = response.data.pass6.split(','); }
  1192. if (response.data.pass7 == null) { this.pass7 = []; } else { this.pass7 = response.data.pass7.split(','); }
  1193. if (response.data.pass8 == null) { this.pass8 = []; } else { this.pass8 = response.data.pass8.split(','); }
  1194. this.open = true;
  1195. this.title = "修改裂解炉炉管测压";
  1196. });
  1197. },
  1198. /** 提交按钮 */
  1199. submitForm() {
  1200. this.form.pass1 = this.pass1.join(",");
  1201. this.form.pass2 = this.pass2.join(",");
  1202. this.form.pass3 = this.pass3.join(",");
  1203. this.form.pass4 = this.pass4.join(",");
  1204. this.form.pass5 = this.pass5.join(",");
  1205. this.form.pass6 = this.pass6.join(",");
  1206. this.form.pass7 = this.pass7.join(",");
  1207. this.form.pass8 = this.pass8.join(",");
  1208. this.form.pass9 = this.pass9.join(",");
  1209. this.form.pass10 = this.pass10.join(",");
  1210. this.form.pass11 = this.pass11.join(",");
  1211. this.form.pass12 = this.pass12.join(",");
  1212. this.form.pass13 = this.pass13.join(",");
  1213. this.form.pass14 = this.pass14.join(",");
  1214. this.form.pass15 = this.pass15.join(",");
  1215. this.form.pass16 = this.pass16.join(",");
  1216. this.form.recordTime = this.recordTimeYmd + " " + this.recordTimeHms;
  1217. this.$refs["form"].validate(valid => {
  1218. if (valid) {
  1219. if (this.form.id != null) {
  1220. updatePressure(this.form).then(response => {
  1221. if (response.code == 200) {
  1222. this.msgSuccess("修改成功");
  1223. this.open = false;
  1224. this.getList();
  1225. } else {
  1226. this.msgInfo(response.msg);
  1227. }
  1228. });
  1229. } else {
  1230. addPressure(this.form).then(response => {
  1231. this.msgSuccess("新增成功");
  1232. this.open = false;
  1233. this.getList();
  1234. });
  1235. }
  1236. }
  1237. });
  1238. },
  1239. /** 删除按钮操作 */
  1240. handleDelete(row) {
  1241. const ids = row.id || this.ids;
  1242. this.$confirm('是否确认删除?', "警告", {
  1243. confirmButtonText: "确定",
  1244. cancelButtonText: "取消",
  1245. type: "warning"
  1246. }).then(function() {
  1247. return delPressure(ids);
  1248. }).then(() => {
  1249. this.getList();
  1250. this.msgSuccess("删除成功");
  1251. })
  1252. },
  1253. /** 导出按钮操作 */
  1254. handleExport() {
  1255. const queryParams = this.queryParams;
  1256. this.$confirm('是否确认导出所有裂解炉炉管测压数据项?', "警告", {
  1257. confirmButtonText: "确定",
  1258. cancelButtonText: "取消",
  1259. type: "warning"
  1260. }).then(function() {
  1261. return exportPressure(queryParams);
  1262. }).then(response => {
  1263. this.download(response.msg);
  1264. })
  1265. },
  1266. /** 导入按钮操作 */
  1267. handleImport() {
  1268. this.upload.title = "用户导入";
  1269. this.upload.open = true;
  1270. },
  1271. /** 下载模板操作 */
  1272. importTemplate() {
  1273. importTemplate().then(response => {
  1274. this.download(response.msg);
  1275. });
  1276. },
  1277. // 文件上传中处理
  1278. handleFileUploadProgress(event, file, fileList) {
  1279. this.upload.isUploading = true;
  1280. },
  1281. // 文件上传成功处理
  1282. handleFileSuccess(response, file, fileList) {
  1283. this.upload.open = false;
  1284. this.upload.isUploading = false;
  1285. this.$refs.upload.clearFiles();
  1286. this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
  1287. this.getList();
  1288. },
  1289. // 提交上传文件
  1290. submitFileForm() {
  1291. this.$refs.upload.submit();
  1292. }
  1293. }
  1294. };
  1295. </script>