index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415
  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. <!-- 新增主表与节点-->
  10. <el-dialog :title="title" :visible.sync="open" append-to-body customClass="appendElDialog">
  11. <el-form ref="form" :model="queryParams" :rules="rules" label-width="110px">
  12. <el-row :gutter="20">
  13. <el-col :span="12">
  14. <el-form-item label="工程类型" prop="type" v-show="!queryParams.id">
  15. <el-select v-model="queryParams.type" placeholder="请选择类型" disabled >
  16. <el-option
  17. v-for="e in dict.type.engin_type"
  18. :key="e.value"
  19. :label="e.label"
  20. :value="e.value"
  21. ></el-option>
  22. </el-select>
  23. </el-form-item>
  24. </el-col>
  25. <!-- <el-col :span="12">-->
  26. <!-- <el-form-item label="节点类型" prop="zEngineeringNodeBoType">-->
  27. <!-- <el-select v-model="queryParams.zEngineeringNodeBo.type" placeholder="请选择节点类型">-->
  28. <!-- <el-option-->
  29. <!-- v-for="e in dict.type.pipe_jack"-->
  30. <!-- :key="e.value"-->
  31. <!-- :label="e.label"-->
  32. <!-- :value="e.value"-->
  33. <!-- ></el-option>-->
  34. <!-- </el-select>-->
  35. <!-- </el-form-item>-->
  36. <!-- </el-col>-->
  37. </el-row>
  38. <el-row :gutter="20">
  39. <el-col :span="12">
  40. <el-form-item label="工程名称" prop="enginName">
  41. <el-input v-model="queryParams.enginName" placeholder="请填写工程名称" maxlength="50"></el-input>
  42. </el-form-item>
  43. </el-col>
  44. <el-col :span="12">
  45. <el-form-item label="工程地址" prop="enginAddre">
  46. <el-input v-model="queryParams.enginAddre" placeholder="请填写工程地址" maxlength="100"></el-input>
  47. </el-form-item>
  48. </el-col>
  49. </el-row>
  50. <el-row :gutter="20">
  51. <el-col :span="12">
  52. <el-form-item label="工程编码" prop="enginCode">
  53. <el-input v-model="queryParams.enginCode" placeholder="请填写工程编码" maxlength="50"></el-input>
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="12">
  57. <el-form-item label="施工单位" prop="constructUnit">
  58. <el-input v-model="queryParams.constructUnit" placeholder="请填写施工单位" maxlength="100"></el-input>
  59. </el-form-item>
  60. </el-col>
  61. </el-row>
  62. <el-row :gutter="20">
  63. <el-col :span="12">
  64. <el-form-item label="工程规模" prop="enginScale">
  65. <el-input v-model="queryParams.enginScale" placeholder="请填写工程规模" maxlength="50"></el-input>
  66. </el-form-item>
  67. </el-col>
  68. <el-col :span="12">
  69. <el-form-item label="施工质量" prop="constructQuality">
  70. <el-input v-model="queryParams.constructQuality" placeholder="请填写施工质量" maxlength="50"></el-input>
  71. </el-form-item>
  72. </el-col>
  73. </el-row>
  74. <el-row :gutter="20">
  75. <el-col :span="12">
  76. <el-form-item label="施工进度" prop="constructSchedule">
  77. <el-input v-model="queryParams.constructSchedule" placeholder="请填写施工进度" maxlength="50"/>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="12">
  81. <el-form-item label="备注" prop="remark">
  82. <el-input
  83. v-model="queryParams.remark"
  84. type="textarea"
  85. placeholder="请输入内容"
  86. maxlength="255"
  87. />
  88. </el-form-item>
  89. </el-col>
  90. </el-row>
  91. <el-row :gutter="20">
  92. <el-col :span="24">
  93. <el-form-item label="文件" prop="" v-if="currentType=='put'">
  94. <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999" :value="queryParams.pics"
  95. ></ObsFileUpload>
  96. </el-form-item>
  97. <el-form-item label="文件" prop="" v-if="currentType=='add'">
  98. <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999" :value="queryParams.files"
  99. ></ObsFileUpload>
  100. </el-form-item>
  101. </el-col>
  102. </el-row>
  103. </el-form>
  104. <div slot="footer" class="dialog-footer">
  105. <el-button type="primary" @click="submitData">提交</el-button>
  106. <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">{{keyWork}}</el-button>
  107. <el-button @click="cancel">取 消</el-button>
  108. </div>
  109. </el-dialog>
  110. <!-- 节点信息dialog -->
  111. <enginee-node
  112. @closeToSucceed="closeToSucceed"
  113. @files="getFiles"
  114. ref="childNode"
  115. />
  116. </div>
  117. </template>
  118. <script>
  119. import {getComprehensive, delComprehensive} from "@/api/zdsz/comprehensive";
  120. import {
  121. getEngineeList, // 查询工程列表
  122. addEnginee, // 新增工程
  123. getDictList, putEngineeringPipeJacking,
  124. } from "@/api/zdsz/enginee"
  125. import EngineeNode from '@/components/EngineeNode/index'
  126. // 节点信息
  127. export default {
  128. name: "EngineePipe",
  129. components: {
  130. EngineeNode
  131. },
  132. dicts: ['pipe_jack'],
  133. data() {
  134. return {
  135. // 按钮loading
  136. buttonLoading: false,
  137. // 遮罩层
  138. loading: true,
  139. // 选中数组
  140. ids: [],
  141. keyWork:'填写节点信息',
  142. // 非单个禁用
  143. single: true,
  144. // 非多个禁用
  145. multiple: true,
  146. // 显示搜索条件
  147. showSearch: true,
  148. // 总条数
  149. total: 0,
  150. // 开栓|安检|维修表格数据
  151. comprehensiveList: [],
  152. // 弹出层标题
  153. title: "顶管信息",
  154. // 是否显示弹出层
  155. open: false,
  156. // 查询参数
  157. queryParams: {
  158. files:[],
  159. enginId: null, // 外建工程
  160. enginName: '', // 工程名称
  161. enginAddre: '', // 工程地址
  162. enginScale: '', // 工程名称联系方式
  163. enginCode: '', // 工程编码
  164. constructQuality: '', // 施工质量
  165. constructSchedule: "", // 施工进度
  166. type: null, // 类型
  167. remark: '', // 备注
  168. constructUnit: null,
  169. zEngineeringNodeBo: {
  170. type: null,
  171. zEngineeringInfoBo: {}, //节点信息
  172. },
  173. zEngineeringNodeBoList:[]
  174. },
  175. zEngineeringInfoBo: {
  176. constructAddre: '', // 施工地址
  177. constructPhone: '', // 施工人电话
  178. constructUser: '', // 施工人
  179. headName: '', // 负责人
  180. headPhone: '', // 负责人电话
  181. constructAccordingDrawings: '', // 是否按图纸施工
  182. segmentedCompressionQualified: '', // 分段打压是否合格
  183. selfClosingValveType: '', // 自闭阀类型
  184. visitType: '', // 上门类型
  185. backfillTime: '', // 回填时间
  186. constructTime: '', // 施工时间
  187. zEngiineeringPhotoBoList: [], // 图片列表
  188. zEngineeringMaterialBo: [],// 用料对象
  189. },
  190. constructAccordingDrawingsOption: [
  191. {
  192. value: '1',
  193. label: '是'
  194. },
  195. {
  196. value: '0',
  197. label: '否'
  198. }
  199. ],
  200. nodeDetailVisible: false,
  201. // 表单参数
  202. form: {},
  203. // 表单校验
  204. rules: {
  205. constructSchedule: [
  206. {required: true, message: "施工进度不能为空", trigger: 'blur'}
  207. ],
  208. constructQuality: [
  209. {required: true, message: "施工质量不能为空", trigger: 'blur'}
  210. ],
  211. constructUnit: [
  212. {required: true, message: "施工单位不能为空", trigger: 'blur'}
  213. ],
  214. enginName: [
  215. {required: true, message: "工程名称不能为空", trigger: 'blur'}
  216. ],
  217. enginAddre: [
  218. {required: true, message: "工程地址不能为空", trigger: 'blur'}
  219. ],
  220. enginScale: [
  221. {required: true, message: "工程规模不能为空", trigger: 'blur'}
  222. ],
  223. enginCode: [
  224. {required: true, message: "工程编码不能为空", trigger: 'blur'}
  225. ],
  226. remark: [
  227. {required: false, message: "备注不能为空", trigger: "blur"}
  228. ],
  229. files: [
  230. { required: false, message: '必须上传文件!', trigger: 'change' },
  231. ]
  232. },
  233. currentType: null, // 组件类型 put修改 add新增
  234. };
  235. },
  236. created() {
  237. },
  238. methods: {
  239. // 顶管工程修改
  240. async putEnginPipe(data, type) {
  241. await this.reset();
  242. let newData = data
  243. // let zEngineeringNodeBo = {
  244. // type: data.zEngineeringNodeBoList[0].type,
  245. // zEngineeringInfoBo: data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
  246. // }
  247. // newData.zEngineeringNodeBo = zEngineeringNodeBo
  248. this.currentType = type
  249. if (this.currentType=='put'){
  250. this.title = '修改顶管信息'
  251. this.keyWork = '编辑节点信息'
  252. }
  253. this.queryParams = newData
  254. this.zEngineeringInfoBo = newData.zEngineeringNodeBoList
  255. this.open = true
  256. },
  257. closeToSucceed() {
  258. this.open = false
  259. this.nodeDetailVisible = false
  260. },
  261. getFiles(flag){
  262. if (flag){
  263. this.$refs.obsFileUpload.fileList=this.queryParams.files
  264. }
  265. },
  266. async openDialog(data, type,sata) {
  267. await this.reset();
  268. this.currentType = type
  269. if (this.currentType == 'add') {
  270. this.title = '新增顶管信息'
  271. } else if (this.currentType == 'put') {
  272. this.title = '修改顶管信息'
  273. }
  274. this.queryParams.enginId = data.id
  275. this.queryParams.type = data.type
  276. //带值
  277. this.queryParams.enginName = sata.enginName?sata.enginName:'';
  278. this.open = true
  279. },
  280. nodeCancel() {
  281. this.nodeDetailVisible = false
  282. },
  283. submitData(){
  284. this.queryParams.files = this.$refs.obsFileUpload.fileList;
  285. if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
  286. this.$message.warning('必须上传文件!')
  287. return
  288. }
  289. this.$refs["form"].validate(valid => {
  290. if (valid) {
  291. if (this.queryParams.id != null) {
  292. putEngineeringPipeJacking(this.queryParams).then(response => {
  293. this.$modal.msgSuccess("修改成功");
  294. this.open = false;
  295. this.getList();
  296. }).finally(() => {
  297. });
  298. }
  299. }})
  300. },
  301. toNodeDetail() {
  302. if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
  303. this.$message.warning('必须上传文件!')
  304. return
  305. }
  306. this.$refs["form"].validate(valid => {
  307. if (valid) {
  308. getDictList({enginType:['pipe_jack']}).then(res => {
  309. this.nodeList = res.data
  310. this.nodeList.forEach(e => {
  311. e.name = e.value
  312. })
  313. if (this.currentType == 'put') {
  314. this.queryParams.files = this.$refs.obsFileUpload.fileList;
  315. this.$refs.childNode.open(this.queryParams, 15,this.nodeList)
  316. } else if (this.currentType == 'add') {
  317. this.queryParams.files = this.$refs.obsFileUpload.fileList;
  318. this.$refs.childNode.open(this.queryParams, 10,this.nodeList)
  319. }
  320. })
  321. }
  322. });
  323. },
  324. // 取消按钮
  325. cancel() {
  326. this.open = false;
  327. this.reset();
  328. },
  329. // 表单重置
  330. reset() {
  331. // this.$nextTick(() => {
  332. // this.$refs['form'].resetFields()
  333. // this.$refs['nodeForm'].resetFields()
  334. // })
  335. this.resetForm("form");
  336. this.resetForm("nodeForm");
  337. this.queryParams.files=[]
  338. },
  339. /** 提交按钮 */
  340. submitForm() {
  341. this.queryParams.zEngineeringNodeBo.zEngineeringInfoBo = this.zEngineeringInfoBo
  342. addEnginee(this.queryParams).then(res => {
  343. })
  344. }
  345. }
  346. };
  347. </script>
  348. <style lang="scss" scoped>
  349. ::v-deep .appendElDialog {
  350. width: 850px;
  351. height: 700px;
  352. .el-dialog__footer {
  353. padding: 20px;
  354. padding-top: 0px;
  355. text-align: right;
  356. -webkit-box-sizing: border-box;
  357. box-sizing: border-box;
  358. }
  359. .el-dialog__body {
  360. height: 85%;
  361. }
  362. .el-form-item:nth-child(2n+2) {
  363. margin-left: 5%;
  364. }
  365. .el-form-item:not(:nth-child(1):nth-child(2)) {
  366. margin-top: 0.5%;
  367. }
  368. .remark_input {
  369. .el-textarea__inner {
  370. width: 238%;
  371. height: 190px;
  372. }
  373. }
  374. }
  375. ::v-deep .appendElNodeDialog {
  376. // width: 70%;
  377. height: 80%;
  378. .el-dialog__body {
  379. height: 85%;
  380. }
  381. .el-form-item {
  382. margin-bottom: 22px;
  383. width: 44%;
  384. display: inline-block;
  385. }
  386. .el-form-item:nth-child(2n+2) {
  387. margin-left: 5%;
  388. }
  389. .el-form-item:not(:nth-child(1):nth-child(2)) {
  390. margin-top: 0.5%;
  391. }
  392. }
  393. </style>