index.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. <!--
  2. *@description: 顶管工程
  3. *@author: yh Fu
  4. *@date: 2024-01-04 09:24:57
  5. *@version: V1.0.5
  6. -->
  7. <template>
  8. <div class="app-container">
  9. <el-form :model="queryParams1" ref="queryForm1" size="small" :inline="true" v-show="showSearch" label-width="110px"
  10. @submit.native.prevent>
  11. <el-form-item label="工程名称" prop="enginName">
  12. <el-input v-model="queryParams1.enginName" placeholder="请输入工程名称" clearable></el-input>
  13. </el-form-item>
  14. <el-form-item>
  15. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  16. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  17. </el-form-item>
  18. </el-form>
  19. <el-row :gutter="10" class="mb8">
  20. <el-col :span="1.5">
  21. <el-button
  22. type="success"
  23. plain
  24. icon="el-icon-edit"
  25. size="mini"
  26. :disabled="single"
  27. @click="handleUpdate"
  28. v-hasPermi="['zdsz:engineeringPipeJacking:edit']"
  29. >修改
  30. </el-button>
  31. </el-col>
  32. <el-col :span="1.5">
  33. <el-button
  34. type="danger"
  35. plain
  36. icon="el-icon-delete"
  37. size="mini"
  38. :disabled="multiple"
  39. @click="handleDelete"
  40. v-hasPermi="['zdsz:engineeringPipeJacking:remove']"
  41. >删除
  42. </el-button>
  43. </el-col>
  44. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  45. </el-row>
  46. <el-table v-loading="loading" :data="comprehensiveList" @selection-change="handleSelectionChange">
  47. <el-table-column type="selection" width="55" align="center"/>
  48. <!-- <el-table-column label="工程id" align="center" prop="enginId" />-->
  49. <el-table-column label="工程名称" align="center" prop="enginName"/>
  50. <el-table-column label="工程编码" align="center" prop="enginCode"/>
  51. <el-table-column label="施工单位" align="center" prop="constructUnit"/>
  52. <el-table-column label="工程规模" align="center" prop="enginScale"/>
  53. <el-table-column label="施工质量" align="center" prop="constructQuality"/>
  54. <el-table-column label="施工进度" align="center" prop="constructSchedule"/>
  55. <el-table-column label="审核状态" align="center" prop="nodeReViewStateList" width="250">
  56. <template slot-scope="scope">
  57. <div style="text-align:center">
  58. <el-popover
  59. v-for="item in scope.row.nodeReViewStateList"
  60. placement="top-start"
  61. trigger="hover"
  62. :content="item.Type">
  63. <span slot="reference" v-if="(item.state == '1'||item.state == '2')"
  64. style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #30B08F;"></span>
  65. <span slot="reference" v-if="item.state == '0' "
  66. style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #C03639;"></span>
  67. </el-popover>
  68. </div>
  69. </template>
  70. </el-table-column>
  71. <!-- <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>-->
  72. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
  73. <template slot-scope="scope">
  74. <!-- <el-button
  75. type="text"
  76. icon="el-icon-edit"
  77. size="mini"
  78. @click="viewSource(scope.row)"
  79. >历史</el-button> -->
  80. <el-button
  81. size="mini"
  82. type="text"
  83. icon="el-icon-circle-check"
  84. @click="viewSource(scope.row,'check')"
  85. v-hasPermi="['zdsz:engineeringCivil:remove']"
  86. >审核
  87. </el-button>
  88. <el-button
  89. size="mini"
  90. type="text"
  91. icon="el-icon-time"
  92. @click="viewSource(scope.row)"
  93. v-hasPermi="['zdsz:engineeringPipeJacking:query']"
  94. >历史施工
  95. </el-button>
  96. <el-button
  97. size="mini"
  98. type="text"
  99. icon="el-icon-edit"
  100. @click="handleUpdate(scope.row)"
  101. v-hasPermi="['zdsz:engineeringPipeJacking:edit']"
  102. >修改工程信息
  103. </el-button>
  104. <el-button
  105. size="mini"
  106. type="text"
  107. icon="el-icon-edit"
  108. @click="addNodeInfo(scope.row)"
  109. v-hasPermi="['zdsz:engineeringPipeJacking:add']"
  110. >修改施工信息
  111. </el-button>
  112. <el-button
  113. size="mini"
  114. type="text"
  115. icon="el-icon-edit"
  116. v-hasPermi="['zdsz:engineeringPipeJacking:add']"
  117. @click="addMaterial(scope.row)"
  118. >添加用料
  119. </el-button>
  120. <el-button
  121. size="mini"
  122. type="text"
  123. icon="el-icon-delete"
  124. @click="handleDelete(scope.row)"
  125. v-hasPermi="['zdsz:engineeringPipeJacking:remove']"
  126. >删除
  127. </el-button>
  128. </template>
  129. </el-table-column>
  130. </el-table>
  131. <pagination
  132. v-show="total>0"
  133. :total="total"
  134. :page.sync="queryParams1.pageNum"
  135. :limit.sync="queryParams1.pageSize"
  136. @pagination="getList"
  137. />
  138. <!-- 添加或修改开栓|安检|维修对话框 -->
  139. <el-dialog :title="title" :visible.sync="open" append-to-body customClass="appendElDialog">
  140. <el-form ref="form" :model="queryParams" :rules="rules" label-width="110px">
  141. <el-form-item label="外建工程" prop="type">
  142. <el-select v-model="queryParams.type" placeholder="请选择类型">
  143. <el-option
  144. v-for="e in dict.type.engin_type"
  145. :key="e.value"
  146. :label="e.label"
  147. :value="e.value"
  148. ></el-option>
  149. </el-select>
  150. </el-form-item>
  151. <el-form-item label="工程名称" prop="enginName">
  152. <el-input v-model="queryParams.enginName" placeholder="请填写外建工程"></el-input>
  153. </el-form-item>
  154. <el-form-item label="工程地址" prop="enginAddre">
  155. <el-input v-model="queryParams.enginAddre" placeholder="请填写工程地址"></el-input>
  156. </el-form-item>
  157. <el-form-item label="工程编码" prop="enginCode">
  158. <el-input v-model="queryParams.enginCode" placeholder="请填写工程编码"></el-input>
  159. </el-form-item>
  160. <el-form-item label="施工单位" prop="type">
  161. <el-input v-model="queryParams.type" placeholder="请填写施工单位"></el-input>
  162. </el-form-item>
  163. <el-form-item label="工程规模" prop="enginScale">
  164. <el-input v-model="queryParams.enginScale" placeholder="请填写联系方式"></el-input>
  165. </el-form-item>
  166. <el-form-item label="施工质量" prop="constructQuality">
  167. <el-input v-model="queryParams.constructQuality" placeholder="请填写联系方式"></el-input>
  168. </el-form-item>
  169. <el-form-item label="工程类型" prop="type">
  170. <el-select v-model="queryParams.type" placeholder="请选择类型">
  171. <el-option
  172. v-for="e in dict.type.engin_type"
  173. :key="e.value"
  174. :label="e.label"
  175. :value="e.value"
  176. ></el-option>
  177. </el-select>
  178. </el-form-item>
  179. <el-form-item label="施工进度" prop="constructSchedule">
  180. <el-input v-model="queryParams.constructSchedule" placeholder="请填写施工进度"/>
  181. </el-form-item>
  182. <el-form-item label="备注" prop="remark" style="width: 23.3%;">
  183. <el-input
  184. v-model="queryParams.remark"
  185. type="textarea"
  186. placeholder="请输入内容"
  187. class="remark_input"
  188. />
  189. </el-form-item>
  190. </el-form>
  191. <div slot="footer" class="dialog-footer">
  192. <!-- <el-button :loading="buttonLoading" type="primary" @click="submitForm">确定</el-button> -->
  193. <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">修改施工信息</el-button>
  194. <el-button @click="cancel">取 消</el-button>
  195. </div>
  196. </el-dialog>
  197. <!-- 新增主表与节点 -->
  198. <el-dialog :visible="nodeDetailVisible" :rules="nodeRules" title="节点信息" append-to-body
  199. customClass="appendElNodeDialog">
  200. <el-form ref="nodeForm" :model="zEngineeringInfoBo" :rules="nodeRules" label-width="110px">
  201. <el-form-item label="节点类型" prop="type">
  202. <el-input v-model="nodeType" placeholder="顶管" disabled></el-input>
  203. </el-form-item>
  204. <el-form-item label="施工地址" prop="constructAddre">
  205. <el-input v-model="zEngineeringInfoBo.constructAddre" placeholder="请填写施工地址"></el-input>
  206. </el-form-item>
  207. <el-form-item label="施工人电话" prop="constructPhone">
  208. <el-input v-model="zEngineeringInfoBo.constructPhone" placeholder="请填写施工人电话"></el-input>
  209. </el-form-item>
  210. <el-form-item label="施工人" prop="constructUser">
  211. <el-input v-model="zEngineeringInfoBo.constructUser" placeholder="请填写施工人"></el-input>
  212. </el-form-item>
  213. <el-form-item label="负责人" prop="headName">
  214. <el-input v-model="zEngineeringInfoBo.headName" placeholder="请填写负责人"></el-input>
  215. </el-form-item>
  216. <el-form-item label="负责人电话" prop="headPhone">
  217. <el-input v-model="zEngineeringInfoBo.headPhone" placeholder="请填写负责人电话"></el-input>
  218. </el-form-item>
  219. <el-form-item label="回填时间" prop="backfillTime">
  220. <el-date-picker
  221. v-model="zEngineeringInfoBo.backfillTime"
  222. value-format="yyyy-MM-dd hh:mm:ss"
  223. type="datetime"
  224. placeholder="请选择回填日期">
  225. </el-date-picker>
  226. </el-form-item>
  227. <el-form-item label="施工时间" prop="constructTime">
  228. <el-date-picker
  229. v-model="zEngineeringInfoBo.constructTime"
  230. value-format="yyyy-MM-dd hh:mm:ss"
  231. type="datetime"
  232. placeholder="请选择施工时间">
  233. </el-date-picker>
  234. </el-form-item>
  235. <el-form-item label="是否按图纸施工" prop="constructAccordingDrawings">
  236. <el-select v-model="zEngineeringInfoBo.constructAccordingDrawings">
  237. <el-option
  238. v-for="e in constructAccordingDrawingsOption"
  239. :key="e.value"
  240. :label="e.label"
  241. :value="e.value"
  242. ></el-option>
  243. </el-select>
  244. </el-form-item>
  245. <el-form-item label="分段打压" prop="segmentedCompressionQualified">
  246. <el-select v-model="zEngineeringInfoBo.segmentedCompressionQualified">
  247. <el-option
  248. v-for="e in segmentedCompressionQualifiedOption"
  249. :key="e.value"
  250. :label="e.label"
  251. :value="e.value"
  252. ></el-option>
  253. </el-select>
  254. </el-form-item>
  255. <el-form-item label="自闭阀类型" prop="selfClosingValveType">
  256. <el-select v-model="zEngineeringInfoBo.selfClosingValveType">
  257. <el-option
  258. v-for="e in dict.type.self_closing_valve_type"
  259. :key="e.value"
  260. :label="e.label"
  261. :value="e.value"
  262. ></el-option>
  263. </el-select>
  264. </el-form-item>
  265. <el-form-item label="上门类型" prop="visitType">
  266. <el-select v-model="zEngineeringInfoBo.visitType">
  267. <el-option
  268. v-for="e in dict.type.visit_type"
  269. :key="e.value"
  270. :label="e.label"
  271. :value="e.value"
  272. ></el-option>
  273. </el-select>
  274. </el-form-item>
  275. <el-form-item label="照片" prop="zEngiineeringPhotoBoList" style="width: 100%;">
  276. <FileUpload ref="obsImageUpload" :limit="9999" :value="zEngineeringInfoBo.zEngiineeringPhotoBoList"
  277. @input="getUrl"></FileUpload>
  278. </el-form-item>
  279. <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
  280. <el-button @click="nodeCancel">取 消</el-button>
  281. </el-form>
  282. </el-dialog>
  283. <!-- 顶管工程修改 -->
  284. <EngineePipe ref="enginPipe"/>
  285. <!-- 查看历史 -->
  286. <ConstructionDetails
  287. ref="ConstructionDetails"
  288. :currentCollapses="currentCollapses"
  289. @checkWorking="checkWorking"
  290. @updateNodeOption="updateNodeOption"
  291. :status="status"
  292. enginType="顶管工程"
  293. />
  294. </div>
  295. </template>
  296. <script>
  297. import EngineePipe from "@/components/EngineePipe"
  298. import ConstructionDetails from "@/components/ConstructionDetails" // 查看历史
  299. import {
  300. addEnginee, // 新增工程
  301. getPipeJackingList, // 顶管工程列表
  302. viewEngineeringPipeJacking, // 顶管工程查看详情
  303. deleteEngineeringPipeJacking, // 删除工程查看详情
  304. detailEngineeringPipeJacking, // 历史
  305. getDictList,
  306. engineeringCivilReview,
  307. putEngineeringPipeJacking, CivilReview, insertReview
  308. } from "@/api/zdsz/enginee"
  309. import {getDicts} from "@/api/system/dict/data";
  310. export default {
  311. name: "openrepair",
  312. components: {
  313. EngineePipe,
  314. ConstructionDetails
  315. },
  316. dicts: ['sys_yes_no', 'is_repair', 'engin_type', 'self_closing_valve_type', 'visit_type', 'pipe_jack'],
  317. data() {
  318. return {
  319. currentCollapses: [], // 当前节点历史数据
  320. // 按钮loading
  321. buttonLoading: false,
  322. // 遮罩层
  323. loading: true,
  324. // 选中数组
  325. ids: [],
  326. // 非单个禁用
  327. single: true,
  328. // 非多个禁用
  329. multiple: true,
  330. // 显示搜索条件
  331. showSearch: true,
  332. // 总条数
  333. total: 0,
  334. // 开栓|安检|维修表格数据
  335. comprehensiveList: [],
  336. // 弹出层标题
  337. title: "",
  338. // 是否显示弹出层
  339. open: false,
  340. enginTypeOption: [
  341. {
  342. value: '0',
  343. label: '民用工程'
  344. },
  345. {
  346. value: '2',
  347. label: '工业工程'
  348. },
  349. {
  350. value: '1',
  351. label: '市政工程'
  352. },
  353. {
  354. value: '3',
  355. label: '顶管工程'
  356. },
  357. {
  358. value: '4',
  359. label: '危险作业工程'
  360. },
  361. {
  362. value: '5',
  363. label: '基建工程'
  364. },
  365. ],
  366. nodeType: '1', // 节点类型
  367. // 查询参数
  368. queryParams1: {
  369. enginName: '',
  370. pageNum: 1,
  371. pageSize: 10
  372. },
  373. queryParams: {
  374. enginName: '', // 工程名称
  375. enginAddre: '', // 工程地址
  376. enginScale: '', // 工程名称联系方式
  377. enginCode: '', // 工程编码
  378. constructQuality: '', // 施工质量
  379. type: null, // 工程类型
  380. constructSchedule: "", // 施工进度
  381. enginType: '', // 工程类型 民用工程 0 ,市政工程 1,工业工程 2 ,顶管工程 3,危险作业工程 4,基建工程 5
  382. remark: '', // 备注
  383. zEngineeringNodeBo: {
  384. type: null,
  385. zEngineeringInfoBo: {}, //节点信息
  386. }
  387. },
  388. zEngineeringInfoBo: {
  389. constructAddre: '', // 施工地址
  390. constructPhone: '', // 施工人电话
  391. constructUser: '', // 施工人
  392. headName: '', // 负责人
  393. headPhone: '', // 负责人电话
  394. constructAccordingDrawings: '', // 是否按图纸施工
  395. segmentedCompressionQualified: '', // 分段打压是否合格
  396. selfClosingValveType: '', // 自闭阀类型
  397. visitType: '', // 上门类型
  398. backfillTime: '', // 回填时间
  399. constructTime: '', // 施工时间
  400. zEngiineeringPhotoBoList: [], // 图片列表
  401. zEngineeringMaterialBo: [],// 用料对象
  402. }, // 节点信息
  403. constructAccordingDrawingsOption: [
  404. {
  405. value: '1',
  406. label: '是'
  407. },
  408. {
  409. value: '0',
  410. label: '否'
  411. }
  412. ],
  413. segmentedCompressionQualifiedOption: [
  414. {
  415. value: '1',
  416. label: '是'
  417. },
  418. {
  419. value: '0',
  420. label: '否'
  421. }
  422. ],
  423. nodeDetailVisible: false,
  424. // 表单参数
  425. form: {},
  426. // 表单校验
  427. rules: {
  428. areaId: [
  429. {required: true, message: "小区不能为空", trigger: "change"}
  430. ],
  431. constructSchedule: [
  432. {required: true, message: "施工进度不能为空", trigger: 'blur'}
  433. ],
  434. enginType: [
  435. {required: true, message: "外建工程不能为空", trigger: 'blur'}
  436. ],
  437. constructQuality: [
  438. {required: true, message: "建立联系电话不能为空", trigger: 'blur'}
  439. ],
  440. enginName: [
  441. {required: true, message: "工程名称不能为空", trigger: 'blur'}
  442. ],
  443. enginAddre: [
  444. {required: true, message: "工程地址不能为空", trigger: 'blur'}
  445. ],
  446. enginScale: [
  447. {required: true, message: "联系方式不能为空", trigger: 'blur'}
  448. ],
  449. enginCode: [
  450. {required: true, message: "工程编码不能为空", trigger: 'blur'}
  451. ],
  452. buildingId: [
  453. {required: true, message: "楼栋不能为空", trigger: "change"}
  454. ],
  455. unitId: [
  456. {required: true, message: "单元不能为空", trigger: "change"}
  457. ],
  458. houseId: [
  459. {required: true, message: "房间不能为空", trigger: "change"}
  460. ],
  461. type: [
  462. {required: false, message: "类型不能为空", trigger: "change"}
  463. ],
  464. isQualified: [
  465. {required: true, message: "安检是否合格不能为空", trigger: "blur"}
  466. ],
  467. remark: [
  468. {required: false, message: "备注不能为空", trigger: "blur"}
  469. ],
  470. },
  471. // 节点规则校验
  472. nodeRules: {
  473. type: [
  474. {required: true, message: "施工地址不能为空", trigger: 'blur'}
  475. ],
  476. constructAddre: [
  477. {required: true, message: "施工地址不能为空", trigger: 'blur'}
  478. ],
  479. constructPhone: [
  480. {required: true, message: "施工人电话不能为空", trigger: 'blur'}
  481. ],
  482. constructUser: [
  483. {required: true, message: "施工人不能为空", trigger: 'blur'}
  484. ],
  485. headName: [
  486. {required: true, message: "负责人不能为空", trigger: 'blur'}
  487. ],
  488. headPhone: [
  489. {required: true, message: "负责人电话不能为空", trigger: 'blur'}
  490. ],
  491. },
  492. currentType: null,
  493. nodeList: [],
  494. checkList: [],
  495. currentCheckList: [],
  496. enginNodeStatus: null,
  497. status: null,
  498. createTime: '',
  499. enginId: null,
  500. updateParams: {}
  501. };
  502. },
  503. created() {
  504. this.getList();
  505. },
  506. methods: {
  507. // 填写节点信息
  508. updateNodeOption(zEngineeringInfoBoList) {
  509. delete this.updateParams.zEngineeringNodeBoList
  510. this.updateParams.zEngineeringNodeBo.zEngineeringInfoBoList = zEngineeringInfoBoList
  511. putEngineeringPipeJacking(this.updateParams).then(res => {
  512. console.log(res)
  513. if (res.code == 200) {
  514. this.$message({
  515. message: '修改成功',
  516. type: 'success'
  517. });
  518. this.$refs.ConstructionDetails.dialogVisible = false
  519. this.updateParams = {}
  520. }
  521. })
  522. },
  523. // 节点单项审核
  524. checkWorking(checkingInfo) {
  525. let params = checkingInfo
  526. params.createTime = this.createTime
  527. // params.engInfoId = this.currentId
  528. insertReview(params).then(res => {
  529. if (res.code == 200) {
  530. this.$message({
  531. message: '审核成功',
  532. type: 'success'
  533. });
  534. this.$refs.ConstructionDetails.dialogVisible = false
  535. this.getList()
  536. }
  537. })
  538. },
  539. async addNodeInfo(e) {
  540. this.nodeDetailType = '修改'
  541. this.currentId = e.id
  542. this.enginId = e.id
  543. this.status = 'put'
  544. let val = e.enginType + "_" + e.enginClassification
  545. const res = await getDicts('pipe_jack');
  546. const r = res.data != null ? res.data.map(o => {
  547. return {label: o.dictLabel, value: o.dictValue}
  548. }) : [];
  549. this.$refs.ConstructionDetails.open(r)
  550. return
  551. getDicts(val).then(res => {
  552. let dict = []
  553. for (let i = 0; i < res.data.length; i++) {
  554. dict.push({
  555. "label": res.data[i].dictLabel,
  556. "value": res.data[i].dictValue,
  557. })
  558. }
  559. })
  560. },
  561. // 新增物料
  562. addMaterial(data) {
  563. this.reset();
  564. this.title = "添加用料";
  565. this.enginNodeStatus = '添加用料'
  566. this.loading = true;
  567. const id = data.id || this.ids
  568. viewEngineeringPipeJacking(id).then(res => {
  569. this.loading = false;
  570. let newData = res.data
  571. // let val = newData.enginType + "_" + newData.enginClassification
  572. this.currentCheckList = []
  573. // getDicts(val).then(res => {
  574. // this.checkList = res.data
  575. // })
  576. this.queryParams = newData
  577. console.log(this.queryParams.areaId)
  578. // console.log('选中节点集合',this.currentCheckList)
  579. // this.enginClassification = zEngineeringNodeBo.type
  580. // newData.zEngineeringNodeBo = zEngineeringNodeBo
  581. this.currentType = 'addMaterial'
  582. console.log('顶管工程详情', res.data)
  583. this.$refs.enginPipe.openDialog({
  584. id: data.id,
  585. type: '顶管工程'
  586. }, 'addMaterial', res.data)
  587. // this.open = true
  588. })
  589. },
  590. // 查看历史
  591. async viewSource(e, type = null) {
  592. console.log('查看历史 type=', type)
  593. const res = await getDicts('pipe_jack');
  594. const r = res.data != null ? res.data.map(o => {
  595. return {label: o.dictLabel, value: o.dictValue}
  596. }) : [];
  597. this.currentId = e.id
  598. this.status = 'read-only'
  599. console.log('__________', r)
  600. this.$refs.ConstructionDetails.open(r, _, type, e, e.type)
  601. },
  602. viewNodeSource(e) {
  603. console.log('查看历史传值', e, this.currentId)
  604. detailEngineeringPipeJacking({
  605. id: this.currentId,
  606. type: e
  607. }).then(res => {
  608. console.log(res)
  609. this.createTime = res.data.createTime
  610. try {
  611. this.updateParams = res.data
  612. this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
  613. this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
  614. } catch (error) {
  615. this.currentCollapses = [];
  616. }
  617. console.log(this.currentCollapses)
  618. })
  619. },
  620. nodeCancel() {
  621. this.nodeDetailVisible = false
  622. },
  623. toNodeDetail() {
  624. getDictList({enginType: ['pipe_jack']}).then(res => {
  625. this.nodeList = res.data
  626. })
  627. this.nodeDetailVisible = true
  628. return
  629. this.$refs['form'].validate(e => {
  630. if (e) {
  631. this.nodeDetailVisible = true
  632. }
  633. })
  634. },
  635. getUrl(url) {
  636. this.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e => e.url) : [];
  637. },
  638. /** 查询开栓|安检|维修列表 */
  639. getList() {
  640. this.loading = true;
  641. getPipeJackingList(this.queryParams1).then(res => {
  642. this.comprehensiveList = res.rows;
  643. this.total = res.total;
  644. this.loading = false;
  645. });
  646. },
  647. // 取消按钮
  648. cancel() {
  649. this.open = false;
  650. this.reset();
  651. },
  652. // 表单重置
  653. reset() {
  654. this.$nextTick(() => {
  655. this.$refs['form'].resetFields()
  656. this.$refs['nodeForm'].resetFields()
  657. })
  658. this.resetForm("form");
  659. this.resetForm("nodeForm");
  660. },
  661. /** 搜索按钮操作 */
  662. handleQuery() {
  663. this.queryParams1.pageNum = 1;
  664. this.getList();
  665. },
  666. /** 重置按钮操作 */
  667. resetQuery() {
  668. this.queryParams1.enginName = ''
  669. this.handleQuery();
  670. },
  671. // 多选框选中数据
  672. handleSelectionChange(selection) {
  673. this.ids = selection.map(item => item.id)
  674. this.single = selection.length !== 1
  675. this.multiple = !selection.length
  676. },
  677. /** 新增按钮操作 */
  678. handleAdd() {
  679. this.reset();
  680. this.open = true;
  681. this.title = "新增工程";
  682. },
  683. /** 修改按钮操作 */
  684. handleUpdate(row) {
  685. this.title = "修改顶管工程";
  686. // const id = row.id || this.ids;
  687. // viewEngineeringPipeJacking(id).then(res => {
  688. // console.log(res)
  689. // let newData = res.data
  690. // console.log(newData)
  691. // console.log(res.data.zEngineeringNodeBoList[0].type)
  692. // let zEngineeringNodeBo = {
  693. // type:res.data.zEngineeringNodeBoList[0].type,
  694. // zEngineeringInfoBo:res.data.zEngineeringNodeBoList[0].zEngineeringInfoBo
  695. // }
  696. // newData.zEngineeringNodeBo = zEngineeringNodeBo
  697. // this.currentType = 'put'
  698. // this.queryParams = newData
  699. // console.log(this.queryParams)
  700. // this.zEngineeringInfoBo = newData.zEngineeringNodeBo.zEngineeringInfoBo
  701. // this.open = true
  702. // })
  703. // return
  704. const id = row.id || this.ids;
  705. viewEngineeringPipeJacking(id).then(res => {
  706. this.$refs.enginPipe.putEnginPipe(res.data, 'put')
  707. })
  708. },
  709. /** 提交按钮 */
  710. submitForm() {
  711. // this.$refs["nodeForm"].validate(valid => {
  712. // if (valid) {
  713. this.queryParams.zEngineeringNodeBo.zEngineeringInfoBo = this.zEngineeringInfoBo
  714. addEnginee(this.queryParams).then(res => {
  715. })
  716. // }
  717. // });
  718. },
  719. /** 删除按钮操作 */
  720. handleDelete(row) {
  721. const ids = row.id || this.ids;
  722. this.$modal.confirm('是否确认删除选择数据项?').then(() => {
  723. this.loading = true;
  724. return deleteEngineeringPipeJacking(ids);
  725. }).then(() => {
  726. this.loading = false;
  727. this.getList();
  728. this.$modal.msgSuccess("删除成功");
  729. }).catch(() => {
  730. }).finally(() => {
  731. this.loading = false;
  732. });
  733. },
  734. /** 导出按钮操作 */
  735. handleExport() {
  736. this.download('zdsz/engineeringPipeJacking/export', {
  737. ...this.queryParams
  738. }, `comprehensive_${new Date().getTime()}.xlsx`)
  739. }
  740. }
  741. };
  742. </script>
  743. <style lang="scss" scoped>
  744. ::v-deep .appendElDialog {
  745. width: 70%;
  746. height: 80%;
  747. .el-dialog__body {
  748. height: 85%;
  749. }
  750. .el-form-item {
  751. margin-bottom: 22px;
  752. width: 44%;
  753. display: inline-block;
  754. }
  755. .el-form-item:nth-child(2n+2) {
  756. margin-left: 5%;
  757. }
  758. .el-form-item:not(:nth-child(1):nth-child(2)) {
  759. margin-top: 0.5%;
  760. }
  761. .remark_input {
  762. .el-textarea__inner {
  763. width: 238%;
  764. height: 190px;
  765. }
  766. }
  767. }
  768. ::v-deep .appendElNodeDialog {
  769. // width: 70%;
  770. height: 80%;
  771. .el-dialog__body {
  772. height: 85%;
  773. }
  774. .el-form-item {
  775. margin-bottom: 22px;
  776. width: 44%;
  777. display: inline-block;
  778. }
  779. .el-form-item:nth-child(2n+2) {
  780. margin-left: 5%;
  781. }
  782. .el-form-item:not(:nth-child(1):nth-child(2)) {
  783. margin-top: 0.5%;
  784. }
  785. }
  786. </style>