index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  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. @files="getFiles"
  113. ref="childNode"
  114. />
  115. </div>
  116. </template>
  117. <script>
  118. import {getComprehensive, delComprehensive} from "@/api/zdsz/comprehensive";
  119. import {
  120. getEngineeList, // 查询工程列表
  121. addEnginee, // 新增工程
  122. getDictList
  123. } from "@/api/zdsz/enginee"
  124. import EngineeNode from '@/components/EngineeNode/index' // 节点信息
  125. export default {
  126. name: "EngineePipe",
  127. components: {
  128. EngineeNode
  129. },
  130. dicts: ['pipe_jack'],
  131. data() {
  132. return {
  133. // 按钮loading
  134. buttonLoading: false,
  135. // 遮罩层
  136. loading: true,
  137. // 选中数组
  138. ids: [],
  139. keyWork:'填写节点信息',
  140. // 非单个禁用
  141. single: true,
  142. // 非多个禁用
  143. multiple: true,
  144. // 显示搜索条件
  145. showSearch: true,
  146. // 总条数
  147. total: 0,
  148. // 开栓|安检|维修表格数据
  149. comprehensiveList: [],
  150. // 弹出层标题
  151. title: "顶管信息",
  152. // 是否显示弹出层
  153. open: false,
  154. // 查询参数
  155. queryParams: {
  156. files:[],
  157. enginId: null, // 外建工程
  158. enginName: '', // 工程名称
  159. enginAddre: '', // 工程地址
  160. enginScale: '', // 工程名称联系方式
  161. enginCode: '', // 工程编码
  162. constructQuality: '', // 施工质量
  163. constructSchedule: "", // 施工进度
  164. type: null, // 类型
  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. files: [
  228. { required: false, message: '必须上传文件!', trigger: 'change' },
  229. ]
  230. },
  231. currentType: null, // 组件类型 put修改 add新增
  232. };
  233. },
  234. created() {
  235. },
  236. methods: {
  237. // 顶管工程修改
  238. async putEnginPipe(data, type) {
  239. await this.reset();
  240. let newData = data
  241. // let zEngineeringNodeBo = {
  242. // type: data.zEngineeringNodeBoList[0].type,
  243. // zEngineeringInfoBo: data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
  244. // }
  245. // newData.zEngineeringNodeBo = zEngineeringNodeBo
  246. this.currentType = type
  247. if (this.currentType=='put'){
  248. this.title = '修改顶管信息'
  249. this.keyWork = '编辑节点信息'
  250. }
  251. this.queryParams = newData
  252. this.zEngineeringInfoBo = newData.zEngineeringNodeBoList
  253. this.open = true
  254. },
  255. closeToSucceed() {
  256. this.open = false
  257. this.nodeDetailVisible = false
  258. },
  259. getFiles(flag){
  260. if (flag){
  261. this.$refs.obsFileUpload.fileList=this.queryParams.files
  262. }
  263. },
  264. async openDialog(data, type,sata) {
  265. await this.reset();
  266. this.currentType = type
  267. if (this.currentType == 'add') {
  268. this.title = '新增顶管信息'
  269. } else if (this.currentType == 'put') {
  270. this.title = '修改顶管信息'
  271. }
  272. this.queryParams.enginId = data.id
  273. this.queryParams.type = data.type
  274. //带值
  275. this.queryParams.enginName = sata.enginName?sata.enginName:'';
  276. this.open = true
  277. },
  278. nodeCancel() {
  279. this.nodeDetailVisible = false
  280. },
  281. toNodeDetail() {
  282. if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
  283. this.$message.warning('必须上传文件!')
  284. return
  285. }
  286. this.$refs["form"].validate(valid => {
  287. if (valid) {
  288. getDictList({enginType:['pipe_jack']}).then(res => {
  289. this.nodeList = res.data
  290. this.nodeList.forEach(e => {
  291. e.name = e.value
  292. })
  293. if (this.currentType == 'put') {
  294. this.queryParams.files = this.$refs.obsFileUpload.fileList;
  295. this.$refs.childNode.open(this.queryParams, 15,this.nodeList)
  296. } else if (this.currentType == 'add') {
  297. this.queryParams.files = this.$refs.obsFileUpload.fileList;
  298. this.$refs.childNode.open(this.queryParams, 10,this.nodeList)
  299. }
  300. })
  301. }
  302. });
  303. },
  304. // 取消按钮
  305. cancel() {
  306. this.open = false;
  307. this.reset();
  308. },
  309. // 表单重置
  310. reset() {
  311. // this.$nextTick(() => {
  312. // this.$refs['form'].resetFields()
  313. // this.$refs['nodeForm'].resetFields()
  314. // })
  315. this.resetForm("form");
  316. this.resetForm("nodeForm");
  317. this.queryParams.files=[]
  318. },
  319. /** 提交按钮 */
  320. submitForm() {
  321. this.queryParams.zEngineeringNodeBo.zEngineeringInfoBo = this.zEngineeringInfoBo
  322. addEnginee(this.queryParams).then(res => {
  323. })
  324. }
  325. }
  326. };
  327. </script>
  328. <style lang="scss" scoped>
  329. ::v-deep .appendElDialog {
  330. width: 850px;
  331. height: 700px;
  332. .el-dialog__footer {
  333. padding: 20px;
  334. padding-top: 0px;
  335. text-align: right;
  336. -webkit-box-sizing: border-box;
  337. box-sizing: border-box;
  338. }
  339. .el-dialog__body {
  340. height: 85%;
  341. }
  342. .el-form-item:nth-child(2n+2) {
  343. margin-left: 5%;
  344. }
  345. .el-form-item:not(:nth-child(1):nth-child(2)) {
  346. margin-top: 0.5%;
  347. }
  348. .remark_input {
  349. .el-textarea__inner {
  350. width: 238%;
  351. height: 190px;
  352. }
  353. }
  354. }
  355. ::v-deep .appendElNodeDialog {
  356. // width: 70%;
  357. height: 80%;
  358. .el-dialog__body {
  359. height: 85%;
  360. }
  361. .el-form-item {
  362. margin-bottom: 22px;
  363. width: 44%;
  364. display: inline-block;
  365. }
  366. .el-form-item:nth-child(2n+2) {
  367. margin-left: 5%;
  368. }
  369. .el-form-item:not(:nth-child(1):nth-child(2)) {
  370. margin-top: 0.5%;
  371. }
  372. }
  373. </style>