index.vue 30 KB

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