indexGY.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. <!--
  2. *@description: 节点信息form(新)
  3. *@author: yh Fu
  4. *@date: 2024-01-10 14:44:14
  5. *@version: V1.0.5
  6. -->
  7. <template>
  8. <div style="width: 100%; height: 100%;">
  9. <!-- 节点表单 庭院 -->
  10. <el-form ref="fangxianForm" v-if="flag=='gy_out'" :model="nodeInfo" :rules="nodeRules" label-width="200px">
  11. <h2 style="margin-left: 16%;font-weight: 800;">{{ name }}</h2>
  12. <el-form-item label="施工时间" prop="constructTime" v-if="'调压柜' != name && '阀井'!==name&& '顶管材料米数'!==name&& '管道施工记录'!==name">
  13. <el-date-picker
  14. :disabled="formType"
  15. v-model="nodeInfo.constructTime"
  16. value-format="yyyy-MM-dd hh:mm:ss"
  17. type="datetime"
  18. placeholder="请选择施工时间">
  19. </el-date-picker>
  20. </el-form-item>
  21. <br>
  22. <el-form-item label="照片" prop="zEngiineeringPhotoBoList" class="obsImage"
  23. v-if="'回填、撤场' != name && '调压柜' != name && '阀井'!==name&& '顶管材料米数'!==name">
  24. <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  25. :value="nodeInfo.zEngiineeringPhotoBoList"
  26. @input="getUrl"></ObsImageUpload>
  27. </el-form-item>
  28. <el-form-item label="铭牌" prop="zEngiineeringPhotoBoList" class="obsImage tygImage" v-if="'调压柜' === name">
  29. <ObsImageUpload ref="boxBrand" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  30. :value="nodeInfo.boxBrand"
  31. @input="getboxBrandUrl"></ObsImageUpload>
  32. </el-form-item>
  33. <el-form-item label="底腿连接" prop="zEngiineeringPhotoBoList" class="obsImage tygImage" v-if="'调压柜' === name">
  34. <ObsImageUpload ref="bottomLeg" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  35. :value="nodeInfo.bottomLeg"
  36. @input="getBottomLegUrl"></ObsImageUpload>
  37. </el-form-item>
  38. <el-form-item label="石粉回填" prop="zEngiineeringPhotoBoList" class="obsImage tygImage" v-if="'调压柜' === name">
  39. <ObsImageUpload ref="stonePowder" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  40. :value="nodeInfo.stonePowder"
  41. @input="getstonePowderUrl"></ObsImageUpload>
  42. </el-form-item>
  43. <el-form-item label="防雷接地" prop="zEngiineeringPhotoBoList" class="obsImage tygImage" v-if="'调压柜' === name">
  44. <ObsImageUpload ref="lightning" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  45. :value="nodeInfo.lightning"
  46. @input="getLightningUrl"></ObsImageUpload>
  47. </el-form-item>
  48. <el-form-item label="地面硬化" prop="zEngiineeringPhotoBoList" class="obsImage tygImage" v-if="'调压柜' === name">
  49. <ObsImageUpload ref="groundHardening" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  50. :value="nodeInfo.groundHardening"
  51. @input="getGroundHardeningUrl"></ObsImageUpload>
  52. </el-form-item>
  53. <el-form-item label="套管" prop="zEngiineeringPhotoBoList" class="obsImage tygImage" v-if="'阀井' === name">
  54. <ObsImageUpload ref="cannula" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  55. :value="nodeInfo.cannula"
  56. @input="getCannulaUrl"></ObsImageUpload>
  57. </el-form-item>
  58. <el-form-item label="内壁抹灰" prop="zEngiineeringPhotoBoList" class="obsImage tygImage" v-if="'阀井' === name">
  59. <ObsImageUpload ref="wallPlaster" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  60. :value="nodeInfo.wallPlaster"
  61. @input="getWallPlasterUrl"></ObsImageUpload>
  62. </el-form-item>
  63. <el-form-item label="防护网" prop="zEngiineeringPhotoBoList" class="obsImage tygImage" v-if="'阀井' === name">
  64. <ObsImageUpload ref="protectiveNet" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  65. :value="nodeInfo.protectiveNet"
  66. @input="getProtectiveNetUrl"></ObsImageUpload>
  67. </el-form-item>
  68. <el-form-item label="八角" prop="zEngiineeringPhotoBoList" class="obsImage tygImage" v-if="'阀井' === name">
  69. <ObsImageUpload ref="starAnise" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  70. :value="nodeInfo.starAnise"
  71. @input="getStarAniseUrl"></ObsImageUpload>
  72. </el-form-item>
  73. <el-form-item label="回填前" prop="zEngiineeringPhotoBoListOne" class="obsImage" v-if="'回填、撤场' == name">
  74. <ObsImageUpload ref="obsImageUpload1" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  75. :value="nodeInfo.zEngiineeringPhotoBoListOne"
  76. @input="getUrl1"></ObsImageUpload>
  77. </el-form-item>
  78. <el-form-item label="铺设警示带" prop="zEngiineeringPhotoBoListTwo" class="obsImage" v-if="'回填、撤场' == name">
  79. <ObsImageUpload ref="obsImageUpload2" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  80. :value="nodeInfo.zEngiineeringPhotoBoListTwo"
  81. @input="getUrl2"></ObsImageUpload>
  82. </el-form-item>
  83. <el-form-item label="回填后" prop="zEngiineeringPhotoBoListThree" class="obsImage" v-if="'回填、撤场' == name">
  84. <ObsImageUpload ref="obsImageUpload3" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  85. :value="nodeInfo.zEngiineeringPhotoBoListThree"
  86. @input="getUrl3"></ObsImageUpload>
  87. </el-form-item>
  88. <el-form-item label="文字说明" prop="remark" v-if="'隐蔽工程'== name">
  89. <el-input
  90. v-model="nodeInfo.remark"
  91. type="textarea"
  92. placeholder="请输入"
  93. maxlength="255"
  94. />
  95. </el-form-item>
  96. <el-form-item label="备注" prop="remark" v-if="'调压柜'== name || '阀井'===name|| '管道施工记录'===name">
  97. <el-input
  98. v-model="nodeInfo.remark"
  99. type="textarea"
  100. placeholder="请输入"
  101. maxlength="255"
  102. />
  103. </el-form-item>
  104. <div style="width: 25%;position: relative;left: 15.5%;top: -8px;"
  105. v-if="['焊接、防腐','架空管线','下管','沟下连头','顶管材料米数'].includes(name)">
  106. <el-button @click="addMaterial()">新增用料信息</el-button>
  107. </div>
  108. <el-row v-for="(item, index) in zEngineeringMaterialBo"
  109. v-if="['焊接、防腐','架空管线','下管','沟下连头','顶管材料米数'].includes(name)" :key="index" style="left: 10.5%;"
  110. :class="'rowStructure'">
  111. <el-col :span="7">
  112. <el-form-item
  113. :prop="'zEngineeringMaterialBo.' + index + '.materialQuality'"
  114. label-width="50px"
  115. label="材质"
  116. >
  117. <el-select v-model="item.materialQuality" placeholder="请选择材质" style="width: 100%"
  118. @change="getEnginSpecificationsList(item, index)" filterable
  119. @blur="selectBlur(arguments,index,'materialQuality')">
  120. <el-option
  121. v-for="e in materialQualityList"
  122. :key="e.id"
  123. :label="e.name"
  124. :value="e.id"
  125. ></el-option>
  126. </el-select>
  127. </el-form-item>
  128. </el-col>
  129. <el-col :span="7">
  130. <el-form-item
  131. :prop="'zEngineeringMaterialBo.' + index + '.specifications'"
  132. label-width="50px"
  133. label="规格"
  134. >
  135. <el-select v-model="item.specifications" placeholder="请选择规格" style="width: 100%" filterable
  136. @blur="selectBlur(arguments,index,'specifications')">
  137. <el-option
  138. v-for="e in specificationsList"
  139. :key="e.id"
  140. :label="e.name"
  141. :value="e.id"
  142. ></el-option>
  143. </el-select>
  144. </el-form-item>
  145. </el-col>
  146. <el-col :span="7">
  147. <el-form-item
  148. :prop="'zEngineeringMaterialBo.' + index + '.number'"
  149. label-width="50px"
  150. label="米数"
  151. >
  152. <div class="block" style="display: inline-block; margin-right: 20px;">
  153. <el-input v-model="item.number" placeholder="请输入米数" style="width: 100%"
  154. oninput="value=value.match(/\d+(\.\d{0,1})?/) ? value.match(/\d+(\.\d{0,1})?/)[0] : ''"
  155. :disabled="status == 'read-only'">
  156. <template slot="append">米</template>
  157. </el-input>
  158. </div>
  159. </el-form-item>
  160. </el-col>
  161. <el-col :span="7">
  162. <el-form-item
  163. :prop="'zEngineeringMaterialBo.' + index + '.number'"
  164. label-width="50px"
  165. >
  166. <div class="block" style="display: inline-block; margin-right: 20px;"></div>
  167. </el-form-item>
  168. </el-col>
  169. <el-button v-if="zEngineeringMaterialBo.length > 0" @click="removezEngineeringMaterialBo(index)">
  170. 删除
  171. </el-button>
  172. </el-row>
  173. <!-- <el-row v-for="(item, index) in zEngineeringMaterialBo" v-if="['阀井'].includes(name)" :key="index"-->
  174. <!-- style="left: 10.5%;" :class="'rowStructure'">-->
  175. <!-- <el-col :span="7">-->
  176. <!-- <el-form-item-->
  177. <!-- :prop="'zEngineeringMaterialBo.' + index + '.remark'"-->
  178. <!-- label-width="50px"-->
  179. <!-- label="型号"-->
  180. <!-- >-->
  181. <!-- <div class="block" style="display: inline-block; margin-right: 20px;">-->
  182. <!-- <el-input v-model="item.remark" placeholder="请输入型号" style="width: 100%"-->
  183. <!-- :disabled="status == 'read-only'"/>-->
  184. <!-- </div>-->
  185. <!-- </el-form-item>-->
  186. <!-- </el-col>-->
  187. <!-- <el-col :span="7">-->
  188. <!-- <el-form-item-->
  189. <!-- :prop="'zEngineeringMaterialBo.' + index + '.number'"-->
  190. <!-- label-width="50px"-->
  191. <!-- >-->
  192. <!-- <div class="block" style="display: inline-block; margin-right: 20px;"></div>-->
  193. <!-- </el-form-item>-->
  194. <!-- </el-col>-->
  195. <!-- <el-button v-if="zEngineeringMaterialBo.length > 0" @click="removezEngineeringMaterialBo(index)">-->
  196. <!-- 删除-->
  197. <!-- </el-button>-->
  198. <!-- </el-row>-->
  199. <hr style="position: relative;left: 10%;">
  200. </el-form>
  201. <el-form ref="fangxianForm" v-if="flag=='gy_inner'" :model="nodeInfo" :rules="nodeRules" label-width="200px">
  202. <h2 style="margin-left: 16%;font-weight: 800;">{{ name }}</h2>
  203. <el-form-item label="施工时间" prop="constructTime">
  204. <el-date-picker
  205. :disabled="formType"
  206. v-model="nodeInfo.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="zEngiineeringPhotoBoList" class="obsImage">
  213. <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  214. :value="nodeInfo.zEngiineeringPhotoBoList"
  215. @input="getUrl"></ObsImageUpload>
  216. </el-form-item>
  217. <div style="width: 25%;position: relative;left: 20.5%;top: -8px;" v-if="['焊接'].includes(name)">
  218. <el-button @click="addMaterial()">新增用料信息</el-button>
  219. </div>
  220. <el-row v-for="(item, index) in zEngineeringMaterialBo" v-if="['焊接'].includes(name)" :key="index"
  221. style="left: 13.5%;" :class="'rowStructure'">
  222. <el-col :span="7">
  223. <el-form-item
  224. :prop="'zEngineeringMaterialBo.' + index + '.materialQuality'"
  225. label-width="50px"
  226. label="材质"
  227. >
  228. <el-select v-model="item.materialQuality" placeholder="请选择材质" style="width: 100%"
  229. @change="getEnginSpecificationsList(item, index)" filterable
  230. @blur="selectBlur(arguments,index,'materialQuality')">
  231. <el-option
  232. v-for="e in materialQualityList"
  233. :key="e.id"
  234. :label="e.name"
  235. :value="e.id"
  236. ></el-option>
  237. </el-select>
  238. </el-form-item>
  239. </el-col>
  240. <el-col :span="7">
  241. <el-form-item
  242. :prop="'zEngineeringMaterialBo.' + index + '.specifications'"
  243. label-width="50px"
  244. label="规格"
  245. >
  246. <el-select v-model="item.specifications" placeholder="请选择规格" style="width: 100%" filterable
  247. @blur="selectBlur(arguments,index,'specifications')">
  248. <el-option
  249. v-for="e in specificationsList"
  250. :key="e.id"
  251. :label="e.name"
  252. :value="e.id"
  253. ></el-option>
  254. </el-select>
  255. </el-form-item>
  256. </el-col>
  257. <el-col :span="7">
  258. <el-form-item
  259. :prop="'zEngineeringMaterialBo.' + index + '.number'"
  260. label-width="50px"
  261. label="米数"
  262. >
  263. <div class="block" style="display: inline-block; margin-right: 20px;">
  264. <el-input v-model="item.number" placeholder="请输入米数" style="width: 100%"
  265. oninput="value=value.match(/\d+(\.\d{0,1})?/) ? value.match(/\d+(\.\d{0,1})?/)[0] : ''"
  266. :disabled="status == 'read-only'">
  267. <template slot="append">米</template>
  268. </el-input>
  269. </div>
  270. </el-form-item>
  271. </el-col>
  272. <el-col :span="7">
  273. <el-form-item
  274. :prop="'zEngineeringMaterialBo.' + index + '.number'"
  275. label-width="50px"
  276. >
  277. <div class="block" style="display: inline-block; margin-right: 20px;"></div>
  278. </el-form-item>
  279. </el-col>
  280. <el-button v-if="zEngineeringMaterialBo.length > 0" @click="removezEngineeringMaterialBo(index)">
  281. 删除
  282. </el-button>
  283. </el-row>
  284. <hr style="position: relative;left: 10%;">
  285. </el-form>
  286. <el-form ref="fangxianForm" v-if="flag=='gy_tyg'" :model="nodeInfo" :rules="nodeRules" label-width="200px">
  287. <h2 style="margin-left: 16%;font-weight: 800;">{{ name }}</h2>
  288. <el-form-item label="施工时间" prop="constructTime" :style=" 'margin-left: -27px' ">
  289. <el-date-picker
  290. :disabled="formType"
  291. v-model="nodeInfo.constructTime"
  292. value-format="yyyy-MM-dd hh:mm:ss"
  293. type="datetime"
  294. placeholder="请选择施工时间">
  295. </el-date-picker>
  296. </el-form-item>
  297. <el-form-item
  298. :prop="nodeInfo.remark"
  299. :class="'labelWidth'"
  300. label="施工内容"
  301. label-width="95px"
  302. >
  303. <div class="block" style="display: inline-block; margin-right: 20px;">
  304. <el-input v-model="nodeInfo.remark" placeholder="请输入施工内容" style="width: 100%" maxlength="100"
  305. type="textarea"></el-input>
  306. </div>
  307. </el-form-item>
  308. <el-form-item label="照片" prop="zEngiineeringPhotoBoList" class="obsImage">
  309. <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
  310. :value="nodeInfo.zEngiineeringPhotoBoList"
  311. @input="getUrl"></ObsImageUpload>
  312. </el-form-item>
  313. <hr style="position: relative;left: 10%;">
  314. </el-form>
  315. </div>
  316. </template>
  317. <script>
  318. import {
  319. getEnginMaterialQualityList, // 材质
  320. getEnginSpecificationsList, // 规格
  321. getDictType, // 腐蚀程度
  322. } from '@/api/zdsz/enginee'
  323. import ObsVideoUpload from "@/components/ObsVideoUpload/index.vue";
  324. export default {
  325. name: 'EnginNodeInfoGY',
  326. props: ['types', 'enginType', 'enginSort', 'enginNode', 'name', 'currentContain', 'updateOption', 'status', 'flag'],
  327. components: {ObsVideoUpload},
  328. data() {
  329. return {
  330. constructAccordingDrawingsOption: [
  331. {
  332. value: 'Y',
  333. label: '是'
  334. },
  335. {
  336. value: 'N',
  337. label: '否'
  338. }
  339. ],
  340. segmentedCompressionQualifiedOption: [
  341. {
  342. value: '1',
  343. label: '合格'
  344. },
  345. {
  346. value: '0',
  347. label: '不合格'
  348. }
  349. ],
  350. materialQualityList_zbf: [], // 自闭阀option
  351. materialQualityList_zjg: [], // 灶具管option
  352. materialQualityList: [], // 材质
  353. specificationsList: [], // 规格
  354. materialComponList: [],
  355. nodeInfo: {
  356. backfillTime: '', // 回填时间
  357. constructTime: '',
  358. constructAccordingDrawings: '',
  359. segmentedCompressionQualified: '',
  360. zEngiineeringPhotoBoList: [], // 照片集合
  361. zEngiineeringPhotoBoListOne: [], // 照片集合
  362. zEngiineeringPhotoBoListTwo: [], // 照片集合
  363. zEngiineeringPhotoBoListThree: [], // 照片集合
  364. zEngineeringMaterialBo: [], // 用料集合
  365. remark: '',
  366. constructAddre: ''
  367. },
  368. nodeInfoBo: {
  369. zEngineeringInfoBo: {}
  370. }, // 节点信息
  371. zEngineeringMaterialBo: [], // 用料信息
  372. nodeRules: {
  373. zEngiineeringPhotoBoList: [
  374. {required: false, message: "至少上传一张图片", trigger: "change"}
  375. ],
  376. constructTime: [
  377. {required: true, message: "请选择施工时间", trigger: "change"}
  378. ]
  379. }
  380. }
  381. },
  382. created() {
  383. // 获取材质
  384. let enginType = '工业工程'
  385. getEnginMaterialQualityList({enginType: enginType}).then(res => {
  386. this.materialQualityList = res.data
  387. })
  388. },
  389. mounted() {
  390. console.log('当前节点name', this.name)
  391. console.log('update', this.updateOption)
  392. console.log('当前节点currentContain', this.types)
  393. this.materialComponList = this.currentContain.find(e => {
  394. if (e instanceof Array) {
  395. return e
  396. }
  397. })
  398. if (this.status == '修改') {
  399. this.currentContain.find(e => {
  400. console.log(this.updateOption)
  401. if (e instanceof Array) {
  402. this.zEngineeringMaterialBo = this.updateOption.zEngineeringInfoBoList[0].zEngineeringMaterialBo
  403. }
  404. this.nodeInfo[e] = this.updateOption[e]
  405. })
  406. this.nodeInfo.zEngiineeringPhotoBoList = this.updateOption.zEngineeringInfoBoList[0].zEngiineeringPhotoBoList
  407. this.nodeInfo.zEngiineeringPhotoBoListOne = this.updateOption.zEngineeringInfoBoList[0].zEngiineeringPhotoBoListOne
  408. this.nodeInfo.zEngiineeringPhotoBoListTwo = this.updateOption.zEngineeringInfoBoList[0].zEngiineeringPhotoBoListTwo
  409. }
  410. setTimeout(() => {
  411. // 至少存在一条物料
  412. this.addMaterial()
  413. }, 1500)
  414. console.log('用料组件', this.materialComponList)
  415. console.log('用料信息', this.zEngineeringMaterialBo)
  416. console.log('节点信息', this.nodeInfo)
  417. // 添加用料对象
  418. // this.addMaterial()
  419. },
  420. methods: {
  421. selectBlur(_, index, name) {
  422. this.zEngineeringMaterialBo[index][name] = [...arguments][0][0].target.value
  423. },
  424. // 收集节点信息
  425. infoCollection() {
  426. let result = null
  427. console.log(this.$refs.fangxianForm)
  428. this.$refs.fangxianForm.validate(valid => {
  429. if (valid) {
  430. // 收集主节点信息
  431. this.currentContain.forEach(e => {
  432. if (e instanceof Array) {
  433. // 包含用料 特殊处理
  434. return
  435. }
  436. this.nodeInfoBo[e] = this.nodeInfo[e]
  437. })
  438. this.nodeInfoBo.type = this.name
  439. if (this.name != '回填、撤场') {
  440. this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = []
  441. this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.nodeInfo.zEngiineeringPhotoBoList
  442. }
  443. if (this.name == '回填、撤场') {
  444. this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoListOne = []
  445. this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoListTwo = []
  446. this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoListThree = []
  447. this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoListOne = this.nodeInfo.zEngiineeringPhotoBoListOne
  448. this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoListTwo = this.nodeInfo.zEngiineeringPhotoBoListTwo
  449. this.nodeInfoBo.zEngineeringInfoBo.zEngiineeringPhotoBoListThree = this.nodeInfo.zEngiineeringPhotoBoListThree
  450. }
  451. this.nodeInfoBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
  452. this.nodeInfoBo.zEngineeringInfoBo.constructAddre = this.nodeInfo.constructAddre
  453. this.nodeInfoBo.zEngineeringInfoBo.constructTime = this.nodeInfo.constructTime
  454. this.nodeInfoBo.zEngineeringInfoBo.boxBrand=this.nodeInfo.boxBrand
  455. this.nodeInfoBo.zEngineeringInfoBo.lightning=this.nodeInfo.lightning
  456. this.nodeInfoBo.zEngineeringInfoBo.bottomLeg=this.nodeInfo.bottomLeg
  457. this.nodeInfoBo.zEngineeringInfoBo.stonePowder=this.nodeInfo.stonePowder
  458. this.nodeInfoBo.zEngineeringInfoBo.groundHardening=this.nodeInfo.groundHardening
  459. this.nodeInfoBo.zEngineeringInfoBo.cannula=this.nodeInfo.cannula
  460. this.nodeInfoBo.zEngineeringInfoBo.wallPlaster=this.nodeInfo.wallPlaster
  461. this.nodeInfoBo.zEngineeringInfoBo.protectiveNet=this.nodeInfo.protectiveNet
  462. this.nodeInfoBo.zEngineeringInfoBo.starAnise=this.nodeInfo.starAnise
  463. this.nodeInfoBo.zEngineeringInfoBo.remark = this.nodeInfo.remark
  464. // delete this.nodeInfo.zEngiineeringPhotoBoList
  465. console.log('即将返回的节点Info', this.nodeInfoBo)
  466. result = this.nodeInfoBo
  467. } else {
  468. this.$message({
  469. message: '请完善信息',
  470. type: 'error'
  471. });
  472. throw 'valid Failed'
  473. }
  474. })
  475. return result
  476. },
  477. addMaterial() {
  478. let materialBo = {}
  479. // this.materialComponList.forEach(e => {
  480. // materialBo[e] = null
  481. // })
  482. this.zEngineeringMaterialBo.push(materialBo)
  483. this.nodeInfo.zEngineeringMaterialBo.push(materialBo)
  484. // console.log('节点用料参数对象',this.zEngineeringMaterialBo)
  485. },
  486. addzEngineeringMaterialBo(option, params) {
  487. let material = {}
  488. params.forEach(e => {
  489. material[e] = ""
  490. })
  491. this[option].zEngineeringMaterialBo.push(
  492. material
  493. )
  494. },
  495. removezEngineeringMaterialBo(index) {
  496. this.zEngineeringMaterialBo.splice(index, 1);
  497. },
  498. // 填充已有数据
  499. updateInfo(e) {
  500. console.log('填充', e)
  501. },
  502. getUrl(url) {
  503. this.nodeInfo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e => e.url) : [];
  504. },
  505. getProtectiveNetUrl(url) {
  506. this.nodeInfo.protectiveNet = this.$refs.protectiveNet.fileList ? this.$refs.protectiveNet.fileList.map(e=>e.url):[];
  507. },
  508. getWallPlasterUrl(url) {
  509. this.nodeInfo.wallPlaster = this.$refs.wallPlaster.fileList ? this.$refs.wallPlaster.fileList.map(e=>e.url):[];
  510. },
  511. getStarAniseUrl(url) {
  512. this.nodeInfo.starAnise = this.$refs.starAnise.fileList ? this.$refs.starAnise.fileList.map(e=>e.url):[];
  513. },
  514. getCannulaUrl(url) {
  515. this.nodeInfo.cannula = this.$refs.cannula.fileList ? this.$refs.cannula.fileList.map(e=>e.url):[];
  516. },
  517. getGroundHardeningUrl(url) {
  518. this.nodeInfo.groundHardening = this.$refs.groundHardening.fileList ? this.$refs.groundHardening.fileList.map(e=>e.url):[];
  519. },
  520. getLightningUrl(url) {
  521. this.nodeInfo.lightning = this.$refs.lightning.fileList ? this.$refs.lightning.fileList.map(e=>e.url):[];
  522. },
  523. getboxBrandUrl(url) {
  524. this.nodeInfo.boxBrand = this.$refs.boxBrand.fileList ? this.$refs.boxBrand.fileList.map(e=>e.url):[];
  525. },
  526. getBottomLegUrl(url) {
  527. this.nodeInfo.bottomLeg = this.$refs.bottomLeg.fileList ? this.$refs.bottomLeg.fileList.map(e=>e.url):[];
  528. },
  529. getstonePowderUrl(url) {
  530. this.nodeInfo.stonePowder = this.$refs.stonePowder.fileList ? this.$refs.stonePowder.fileList.map(e=>e.url):[];
  531. },
  532. getUrl1(url) {
  533. this.nodeInfo.zEngiineeringPhotoBoListOne = this.$refs.obsImageUpload1.fileList ? this.$refs.obsImageUpload1.fileList.map(e => e.url) : [];
  534. },
  535. getUrl2(url) {
  536. this.nodeInfo.zEngiineeringPhotoBoListTwo = this.$refs.obsImageUpload2.fileList ? this.$refs.obsImageUpload2.fileList.map(e => e.url) : [];
  537. },
  538. getUrl3(url) {
  539. this.nodeInfo.zEngiineeringPhotoBoListThree = this.$refs.obsImageUpload3.fileList ? this.$refs.obsImageUpload3.fileList.map(e => e.url) : [];
  540. },
  541. // 获取材质规格
  542. getEnginSpecificationsList(e, idx) {
  543. this.zEngineeringMaterialBo[idx].specifications = null;
  544. getEnginSpecificationsList({materId: e.materialQuality}).then(res => {
  545. this.specificationsList = res.data
  546. })
  547. },
  548. }
  549. }
  550. </script>
  551. <style lang="scss" scoped>
  552. ::v-deep .material_desc {
  553. .el-form-item__content {
  554. margin-left: 50px !important;
  555. }
  556. }
  557. ::v-deep .el-form {
  558. position: relative;
  559. left: -10%;
  560. .el-form-item {
  561. display: inline-block;
  562. }
  563. .obsImage {
  564. width: 100%;
  565. display: block;
  566. margin-left: 8%;
  567. .el-form-item__label {
  568. width: 160px !important;
  569. }
  570. .el-form-item__error {
  571. position: relative;
  572. left: -10%;
  573. }
  574. }
  575. .obsActiveImage {
  576. .el-form {
  577. left: -14% !important
  578. }
  579. .el-form-item__label {
  580. width: 97px !important;
  581. }
  582. }
  583. .obsActiveImageStructure {
  584. .el-form-item__label {
  585. width: 161px !important;
  586. }
  587. }
  588. .rowStructure {
  589. padding-left: 3.6%;
  590. .el-col .el-form-item {
  591. width: 73%
  592. }
  593. }
  594. }
  595. </style>