index.vue 30 KB

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