index.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878
  1. <!--
  2. *@description: 危险工程
  3. *@author: yh Fu
  4. *@date: 2024-01-03 14:17:43
  5. *@version: V1.0.5
  6. -->
  7. <template>
  8. <div class="app-container">
  9. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
  10. <el-form-item label="作业基本信息" prop="basicInformation">
  11. <el-input
  12. v-model="queryParams.basicInformation"
  13. placeholder="请输入作业基本信息"
  14. clearable
  15. @keyup.enter.native="handleQuery"
  16. />
  17. </el-form-item>
  18. <el-form-item label="工程名称" prop="enginName">
  19. <el-input
  20. v-model="queryParams.enginName"
  21. placeholder="请输入工程名称"
  22. clearable
  23. @keyup.enter.native="handleQuery"
  24. />
  25. </el-form-item>
  26. <el-form-item label="工程地点" prop="enginAddre">
  27. <el-input
  28. v-model="queryParams.enginAddre"
  29. placeholder="请输入工程地点"
  30. clearable
  31. @keyup.enter.native="handleQuery"
  32. />
  33. </el-form-item>
  34. <el-form-item>
  35. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  36. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  37. </el-form-item>
  38. </el-form>
  39. <el-row :gutter="10" class="mb8">
  40. <el-col :span="1.5">
  41. <el-button
  42. type="primary"
  43. plain
  44. icon="el-icon-plus"
  45. size="mini"
  46. @click="handleAdd"
  47. v-hasPermi="['zdsz:engineeringDangerous:add']"
  48. >新增
  49. </el-button>
  50. </el-col>
  51. <el-col :span="1.5">
  52. <el-button
  53. type="success"
  54. plain
  55. icon="el-icon-edit"
  56. size="mini"
  57. :disabled="single"
  58. @click="handleUpdate"
  59. v-hasPermi="['zdsz:engineeringDangerous:edit']"
  60. >修改
  61. </el-button>
  62. </el-col>
  63. <el-col :span="1.5">
  64. <el-button
  65. type="danger"
  66. plain
  67. icon="el-icon-delete"
  68. size="mini"
  69. :disabled="multiple"
  70. @click="handleDelete"
  71. v-hasPermi="['zdsz:engineeringDangerous:remove']"
  72. >删除
  73. </el-button>
  74. </el-col>
  75. <!-- <el-col :span="1.5">
  76. <el-button
  77. type="warning"
  78. plain
  79. icon="el-icon-download"
  80. size="mini"
  81. @click="handleExport"
  82. v-hasPermi="['zdsz:engineeringDangerous:export']"
  83. >导出
  84. </el-button>
  85. </el-col>-->
  86. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  87. </el-row>
  88. <el-table v-loading="loading" :data="engineeringDangerousList" @selection-change="handleSelectionChange">
  89. <el-table-column type="selection" width="55" align="center"/>
  90. <!-- <el-table-column label="" align="center" prop="id" v-if="true"/>-->
  91. <el-table-column label="作业基本信息" align="center" prop="basicInformation"/>
  92. <el-table-column label="工程名称" align="center" prop="enginName"/>
  93. <el-table-column label="工程地点" align="center" prop="enginAddre"/>
  94. <el-table-column label="工程时间" align="center" prop="enginTime" width="180">
  95. <template slot-scope="scope">
  96. <span>{{ parseTime(scope.row.enginTime, '{y}-{m}-{d}') }}</span>
  97. </template>
  98. </el-table-column>
  99. <!-- <el-table-column label="管径" align="center" prop="pipeDiameter"/>
  100. <el-table-column label="管材" align="center" prop="tubularProduct"/>
  101. <el-table-column label="是否存在套管" align="center" prop="casingPresent"/>
  102. <el-table-column label="管道压力" align="center" prop="pipePressure"/>
  103. <el-table-column label="气源方向" align="center" prop="gasSourceDirection"/>
  104. <el-table-column label="作业位置" align="center" prop="taskPosition"/>
  105. <el-table-column label="与作业相关阀门位置" align="center" prop="valvePosition"/>
  106. <el-table-column label="压力报告" align="center" prop="stressReport"/>
  107. <el-table-column label="监理旁站记录" align="center" prop="supervision record"/>
  108. <el-table-column label="工作联系单" align="center" prop="workContactForm"/>
  109. <el-table-column label="巡线确认单" align="center" prop="linePatrolConfirmationForm"/>
  110. <el-table-column label="危险作业坑大小(长)" align="center" prop="hazardousWorkPitsLong"/>
  111. <el-table-column label="危险作业坑大小(宽)" align="center" prop="hazardousWorkPitsWide"/>
  112. <el-table-column label="危险作业坑大小(深)" align="center" prop="hazardousWorkPitsDeep"/>
  113. <el-table-column label="是否需要支护" align="center" prop="needSupport"/>
  114. <el-table-column label="作业坑内其他管道情况" align="center" prop="otherPipelineConditionsWorkPit"/>
  115. <el-table-column label="现场负责人" align="center" prop="siteHead"/>
  116. <el-table-column label="现场负责人电话" align="center" prop="siteHeadPhone"/>
  117. <el-table-column label="作业人员信息" align="center" prop="operatorInformation"/>
  118. <el-table-column label="检口" align="center" prop="inspectionPort"/>
  119. <el-table-column label="管道刷油" align="center" prop="pipelinePainting"/>
  120. <el-table-column label="管道支护" align="center" prop="pipelineSupport"/>
  121. <el-table-column label="管道防腐" align="center" prop="pipelineCorrosionProtection"/>
  122. <el-table-column label="砌筑阀门井" align="center" prop="masonryValveWell"/>
  123. <el-table-column label="保护井" align="center" prop="protectionWell"/>
  124. <el-table-column label="管件保护井砌筑" align="center" prop="pipeProtectionWelMasonry"/>
  125. <el-table-column label="回填" align="center" prop="backfill"/>
  126. <el-table-column label="夯实" align="center" prop="tamp"/>
  127. <el-table-column label="平整场地" align="center" prop="levelingTheSite"/>
  128. <el-table-column label="备注" align="center" prop="remark"/>-->
  129. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  130. <template slot-scope="scope">
  131. <el-button
  132. size="mini"
  133. type="text"
  134. icon="el-icon-edit"
  135. @click="handleUpdate(scope.row)"
  136. v-hasPermi="['zdsz:engineeringDangerous:edit']"
  137. >修改
  138. </el-button>
  139. <el-button
  140. size="mini"
  141. type="text"
  142. icon="el-icon-delete"
  143. @click="handleDelete(scope.row)"
  144. v-hasPermi="['zdsz:engineeringDangerous:remove']"
  145. >删除
  146. </el-button>
  147. <!-- <el-button-->
  148. <!-- size="mini"-->
  149. <!-- type="text"-->
  150. <!-- icon="el-icon-edit"-->
  151. <!-- @click="addNewPipe(scope.row)"-->
  152. <!-- >新增顶管工程-->
  153. <!-- </el-button>-->
  154. <!-- <el-button
  155. type="text"
  156. icon="el-icon-edit"
  157. size="mini"
  158. @click="viewSource(scope.row)"
  159. >历史
  160. </el-button>-->
  161. </template>
  162. </el-table-column>
  163. </el-table>
  164. <pagination
  165. v-show="total>0"
  166. :total="total"
  167. :page.sync="queryParams.pageNum"
  168. :limit.sync="queryParams.pageSize"
  169. @pagination="getList"
  170. />
  171. <!-- 添加或修改危险作业工程对话框 -->
  172. <el-dialog :title="title" :visible.sync="open" append-to-body customClass="appendElDialog">
  173. <el-form ref="form" :model="form" :rules="rules" label-width="110px">
  174. <el-row>
  175. <el-col :span="8">
  176. <el-form-item label="作业基本信息" prop="basicInformation">
  177. <el-input v-model="form.basicInformation" placeholder="请填写作业基本信息" maxlength="200"></el-input>
  178. </el-form-item>
  179. </el-col>
  180. <el-col :span="8">
  181. <el-form-item label="工程名称" prop="enginName">
  182. <el-input v-model="form.enginName" placeholder="请填写作业基本信息" maxlength="200"></el-input>
  183. </el-form-item>
  184. </el-col>
  185. <el-col :span="8">
  186. <el-form-item label="工程地点" prop="enginAddre">
  187. <el-input v-model="form.enginAddre" placeholder="请填写工程地点" maxlength="200"></el-input>
  188. </el-form-item>
  189. </el-col>
  190. </el-row>
  191. <el-row>
  192. <el-col :span="8">
  193. <el-col :span="6">
  194. <el-form-item label="工程时间" prop="enginTime">
  195. <el-date-picker
  196. v-model="form.enginTime"
  197. value-format="yyyy-MM-dd hh:mm:ss"
  198. type="datetime"
  199. placeholder="请选择工程时间">
  200. </el-date-picker>
  201. </el-form-item>
  202. </el-col>
  203. </el-col>
  204. <el-col :span="8">
  205. <el-form-item label="现场负责人" prop="siteHead">
  206. <el-input v-model="form.siteHead" placeholder="请填写现场负责人" maxlength="16"/>
  207. </el-form-item>
  208. </el-col>
  209. <el-col :span="8">
  210. <el-form-item label="现场负责人电话" prop="siteHeadPhone">
  211. <el-input v-model="form.siteHeadPhone" placeholder="请填写现场负责人电话" maxlength="11"/>
  212. </el-form-item>
  213. </el-col>
  214. </el-row>
  215. <el-row>
  216. <el-col :span="8">
  217. <el-form-item label="作业人员信息" prop="operatorInformation">
  218. <el-input v-model="form.operatorInformation" placeholder="请填写作业人员信息" maxlength="200"/>
  219. </el-form-item>
  220. </el-col>
  221. <el-col :span="8">
  222. <el-form-item label="监理旁站记录" prop="supervisionRecord">
  223. <el-input v-model="form.supervisionRecord" placeholder="请填写监理旁站记录" maxlength="200"/>
  224. </el-form-item>
  225. </el-col>
  226. <el-col :span="8">
  227. <el-form-item label="工作联系单" prop="workContactForm">
  228. <el-input v-model="form.workContactForm" placeholder="请填写工作联系单" maxlength="200"/>
  229. </el-form-item>
  230. </el-col>
  231. </el-row>
  232. <el-row>
  233. <el-col :span="8">
  234. <el-form-item label="巡线确认单" prop="linePatrolConfirmationForm">
  235. <el-input v-model="form.linePatrolConfirmationForm" placeholder="请填写巡线确认单" maxlength="200"/>
  236. </el-form-item>
  237. </el-col>
  238. <el-col :span="8">
  239. <el-form-item label="作业位置" prop="taskPosition">
  240. <el-input v-model="form.taskPosition" placeholder="请填写作业位置" maxlength="200"/>
  241. </el-form-item>
  242. </el-col>
  243. <el-col :span="8">
  244. <el-form-item label="相关阀门位置" prop="valvePosition">
  245. <el-input v-model="form.valvePosition" placeholder="请填写与作业相关阀门位置" maxlength="200"/>
  246. </el-form-item>
  247. </el-col>
  248. </el-row>
  249. <el-row>
  250. <el-col :span="8">
  251. <el-form-item label="是否存在套管" prop="casingPresent">
  252. <el-select v-model="form.casingPresent" placeholder="请选择是否存在套管">
  253. <el-option
  254. v-for="e in segmentedCompressionQualifiedOption"
  255. :key="e.value"
  256. :label="e.label"
  257. :value="e.value"
  258. ></el-option>
  259. </el-select>
  260. </el-form-item>
  261. </el-col>
  262. <el-col :span="8">
  263. <el-form-item label="管径" prop="pipeDiameter">
  264. <el-input v-model="form.pipeDiameter" placeholder="请填写管径" maxlength="200"></el-input>
  265. </el-form-item>
  266. </el-col>
  267. <el-col :span="8">
  268. <el-form-item label="管材" prop="tubularProduct">
  269. <el-input v-model="form.tubularProduct" placeholder="请填写管材" maxlength="200"></el-input>
  270. </el-form-item>
  271. </el-col>
  272. </el-row>
  273. <el-row>
  274. <el-col :span="8">
  275. <el-form-item label="管道压力" prop="pipePressure">
  276. <el-input v-model="form.pipePressure" placeholder="请填写管道压力" maxlength="200"></el-input>
  277. </el-form-item>
  278. </el-col>
  279. <el-col :span="8">
  280. <el-form-item label="压力报告" prop="stressReport">
  281. <el-input v-model="form.stressReport" placeholder="请填写压力报告" maxlength="200"/>
  282. </el-form-item>
  283. </el-col>
  284. <el-col :span="8">
  285. <el-form-item label="气流方向" prop="gasSourceDirection">
  286. <el-input v-model="form.gasSourceDirection" placeholder="请填写气流方向" maxlength="200"/>
  287. </el-form-item>
  288. </el-col>
  289. </el-row>
  290. <el-row>
  291. <el-col :span="8">
  292. <el-form-item label="是否需要支护" prop="casingPresent">
  293. <el-select v-model="form.needSupport" placeholder="请选择是否需要支护">
  294. <el-option
  295. v-for="e in segmentedCompressionQualifiedOption"
  296. :key="e.value"
  297. :label="e.label"
  298. :value="e.value"
  299. ></el-option>
  300. </el-select>
  301. </el-form-item>
  302. </el-col>
  303. <el-col :span="8">
  304. <el-form-item label="管道支护" prop="pipelineSupport">
  305. <el-input v-model="form.pipelineSupport" placeholder="请填写管道支护" maxlength="200"/>
  306. </el-form-item>
  307. </el-col>
  308. <el-col :span="8">
  309. <el-form-item label="检口" prop="inspectionPort">
  310. <el-input v-model="form.inspectionPort" placeholder="请填写检口" maxlength="200"/>
  311. </el-form-item>
  312. </el-col>
  313. </el-row>
  314. <el-row>
  315. <el-col :span="8">
  316. <el-form-item label="管道刷油" prop="pipelinePainting">
  317. <el-input v-model="form.pipelinePainting" placeholder="请填写管道刷油" maxlength="200"/>
  318. </el-form-item>
  319. </el-col>
  320. <el-col :span="8">
  321. <el-form-item label="管道防腐" prop="pipelineCorrosionProtection">
  322. <el-input v-model="form.pipelineCorrosionProtection" placeholder="请填写管道防腐" maxlength="200"/>
  323. </el-form-item>
  324. </el-col>
  325. <el-col :span="8">
  326. <el-form-item label="其他管道情况" prop="otherPipelineConditionsWorkPit">
  327. <el-input v-model="form.otherPipelineConditionsWorkPit" placeholder="请填写其他管道情况" maxlength="200"/>
  328. </el-form-item>
  329. </el-col>
  330. </el-row>
  331. <el-row>
  332. <el-col :span="8">
  333. <el-form-item label="保护井" prop="protectionWell">
  334. <el-input v-model="form.protectionWell" placeholder="请填写保护井" maxlength="200"/>
  335. </el-form-item>
  336. </el-col>
  337. <el-col :span="8">
  338. <el-form-item label="管件保护井砌筑" prop="pipeProtectionWelMasonry">
  339. <el-input v-model="form.pipeProtectionWelMasonry" placeholder="请填写管件保护井砌筑" maxlength="200"/>
  340. </el-form-item>
  341. </el-col>
  342. <el-col :span="8">
  343. <el-form-item label="砌筑阀门井" prop="masonryValveWell">
  344. <el-input v-model="form.masonryValveWell" placeholder="请填写砌筑阀门井" maxlength="200"/>
  345. </el-form-item>
  346. </el-col>
  347. </el-row>
  348. <el-row>
  349. <el-col :span="8">
  350. <el-form-item label="作业坑(长)(米)" prop="hazardousWorkPitsLong">
  351. <el-input v-model="form.hazardousWorkPitsLong" placeholder="请填写危险作业坑大小(长)" maxlength="11"/>
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="8">
  355. <el-form-item label="作业坑(宽)(米)" prop="hazardousWorkPitsWide">
  356. <el-input v-model="form.hazardousWorkPitsWide" placeholder="请填写危险作业坑大小(宽)" maxlength="11"/>
  357. </el-form-item>
  358. </el-col>
  359. <el-col :span="8">
  360. <el-form-item label="作业坑(深)(米)" prop="hazardousWorkPitsDeep">
  361. <el-input v-model="form.hazardousWorkPitsDeep" placeholder="请填写危险作业坑大小(深)" maxlength="11"/>
  362. </el-form-item>
  363. </el-col>
  364. </el-row>
  365. <el-row>
  366. <el-col :span="8">
  367. <el-form-item label="回填" prop="backfill">
  368. <el-input v-model="form.backfill" placeholder="请填写回填" maxlength="200"/>
  369. </el-form-item>
  370. </el-col>
  371. <el-col :span="8">
  372. <el-form-item label="夯实" prop="tamp">
  373. <el-input v-model="form.tamp" placeholder="请填写夯实" maxlength="200"/>
  374. </el-form-item>
  375. </el-col>
  376. <el-col :span="8">
  377. <el-form-item label="平整场地" prop="levelingTheSite">
  378. <el-input v-model="form.levelingTheSite" placeholder="请填写平整场地" maxlength="200"/>
  379. </el-form-item>
  380. </el-col>
  381. </el-row>
  382. <el-row>
  383. <el-col :span="24">
  384. <el-form-item label="备注" prop="remark" style="width: 42.7%;">
  385. <el-input
  386. v-model="form.remark"
  387. type="textarea"
  388. placeholder="请输入内容"
  389. class="remark_input"
  390. maxlength="200"
  391. />
  392. </el-form-item>
  393. </el-col>
  394. </el-row>
  395. <el-row :gutter="20">
  396. <el-col :span="24">
  397. <el-form-item label="附件" prop="">
  398. <ObsFileUpload ref="obsFileUpload" :file-size="100"
  399. :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"
  400. :value="form.pics"
  401. ></ObsFileUpload>
  402. </el-form-item>
  403. </el-col>
  404. </el-row>
  405. </el-form>
  406. <div slot="footer" class="dialog-footer" style="margin-top: 20%;">
  407. <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
  408. <el-button @click="cancel">取 消</el-button>
  409. </div>
  410. </el-dialog>
  411. </div>
  412. </template>
  413. <script>
  414. import {
  415. listEngineeringDangerous,
  416. getEngineeringDangerous,
  417. delEngineeringDangerous, queryEngineeringDangerous, updateEngineeringDangerous, addEngineeringDangerous,
  418. } from "@/api/zdsz/engineeringDangerous";
  419. import data from "@/views/system/dict/data.vue";
  420. import {validPhoneMobile, checkPositiveDecimal} from "@/api/rules";
  421. export default {
  422. name: "EngineeringDangerous",
  423. computed: {
  424. data() {
  425. return data
  426. }
  427. },
  428. components: {},
  429. data() {
  430. return {
  431. //备用
  432. // openNodeForm:false,
  433. //备用
  434. currentCollapses: [],
  435. nodeType: "危险作业工程",
  436. nodeDetailVisible: false,
  437. // 按钮loading
  438. buttonLoading: false,
  439. // 遮罩层
  440. loading: true,
  441. // 选中数组
  442. ids: [],
  443. // 非单个禁用
  444. single: true,
  445. // 非多个禁用
  446. multiple: true,
  447. // 显示搜索条件
  448. showSearch: true,
  449. // 总条数
  450. total: 0,
  451. // 危险工程表格数据
  452. engineeringDangerousList: [],
  453. // 弹出层标题
  454. title: "",
  455. // 是否显示弹出层
  456. open: false,
  457. // 查询参数
  458. queryParams: {
  459. pics: [],
  460. pageNum: 1,
  461. pageSize: 10,
  462. basicInformation: undefined,
  463. enginName: undefined,
  464. enginAddre: undefined,
  465. enginTime: undefined,
  466. pipeDiameter: undefined,
  467. tubularProduct: undefined,
  468. casingPresent: undefined,
  469. pipePressure: undefined,
  470. gasSourceDirection: undefined,
  471. taskPosition: undefined,
  472. valvePosition: undefined,
  473. stressReport: undefined,
  474. supervisionRecord: undefined,
  475. workContactForm: undefined,
  476. linePatrolConfirmationForm: undefined,
  477. hazardousWorkPitsLong: undefined,
  478. hazardousWorkPitsWide: undefined,
  479. hazardousWorkPitsDeep: undefined,
  480. needSupport: undefined,
  481. otherPipelineConditionsWorkPit: undefined,
  482. siteHead: undefined,
  483. siteHeadPhone: undefined,
  484. operatorInformation: undefined,
  485. inspectionPort: undefined,
  486. pipelinePainting: undefined,
  487. pipelineSupport: undefined,
  488. pipelineCorrosionProtection: undefined,
  489. masonryValveWell: undefined,
  490. protectionWell: undefined,
  491. pipeProtectionWelMasonry: undefined,
  492. backfill: undefined,
  493. tamp: undefined,
  494. levelingTheSite: undefined,
  495. /* zEngineeringNodeBo: {
  496. type: "危险作业工程",
  497. zEngineeringInfoBo: {} //节点信息
  498. }*/
  499. },
  500. zEngineeringInfoBo: {
  501. constructAddre: '', // 施工地址
  502. constructPhone: '', // 施工人电话
  503. constructUser: '', // 施工人
  504. headName: '', // 负责人
  505. headPhone: '', // 负责人电话
  506. constructAccordingDrawings: '', // 是否按图纸施工
  507. segmentedCompressionQualified: '', // 分段打压是否合格
  508. selfClosingValveType: '', // 自闭阀类型
  509. visitType: '', // 上门类型
  510. backfillTime: '', // 回填时间
  511. constructTime: '', // 施工时间
  512. zEngiineeringPhotoBoList: [] // 图片列表
  513. },
  514. constructAccordingDrawingsOption: [
  515. {
  516. value: '1',
  517. label: '是'
  518. },
  519. {
  520. value: '0',
  521. label: '否'
  522. }
  523. ],
  524. segmentedCompressionQualifiedOption: [
  525. {
  526. value: '1',
  527. label: '是'
  528. },
  529. {
  530. value: '0',
  531. label: '否'
  532. }
  533. ],
  534. // 表单参数
  535. form: {},
  536. // 表单校验
  537. rules: {
  538. basicInformation: [
  539. {required: true, message: "作业基本信息不能为空", trigger: "blur"}
  540. ],
  541. enginName: [
  542. {required: true, message: "工程名称不能为空", trigger: "blur"}
  543. ],
  544. enginAddre: [
  545. {required: true, message: "工程地点不能为空", trigger: "blur"}
  546. ],
  547. /* enginTime: [
  548. {required: true, message: "工程时间不能为空", trigger: "blur"}
  549. ],*/
  550. hazardousWorkPitsLong: [
  551. //{required: true, message: "危险作业坑大小(长)不能为空", trigger: "blur"},
  552. {validator: checkPositiveDecimal, trigger: 'blur'},
  553. ],
  554. hazardousWorkPitsWide: [
  555. //{required: true, message: "危险作业坑大小(宽)不能为空", trigger: "blur"},
  556. {validator: checkPositiveDecimal, trigger: 'blur'},
  557. ],
  558. hazardousWorkPitsDeep: [
  559. //{required: true, message: "危险作业坑大小(深)不能为空", trigger: "blur"},
  560. {validator: checkPositiveDecimal, trigger: 'blur'},
  561. ],
  562. siteHeadPhone: [
  563. // {required: true, message: "现场负责人电话不能为空", trigger: "blur"}
  564. {validator: validPhoneMobile, trigger: 'blur'},
  565. ],
  566. },
  567. //备用
  568. currentType: null, // 组件类型 put修改 add新增
  569. };
  570. },
  571. created() {
  572. this.getList();
  573. },
  574. methods: {
  575. submitForm() {
  576. this.$refs["form"].validate(valid => {
  577. if (valid) {
  578. this.buttonLoading = true;
  579. if (this.form.id != null) {
  580. this.form.pics = []
  581. for (let i = 0; i < this.$refs.obsFileUpload.fileList.length; i++) {
  582. console.log(this.$refs.obsFileUpload.fileList[i])
  583. this.form.pics.push({
  584. 'fileName': this.$refs.obsFileUpload.fileList[i].name,
  585. 'picUrl': this.$refs.obsFileUpload.fileList[i].url
  586. })
  587. }
  588. updateEngineeringDangerous(this.form).then(response => {
  589. this.$modal.msgSuccess("修改成功");
  590. this.open = false;
  591. this.getList();
  592. }).finally(() => {
  593. this.buttonLoading = false;
  594. });
  595. } else {
  596. this.form.pics = []
  597. for (let i = 0; i < this.$refs.obsFileUpload.fileList.length; i++) {
  598. console.log(this.$refs.obsFileUpload.fileList[i])
  599. this.form.pics.push({
  600. 'fileName': this.$refs.obsFileUpload.fileList[i].name,
  601. 'picUrl': this.$refs.obsFileUpload.fileList[i].url
  602. })
  603. }
  604. addEngineeringDangerous(this.form).then(response => {
  605. this.$modal.msgSuccess("新增成功");
  606. this.open = false;
  607. this.getList();
  608. }).finally(() => {
  609. this.buttonLoading = false;
  610. });
  611. }
  612. }
  613. });
  614. },
  615. //备用
  616. viewSource(e) {
  617. this.currentId = e.id
  618. this.$refs.ConstructionDetails.open(_, "危险作业工程")
  619. },
  620. viewNodeSource(e) {
  621. // todo: 获取数据
  622. queryEngineeringDangerous({
  623. id: this.currentId
  624. }).then(res => {
  625. try {
  626. this.currentCollapses = res.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList
  627. } catch (error) {
  628. this.currentCollapses = [];
  629. }
  630. })
  631. },
  632. closeToSucceed() {
  633. this.open = false;
  634. this.getList()
  635. },
  636. toNodeDetail() {
  637. this.$refs["form"].validate(valid => {
  638. if (valid) {
  639. if (this.currentType === 'put') {
  640. this.form.pics = this.$refs.obsFileUpload.fileList
  641. this.$refs.childNode.open(this.form, 37, [{name: "危险作业工程"}])
  642. return
  643. }
  644. if (this.currentType === 'add') {
  645. this.form.pics = this.$refs.obsFileUpload.fileList
  646. this.$refs.childNode.open(this.form, 3, [{name: "危险作业工程"}])
  647. return
  648. }
  649. }
  650. })
  651. /* return
  652. this.$refs['form'].validate(e => {
  653. if (e) {
  654. this.nodeDetailVisible = true
  655. }
  656. })*/
  657. },
  658. // 新增顶管工程
  659. addNewPipe(data) {
  660. this.$refs.enginPipe.openDialog({
  661. id: data.id,
  662. type: "危险作业工程"
  663. }, 'add', data)
  664. },
  665. getUrl(url) {
  666. this.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e => e.url) : [];
  667. },
  668. /** 查询危险工程列表 */
  669. /* getList() {
  670. this.loading = true;
  671. listEngineeringDangerous({
  672. basicInformation: this.queryParams.basicInformation,
  673. enginName: this.queryParams.enginName,
  674. enginAddre: this.queryParams.enginAddre,
  675. params: this.queryParams
  676. }).then(res => {
  677. this.engineeringDangerousList = res.rows;
  678. this.total = res.total;
  679. this.loading = false;
  680. });
  681. },*/
  682. getList() {
  683. this.loading = true;
  684. listEngineeringDangerous(this.queryParams).then(response => {
  685. this.engineeringDangerousList = response.rows;
  686. this.total = response.total;
  687. this.loading = false;
  688. });
  689. },
  690. // 取消按钮
  691. cancel() {
  692. this.open = false;
  693. this.reset();
  694. },
  695. // 表单重置
  696. reset() {
  697. this.form = {
  698. id: undefined,
  699. basicInformation: undefined,
  700. enginName: undefined,
  701. enginAddre: undefined,
  702. enginTime: undefined,
  703. pipeDiameter: undefined,
  704. tubularProduct: undefined,
  705. casingPresent: undefined,
  706. pipePressure: undefined,
  707. gasSourceDirection: undefined,
  708. taskPosition: undefined,
  709. valvePosition: undefined,
  710. stressReport: undefined,
  711. supervisionRecord: undefined,
  712. workContactForm: undefined,
  713. linePatrolConfirmationForm: undefined,
  714. hazardousWorkPitsLong: undefined,
  715. hazardousWorkPitsWide: undefined,
  716. hazardousWorkPitsDeep: undefined,
  717. needSupport: undefined,
  718. otherPipelineConditionsWorkPit: undefined,
  719. siteHead: undefined,
  720. siteHeadPhone: undefined,
  721. operatorInformation: undefined,
  722. inspectionPort: undefined,
  723. pipelinePainting: undefined,
  724. pipelineSupport: undefined,
  725. pipelineCorrosionProtection: undefined,
  726. masonryValveWell: undefined,
  727. protectionWell: undefined,
  728. pipeProtectionWelMasonry: undefined,
  729. backfill: undefined,
  730. tamp: undefined,
  731. levelingTheSite: undefined,
  732. version: undefined,
  733. remark: undefined,
  734. delFlag: undefined,
  735. createBy: undefined,
  736. createTime: undefined,
  737. updateBy: undefined,
  738. updateTime: undefined
  739. };
  740. this.resetForm("form");
  741. },
  742. /** 搜索按钮操作 */
  743. handleQuery() {
  744. this.queryParams.pageNum = 1;
  745. this.getList();
  746. },
  747. /** 重置按钮操作 */
  748. resetQuery() {
  749. this.resetForm("queryForm");
  750. this.handleQuery();
  751. },
  752. // 多选框选中数据
  753. handleSelectionChange(selection) {
  754. this.ids = selection.map(item => item.id)
  755. this.single = selection.length !== 1
  756. this.multiple = !selection.length
  757. },
  758. /** 新增按钮操作 */
  759. handleAdd() {
  760. this.reset();
  761. this.currentType = "add"
  762. this.open = true;
  763. this.title = "添加危险工程";
  764. },
  765. /** 修改按钮操作 */
  766. handleUpdate(row) {
  767. this.loading = true;
  768. this.reset();
  769. const id = row.id || this.ids
  770. getEngineeringDangerous(id).then(response => {
  771. this.loading = false;
  772. this.form = response.data;
  773. this.currentType = "put"
  774. this.open = true;
  775. this.title = "修改危险工程";
  776. });
  777. },
  778. /** 删除按钮操作 */
  779. handleDelete(row) {
  780. const ids = row.id || this.ids;
  781. this.$modal.confirm('是否确认删除所选的数据项?').then(() => {
  782. this.loading = true;
  783. return delEngineeringDangerous(ids);
  784. }).then(() => {
  785. this.loading = false;
  786. this.getList();
  787. this.$modal.msgSuccess("删除成功");
  788. }).catch(() => {
  789. }).finally(() => {
  790. this.loading = false;
  791. });
  792. },
  793. /** 导出按钮操作 */
  794. handleExport() {
  795. this.download('zdsz/engineeringDangerous/export', {
  796. ...this.queryParams
  797. }, `engineeringDangerous_${new Date().getTime()}.xlsx`)
  798. }
  799. }
  800. };
  801. </script>
  802. <style lang="scss" scoped>
  803. ::v-deep .appendElDialog {
  804. width: 70%;
  805. height: 80%;
  806. overflow: hidden;
  807. overflow-y: scroll;
  808. .el-dialog__body {
  809. height: 100%;
  810. }
  811. //.el-form-item {
  812. // margin-bottom: 22px;
  813. // width: 30%;
  814. // display: inline-block;
  815. //}
  816. // .el-form-item:nth-child(2n+2){
  817. // margin-left: 5%;
  818. // }
  819. .el-form-item:not(:nth-child(1):nth-child(2)) {
  820. margin-top: 0.5%;
  821. }
  822. .el-form-item__error {
  823. width: 200px;
  824. color: #ff4949;
  825. font-size: 12px;
  826. line-height: 1;
  827. padding-top: 4px;
  828. position: absolute;
  829. top: 100%;
  830. left: 0;
  831. }
  832. .remark_input {
  833. .el-textarea__inner {
  834. width: 238%;
  835. height: 190px;
  836. }
  837. }
  838. .otherSituation {
  839. width: 60%;
  840. .el-form-item__label {
  841. width: 170px;
  842. }
  843. .el-form-item__content {
  844. margin-left: 173px;
  845. }
  846. }
  847. .dialog-footer {
  848. }
  849. }
  850. </style>