index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  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 :loading="buttonLoading" type="primary" @click="toNodeDetail">{{keyWork}}</el-button>
  106. <el-button @click="cancel">取 消</el-button>
  107. </div>
  108. </el-dialog>
  109. <!-- 节点信息dialog -->
  110. <enginee-node
  111. @closeToSucceed="closeToSucceed"
  112. ref="childNode"
  113. />
  114. </div>
  115. </template>
  116. <script>
  117. import {getComprehensive, delComprehensive} from "@/api/zdsz/comprehensive";
  118. import {
  119. getEngineeList, // 查询工程列表
  120. addEnginee, // 新增工程
  121. getDictList
  122. } from "@/api/zdsz/enginee"
  123. import EngineeNode from '@/components/EngineeNode/index' // 节点信息
  124. export default {
  125. name: "EngineePipe",
  126. components: {
  127. EngineeNode
  128. },
  129. dicts: ['pipe_jack'],
  130. data() {
  131. return {
  132. // 按钮loading
  133. buttonLoading: false,
  134. // 遮罩层
  135. loading: true,
  136. // 选中数组
  137. ids: [],
  138. keyWork:'填写节点信息',
  139. // 非单个禁用
  140. single: true,
  141. // 非多个禁用
  142. multiple: true,
  143. // 显示搜索条件
  144. showSearch: true,
  145. // 总条数
  146. total: 0,
  147. // 开栓|安检|维修表格数据
  148. comprehensiveList: [],
  149. // 弹出层标题
  150. title: "顶管信息",
  151. // 是否显示弹出层
  152. open: false,
  153. // 查询参数
  154. queryParams: {
  155. files:[],
  156. enginId: null, // 外建工程
  157. enginName: '', // 工程名称
  158. enginAddre: '', // 工程地址
  159. enginScale: '', // 工程名称联系方式
  160. enginCode: '', // 工程编码
  161. constructQuality: '', // 施工质量
  162. constructSchedule: "", // 施工进度
  163. type: null, // 类型 01工业工程 02市政工程
  164. enginType: '', // 工程类型 民用工程 0 ,市政工程 1,工业工程 2 ,顶管工程 3,危险作业工程 4,基建工程 5
  165. remark: '', // 备注
  166. constructUnit: null,
  167. zEngineeringNodeBo: {
  168. type: null,
  169. zEngineeringInfoBo: {}, //节点信息
  170. },
  171. zEngineeringNodeBoList:[]
  172. },
  173. zEngineeringInfoBo: {
  174. constructAddre: '', // 施工地址
  175. constructPhone: '', // 施工人电话
  176. constructUser: '', // 施工人
  177. headName: '', // 负责人
  178. headPhone: '', // 负责人电话
  179. constructAccordingDrawings: '', // 是否按图纸施工
  180. segmentedCompressionQualified: '', // 分段打压是否合格
  181. selfClosingValveType: '', // 自闭阀类型
  182. visitType: '', // 上门类型
  183. backfillTime: '', // 回填时间
  184. constructTime: '', // 施工时间
  185. zEngiineeringPhotoBoList: [], // 图片列表
  186. zEngineeringMaterialBo: [],// 用料对象
  187. },
  188. constructAccordingDrawingsOption: [
  189. {
  190. value: '1',
  191. label: '是'
  192. },
  193. {
  194. value: '0',
  195. label: '否'
  196. }
  197. ],
  198. nodeDetailVisible: false,
  199. // 表单参数
  200. form: {},
  201. // 表单校验
  202. rules: {
  203. constructSchedule: [
  204. {required: true, message: "施工进度不能为空", trigger: 'blur'}
  205. ],
  206. constructQuality: [
  207. {required: true, message: "施工质量不能为空", trigger: 'blur'}
  208. ],
  209. constructUnit: [
  210. {required: true, message: "施工单位不能为空", trigger: 'blur'}
  211. ],
  212. enginName: [
  213. {required: true, message: "工程名称不能为空", trigger: 'blur'}
  214. ],
  215. enginAddre: [
  216. {required: true, message: "工程地址不能为空", trigger: 'blur'}
  217. ],
  218. enginScale: [
  219. {required: true, message: "工程规模不能为空", trigger: 'blur'}
  220. ],
  221. enginCode: [
  222. {required: true, message: "工程编码不能为空", trigger: 'blur'}
  223. ],
  224. remark: [
  225. {required: false, message: "备注不能为空", trigger: "blur"}
  226. ],
  227. },
  228. currentType: null, // 组件类型 put修改 add新增
  229. };
  230. },
  231. created() {
  232. },
  233. methods: {
  234. // 顶管工程修改
  235. async putEnginPipe(data, type) {
  236. await this.reset();
  237. let newData = data
  238. // let zEngineeringNodeBo = {
  239. // type: data.zEngineeringNodeBoList[0].type,
  240. // zEngineeringInfoBo: data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
  241. // }
  242. // newData.zEngineeringNodeBo = zEngineeringNodeBo
  243. this.currentType = type
  244. if (this.currentType=='put'){
  245. this.title = '修改顶管信息'
  246. this.keyWork = '编辑节点信息'
  247. }
  248. this.queryParams = newData
  249. this.zEngineeringInfoBo = newData.zEngineeringNodeBo.zEngineeringInfoBo
  250. this.open = true
  251. },
  252. closeToSucceed() {
  253. this.open = false
  254. this.nodeDetailVisible = false
  255. },
  256. openDialog(data, type) {
  257. this.currentType = type
  258. if (this.currentType == 'add') {
  259. this.title = '新增顶管信息'
  260. } else if (this.currentType == 'put') {
  261. this.title = '修改顶管信息'
  262. }
  263. this.queryParams.enginId = data.id
  264. this.queryParams.type = data.type
  265. this.open = true
  266. },
  267. nodeCancel() {
  268. this.nodeDetailVisible = false
  269. },
  270. toNodeDetail() {
  271. getDictList({enginType:['pipe_jack']}).then(res => {
  272. this.nodeList = res.data
  273. this.nodeList.forEach(e => {
  274. e.name = e.value
  275. })
  276. console.log('顶管节点',this.nodeList)
  277. if (this.currentType == 'put') {
  278. this.queryParams.files = this.$refs.obsFileUpload.fileList
  279. this.$refs.childNode.open(this.queryParams, 15,this.nodeList)
  280. } else if (this.currentType == 'add') {
  281. this.queryParams.files = this.$refs.obsFileUpload.fileList
  282. this.$refs.childNode.open(this.queryParams, 10,this.nodeList)
  283. }
  284. })
  285. },
  286. // 取消按钮
  287. cancel() {
  288. this.open = false;
  289. this.reset();
  290. },
  291. // 表单重置
  292. reset() {
  293. // this.$nextTick(() => {
  294. // this.$refs['form'].resetFields()
  295. // this.$refs['nodeForm'].resetFields()
  296. // })
  297. this.resetForm("form");
  298. this.resetForm("nodeForm");
  299. },
  300. /** 提交按钮 */
  301. submitForm() {
  302. this.queryParams.zEngineeringNodeBo.zEngineeringInfoBo = this.zEngineeringInfoBo
  303. addEnginee(this.queryParams).then(res => {
  304. })
  305. }
  306. }
  307. };
  308. </script>
  309. <style lang="scss" scoped>
  310. ::v-deep .appendElDialog {
  311. width: 850px;
  312. height: 700px;
  313. .el-dialog__footer {
  314. padding: 20px;
  315. padding-top: 0px;
  316. text-align: right;
  317. -webkit-box-sizing: border-box;
  318. box-sizing: border-box;
  319. }
  320. .el-dialog__body {
  321. height: 85%;
  322. }
  323. .el-form-item:nth-child(2n+2) {
  324. margin-left: 5%;
  325. }
  326. .el-form-item:not(:nth-child(1):nth-child(2)) {
  327. margin-top: 0.5%;
  328. }
  329. .remark_input {
  330. .el-textarea__inner {
  331. width: 238%;
  332. height: 190px;
  333. }
  334. }
  335. }
  336. ::v-deep .appendElNodeDialog {
  337. // width: 70%;
  338. height: 80%;
  339. .el-dialog__body {
  340. height: 85%;
  341. }
  342. .el-form-item {
  343. margin-bottom: 22px;
  344. width: 44%;
  345. display: inline-block;
  346. }
  347. .el-form-item:nth-child(2n+2) {
  348. margin-left: 5%;
  349. }
  350. .el-form-item:not(:nth-child(1):nth-child(2)) {
  351. margin-top: 0.5%;
  352. }
  353. }
  354. </style>