historyDetailsEnginproject.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  1. <template>
  2. <scroll-view>
  3. <view class="uni-media-list" v-for="(value, key) in dataJson.zEngineeringNodeBo.zEngineeringInfoBoList"
  4. :key="key" v-if="isEdit(value)">
  5. <view class="uni-media-list-body">
  6. <view>
  7. <view class="uni-media-list-text-top">
  8. <view class="tit-text">施工时间:</view>{{value.updateTime}}
  9. </view>
  10. <view class="uni-media-list-text-top">
  11. <view class="uni-common-mt" style="width: 100%;">
  12. <text class="tit-text" style=" font-size: 13px;color:
  13. #000;margin-top: 5px;">施工内容:</text>
  14. <view style="width: 100%;box-sizing: border-box;">
  15. <textarea class="textarea" maxlength="255" placeholder-style="padding: 10rpx;"
  16. style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
  17. auto-height :value="value.remark"
  18. @blur="bindTextAreaBlur($event.target.value,key)"></textarea>
  19. </view>
  20. </view>
  21. </view>
  22. <view v-if="title=='焊接、防腐'||title=='架空管线'||title=='下管'||title=='沟下连头'||title=='焊接'">
  23. <view class="cz-style" v-for="(a,index) in value.zEngineeringMaterialBo" :key="index">
  24. <view class="uni-media-list-text-top" style=" ">
  25. <view class="tit-text">材质:</view>
  26. <view class="uni-list-cell-db" style="margin-top: 10;"
  27. @click="pickerShow('cz',key,index)">
  28. <span
  29. style="color: black;">{{a.materialQualityName==''?'请选择材质':a.materialQualityName}}</span>
  30. </view>
  31. </view>
  32. <view class="uni-media-list-text-top" style=" ">
  33. <view class="tit-text">规格:</view>
  34. <view class="uni-list-cell-db" style="margin-top: 10;"
  35. @click="pickerShow('gg',key,index)">
  36. <span
  37. style="color: black;">{{a.specificationsName==''?'请选择规格':a.specificationsName}}</span>
  38. </view>
  39. </view>
  40. <view class="uni-media-list-text-top" style="border-bottom: 1px solid #f8f8f8;">
  41. <text class="tit-text">米 数</text>
  42. <view style="display: flex; justify-content: right; width: 70%;">
  43. <input class="uni-input" type="number" :value="getIntegerPart(a.number,0)"
  44. @change="setInfoBoNumber(key,index,$event.target.value,0)" maxlength="6"
  45. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  46. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  47. <input class="uni-input" type="number" :value="getIntegerPart(a.number,1)"
  48. @change="setInfoBoNumber(key,index,$event.target.value,1)" maxlength="1"
  49. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  50. </view>
  51. </view>
  52. <button v-if="index!=0" @click="btnDel(key,index)" class="sc-btn">删除</button>
  53. </view>
  54. <button @click="btnAdd(key,index)" class="tj-btn">添加</button>
  55. </view>
  56. </view>
  57. <view v-if="title!='回填、撤场'">
  58. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  59. <image :src="loadImgSrc('updateimg.png')" mode=""
  60. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('other',key)">
  61. </image>
  62. <view v-for="(item,index) in value.zEngiineeringPhotoBoList" :key="index"
  63. style="position: relative;">
  64. <view
  65. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  66. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  67. @click="showPhoto(index,value.zEngiineeringPhotoBoList)">
  68. </image>
  69. </view>
  70. <view v-else>
  71. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  72. </view>
  73. <view @click="remove(index,key)"
  74. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  75. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  76. </image>
  77. </view>
  78. </view>
  79. </view>
  80. </view>
  81. <view v-else>
  82. <view class="uni-common-mt" style="width: 100%;">
  83. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  84. #000;margin-top: 5px; margin-left: 8px;">回填前照片:</text>
  85. </view>
  86. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  87. <image :src="loadImgSrc('updateimg.png')" mode=""
  88. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('htq',key)">
  89. </image>
  90. <view v-for="(item,index) in value.zEngiineeringPhotoBoListOne" :key="index"
  91. style="position: relative;">
  92. <view
  93. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  94. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  95. @click="showPhoto(index,value.zEngiineeringPhotoBoListOne)">
  96. </image>
  97. </view>
  98. <view v-else>
  99. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  100. </view>
  101. <view @click="removeht(index,key,'htq')"
  102. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  103. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  104. </image>
  105. </view>
  106. </view>
  107. </view>
  108. <view class="uni-common-mt" style="width: 100%;">
  109. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  110. #000;margin-top: 5px;margin-left: 8px;">警示带铺设照片:</text>
  111. </view>
  112. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  113. <image :src="loadImgSrc('updateimg.png')" mode=""
  114. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('jsdps',key)">
  115. </image>
  116. <view v-for="(item,index) in value.zEngiineeringPhotoBoListTwo" :key="index"
  117. style="position: relative;">
  118. <view
  119. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  120. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  121. @click="showPhoto(index,value.zEngiineeringPhotoBoListTwo)">
  122. </image>
  123. </view>
  124. <view v-else>
  125. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  126. </view>
  127. <view @click="removeht(index,key,'jsdps')"
  128. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  129. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  130. </image>
  131. </view>
  132. </view>
  133. </view>
  134. <view class="uni-common-mt" style="width: 100%;">
  135. <text class="uni-title uni-common-pl" style=" font-size: 13px;color:
  136. #000;margin-top: 5px;margin-left: 8px;">回填后照片:</text>
  137. </view>
  138. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px;">
  139. <image :src="loadImgSrc('updateimg.png')" mode=""
  140. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('hth',key)">
  141. </image>
  142. <view v-for="(item,index) in value.zEngiineeringPhotoBoListThree" :key="index"
  143. style="position: relative;">
  144. <view
  145. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' || item.substring(item.length - 3) == 'jpeg'">
  146. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  147. @click="showPhoto(index,value.zEngiineeringPhotoBoListThree)">
  148. </image>
  149. </view>
  150. <view v-else>
  151. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  152. </view>
  153. <view @click="removeht(index,key,'hth')"
  154. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  155. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  156. </image>
  157. </view>
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. </view>
  163. </view>
  164. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
  165. subtitleKey="id">
  166. </SelectPicker>
  167. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
  168. titleKey="dictLabel" subtitleKey="dictValue" v-model="name"></SelectPicker>
  169. <view class="action-btn" v-if="hideButton==false">
  170. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认</button>
  171. </view>
  172. </scroll-view>
  173. </template>
  174. <script>
  175. import SelectPicker from '../../components/selectPicker/select_picker.vue'
  176. import {
  177. getDicts
  178. } from "@/api/system/dict/data";
  179. import {
  180. getToken
  181. } from '../../utils/auth';
  182. import user from '@/store/modules/user'
  183. import {
  184. getEngineeringHistoryListNew,
  185. getEnginMaterialQualityList,
  186. PutengineeringNew,
  187. getEnginSpecificationsList
  188. } from '@/api/common'
  189. export default {
  190. components: {
  191. SelectPicker,
  192. },
  193. data() {
  194. return {
  195. // playVideo: false,//视频播放放大
  196. // playVideoSrc:'',
  197. selectZbfList: [],
  198. dictOptions: [],
  199. openDict: false,
  200. dataIndex: 0, //数据用第几条
  201. selectIndex: 0, //材质规格用的第几条
  202. imageIndex: 0,
  203. headers: {
  204. Authorization: "Bearer " + getToken()
  205. },
  206. nodeId: '',
  207. type: '',
  208. title: '',
  209. dataJson: '',
  210. enginClassification: '',
  211. enginType: '',
  212. enginClassValue: '',
  213. selectList: [],
  214. open: false,
  215. selectType: '',
  216. hideButton: false,
  217. }
  218. },
  219. onLoad(options) {
  220. if ('params' in options) {
  221. let e = JSON.parse(decodeURIComponent(options.params));
  222. this.nodeId = e.id;
  223. this.type = e.type;
  224. getEngineeringHistoryListNew(this.nodeId, this.type).then(response => {
  225. if (response.data.zEngineeringNodeBo != null) {
  226. this.hideButton = false;
  227. this.dataJson = response.data;
  228. this.title = response.data.zEngineeringNodeBo.type;
  229. this.enginType = response.data.enginType;
  230. this.enginClassification = response.data.enginClassification;
  231. } else {
  232. this.hideButton = true;
  233. this.$modal.msg("暂无历史信息")
  234. }
  235. });
  236. }
  237. },
  238. methods: {
  239. //关闭弹窗
  240. close(e) {
  241. this.open = false
  242. },
  243. btnAdd(key, index) {
  244. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.push({
  245. 'materialQuality': '',
  246. 'materialQualityName': '',
  247. 'number': '',
  248. 'specifications': '',
  249. 'specificationsName': ''
  250. });
  251. },
  252. btnDel(key, index) {
  253. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo.splice(index, 1);
  254. },
  255. pickerShow(e, index, indexTwo) {
  256. this.dataIndex = index;
  257. this.selectIndex = indexTwo; //材质规格 第几条
  258. this.selectType = e;
  259. if (e == 'cz') {
  260. this.open = true;
  261. getEnginMaterialQualityList("工业工程").then(response => {
  262. this.selectList = response.data;
  263. });
  264. }
  265. if (e == 'gg') {
  266. if (this.isEmpty(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
  267. .zEngineeringMaterialBo[this.selectIndex].materialQuality)) {
  268. this.$modal.msg('请选择材质')
  269. } else {
  270. this.open = true;
  271. getEnginSpecificationsList(this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex]
  272. .zEngineeringMaterialBo[this.selectIndex].materialQuality).then(res => {
  273. this.selectList = res.data
  274. })
  275. }
  276. }
  277. },
  278. changeSelect(item, index) {
  279. this.open = false;
  280. if (this.selectType == 'cz') {
  281. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  282. .selectIndex]
  283. .materialQuality = item.id;
  284. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  285. .selectIndex]
  286. .materialQualityName = item.name;
  287. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  288. .selectIndex]
  289. .specifications = '';
  290. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  291. .selectIndex]
  292. .specificationsName = '';
  293. } else if (this.selectType == 'gg') {
  294. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  295. .selectIndex]
  296. .specifications = item.id;
  297. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[this.dataIndex].zEngineeringMaterialBo[this
  298. .selectIndex]
  299. .specificationsName = item.name;
  300. }
  301. },
  302. // 截取小数点前的字符串
  303. getIntegerPart(numStr, i) {
  304. return numStr.toString().split('.')[i] == undefined ? '0' : numStr.toString().split('.')[i];
  305. },
  306. setInfoBoNumber(key, index, number, i) {
  307. let Ynumber = this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index]
  308. .number;
  309. let resAry = Ynumber.toString().split('.');
  310. resAry[i] = number
  311. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key].zEngineeringMaterialBo[index].number = resAry
  312. .join('.');
  313. },
  314. bindTextAreaBlur(e, index) {
  315. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[index].remark = e;
  316. },
  317. removeht(index, key, type) {
  318. uni.showModal({
  319. title: '提示',
  320. content: '是否删除该图片或视频?',
  321. success: (res) => {
  322. if (res.confirm) {
  323. if (type == 'htq') {
  324. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  325. .zEngiineeringPhotoBoListOne
  326. .splice(index, 1)
  327. } else if (type == 'jsdps') {
  328. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  329. .zEngiineeringPhotoBoListTwo
  330. .splice(index, 1)
  331. } else if (type == 'hth') {
  332. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList[key]
  333. .zEngiineeringPhotoBoListThree
  334. .splice(index, 1)
  335. }
  336. }
  337. }
  338. })
  339. },
  340. remove(index, key) {
  341. uni.showModal({
  342. title: '提示',
  343. content: '是否删除该图片或视频?',
  344. success: (res) => {
  345. if (res.confirm) {
  346. this.dataJson.zEngineeringNodeBo
  347. .zEngineeringInfoBoList[key]
  348. .zEngiineeringPhotoBoList.splice(index, 1)
  349. }
  350. }
  351. })
  352. },
  353. choose(type, index) {
  354. this.dataIndex = index;
  355. let _this = this;
  356. uni.showActionSheet({
  357. title: '上传',
  358. itemList: ['图片', '视频'],
  359. success: (res) => {
  360. if (res.tapIndex == 0) {
  361. this.chooseimage(type)
  362. } else {
  363. this.choosevideo(type)
  364. }
  365. }
  366. })
  367. },
  368. chooseimage(e) {
  369. let _this = this;
  370. uni.chooseImage({
  371. sizeType: ['album', 'camera'],
  372. success(resp) {
  373. resp.tempFiles.forEach((item, index) => {
  374. const task = uni.uploadFile({
  375. url: _this.$HTTP + `/obs`,
  376. filePath: item.path,
  377. name: 'file',
  378. formData: {},
  379. header: _this.headers,
  380. success: res => {
  381. let data = JSON.parse(res.data);
  382. if (![200].includes(data.code)) {
  383. _this.$modal.msg(data.msg)
  384. } else {
  385. if (_this.progress === 100) {
  386. if (e == 'other') {
  387. _this.dataJson.zEngineeringNodeBo
  388. .zEngineeringInfoBoList[_this.dataIndex]
  389. .zEngiineeringPhotoBoList.push(data.data
  390. .url);
  391. } else if (e == 'htq') {
  392. _this.dataJson.zEngineeringNodeBo
  393. .zEngineeringInfoBoList[_this.dataIndex]
  394. .zEngiineeringPhotoBoListOne.push(data.data
  395. .url);
  396. } else if (e == 'jsdps') {
  397. _this.dataJson.zEngineeringNodeBo
  398. .zEngineeringInfoBoList[_this.dataIndex]
  399. .zEngiineeringPhotoBoListTwo.push(data.data
  400. .url);
  401. } else if (e == 'hth') {
  402. _this.dataJson.zEngineeringNodeBo
  403. .zEngineeringInfoBoList[_this.dataIndex]
  404. .zEngiineeringPhotoBoListThree.push(data
  405. .data
  406. .url);
  407. }
  408. _this.$modal.msg('上传成功!')
  409. }
  410. }
  411. },
  412. fail: e => {
  413. _this.$modal.msg('上传失败!')
  414. },
  415. complete: res => {
  416. uni.hideLoading();
  417. _this.uploading = false;
  418. }
  419. });
  420. task.onProgressUpdate(res => {
  421. _this.progress = res.progress;
  422. uni.showLoading({
  423. title: '上传中'
  424. })
  425. if (_this.progress != 100) {
  426. _this.loading = false
  427. } else {
  428. _this.loading = true
  429. }
  430. });
  431. })
  432. },
  433. })
  434. },
  435. choosevideo(e) {
  436. let _this = this;
  437. uni.chooseVideo({
  438. sourceType: ['album', 'camera'],
  439. maxDuration: 30,
  440. success(resp) {
  441. const task = uni.uploadFile({
  442. url: _this.$HTTP + `/obs`,
  443. filePath: resp.tempFilePath,
  444. name: 'file',
  445. formData: {},
  446. header: _this.headers,
  447. success: res => {
  448. let data = JSON.parse(res.data);
  449. if (![200].includes(res.statusCode)) {
  450. this.uploadError(index, data);
  451. } else {
  452. //上传成功
  453. if (_this.progress === 100) {
  454. if (e == 'other') {
  455. _this.dataJson.zEngineeringNodeBo
  456. .zEngineeringInfoBoList[_this.dataIndex]
  457. .zEngiineeringPhotoBoList.push(data.data.url);
  458. } else if (e == 'htq') {
  459. _this.dataJson.zEngineeringNodeBo
  460. .zEngineeringInfoBoList[_this.dataIndex]
  461. .zEngiineeringPhotoBoListOne.push(data.data.url);
  462. } else if (e == 'jsdps') {
  463. _this.dataJson.zEngineeringNodeBo
  464. .zEngineeringInfoBoList[_this.dataIndex]
  465. .zEngiineeringPhotoBoListTwo.push(data.data.url);
  466. } else if (e == 'hth') {
  467. _this.dataJson.zEngineeringNodeBo
  468. .zEngineeringInfoBoList[_this.dataIndex]
  469. .zEngiineeringPhotoBoListThree.push(data.data.url);
  470. }
  471. _this.$modal.msg('上传成功!')
  472. }
  473. }
  474. },
  475. fail: e => {
  476. _this.$modal.msg('上传失败!')
  477. this.uploadError(index, e);
  478. },
  479. complete: res => {
  480. uni.hideLoading();
  481. _this.uploading = false;
  482. }
  483. });
  484. task.onProgressUpdate(res => {
  485. _this.progress = res.progress;
  486. uni.showLoading({
  487. title: '上传中'
  488. })
  489. if (_this.progress != 100) {
  490. _this.loading = false
  491. } else {
  492. _this.loading = true
  493. }
  494. });
  495. },
  496. })
  497. },
  498. showPhoto(index, arr) {
  499. let newArr = [];
  500. arr.forEach((item, index) => {
  501. if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
  502. item.substring(item.length - 4) == 'jpeg') {
  503. newArr.push(item)
  504. }
  505. });
  506. uni.previewImage({
  507. current: index,
  508. urls: newArr,
  509. })
  510. },
  511. // showVideo(arr) {
  512. // this.playVideo = true;
  513. // this.playVideoSrc = arr;
  514. // },
  515. // closeVideo(){
  516. // this.playVideo = false;
  517. // },
  518. isEmpty(str) {
  519. return (!str || 0 === str.length);
  520. },
  521. isEdit(item) {
  522. var isShow = item.createBy == this.$user.state.name;
  523. return isShow;
  524. },
  525. submit() {
  526. let isSubmit = true;
  527. // if (this.title == '调压柜') {
  528. // this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  529. // if (res.boxBrand.length == 0) {
  530. // this.$modal.msg("请上传调压箱铭牌照片");
  531. // isSubmit = false;
  532. // }
  533. // if (res.stonePowder.length == 0) {
  534. // this.$modal.msg("请上传调压箱内石粉回填照片");
  535. // isSubmit = false;
  536. // }
  537. // if (res.lightning.length == 0) {
  538. // this.$modal.msg("请上传调压箱防雷接地照片");
  539. // isSubmit = false;
  540. // }
  541. // if (res.bottomLeg.length == 0) {
  542. // this.$modal.msg("请上传调压箱底腿连接照片");
  543. // isSubmit = false;
  544. // }
  545. // if (res.groundHardening.length == 0) {
  546. // this.$modal.msg("请上传调压箱护栏及地面硬化(远景)照片");
  547. // isSubmit = false;
  548. // }
  549. // })
  550. // } else {
  551. this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  552. if (res.createBy == this.$user.state.name) {
  553. if (this.title == '焊接、防腐' || this.title == '架空管线' || this.title ==
  554. '下管' || this.title == '沟下连头' || this.title == '焊接') {
  555. res.zEngineeringMaterialBo.forEach((itme) => {
  556. if (itme.specifications == '') {
  557. this.$modal.msg("请选择规格");
  558. isSubmit = false;
  559. }
  560. if (itme.number == '') {
  561. this.$modal.msg("请输入米数");
  562. isSubmit = false;
  563. }
  564. if (this.getIntegerPart(itme.number, 0) == '') {
  565. this.$modal.msg("请输入米数");
  566. isSubmit = false;
  567. }
  568. })
  569. }
  570. if (this.title == '回填、撤场') {
  571. if (res.zEngiineeringPhotoBoListOne.length <= 0) {
  572. this.$modal.msg('请上传回填前照片')
  573. isSubmit = false;
  574. }
  575. if (res.zEngiineeringPhotoBoListTwo.length <= 0) {
  576. this.$modal.msg('请上传警示带铺设照片')
  577. isSubmit = false;
  578. }
  579. if (res.zEngiineeringPhotoBoListThree.length <= 0) {
  580. this.$modal.msg('请上传回填后照片')
  581. isSubmit = false;
  582. }
  583. } else {
  584. if (res.zEngiineeringPhotoBoList.length == 0) {
  585. this.$modal.msg("请上传照片");
  586. isSubmit = false;
  587. }
  588. }
  589. }
  590. })
  591. // this.dataJson.zEngineeringNodeBo.zEngineeringInfoBoList.forEach((res) => {
  592. // if (res.zEngiineeringPhotoBoList.length == 0) {
  593. // this.$modal.msg("请上传照片");
  594. // isSubmit = false;
  595. // }
  596. // })
  597. //}
  598. if (!isSubmit) {
  599. return
  600. }
  601. PutengineeringNew(this.dataJson).then(
  602. response => {
  603. if (response.code == '200') {
  604. uni.hideLoading()
  605. uni.showToast({
  606. title: response.msg,
  607. icon: 'none',
  608. duration: 2000
  609. });
  610. setTimeout(function() {
  611. uni.navigateBack();
  612. }, 1000)
  613. }
  614. });
  615. }
  616. }
  617. }
  618. </script>
  619. <style lang="scss">
  620. .uni-media-list-body {
  621. background: #fff;
  622. border: 1px solid #eee;
  623. border-radius: 40rpx;
  624. margin: 20rpx;
  625. padding: 10rpx 0 40rpx;
  626. box-shadow: 0 0 5px #eee;
  627. }
  628. .uni-media-list-text-top {
  629. display: flex;
  630. align-items: center;
  631. justify-content: space-between;
  632. padding: 10px;
  633. position: relative;
  634. }
  635. .to-right-icon {
  636. width: 15px;
  637. height: 15px;
  638. position: absolute;
  639. top: 50%;
  640. transform: translateY(-50%);
  641. }
  642. .share {
  643. width: 100%;
  644. height: 100%;
  645. }
  646. .tit-text {
  647. color: #4f535a;
  648. margin-right: 20rpx;
  649. }
  650. .normal-text {}
  651. .cz-style {
  652. background: #e8f4f9;
  653. margin: 20rpx;
  654. padding: 10rpx;
  655. border-radius: 20rpx;
  656. border: 1px solid #d4e3f0;
  657. }
  658. .uni-media-list-text-top {
  659. font-size: 14px;
  660. color: #696969;
  661. padding: 20rpx 20rpx;
  662. border-bottom: 1px solid #eee;
  663. display: flex;
  664. align-items: center;
  665. }
  666. .share-box {
  667. width: 100%;
  668. height: 100%;
  669. position: fixed;
  670. top: 0rpx;
  671. left: 0rpx;
  672. bottom: 0rpx;
  673. right: 0rpx;
  674. background-color: rgba(0, 0, 0, 0.4);
  675. transition: .3s;
  676. z-index: 999;
  677. }
  678. // 进入分享动画
  679. .share-show {
  680. transition: all 0.3s ease;
  681. transform: translateY(0%) !important;
  682. border-radius: 20px 20px 0px 0px;
  683. }
  684. .scroll-Y {
  685. height: 58vh;
  686. }
  687. // 离开分享动画
  688. .share-item {
  689. position: fixed;
  690. left: 0;
  691. bottom: 0;
  692. width: 100%;
  693. height: 70%;
  694. background-color: #FFFFFF;
  695. transition: all 0.3s ease;
  696. transform: translateY(100%);
  697. z-index: 1999;
  698. .share-to {
  699. width: 100%;
  700. height: 30px;
  701. display: flex;
  702. justify-content: center;
  703. margin: 30rpx 0;
  704. align-items: center;
  705. }
  706. .content {
  707. width: 100%;
  708. height: auto;
  709. display: flex;
  710. flex-wrap: wrap;
  711. .block {
  712. width: 100%;
  713. display: flex;
  714. flex-direction: column;
  715. justify-content: center;
  716. align-items: left;
  717. height: auto;
  718. image {
  719. width: 80rpx;
  720. height: 80rpx;
  721. }
  722. text {
  723. margin-top: 16rpx;
  724. font-size: 28rpx;
  725. color: #606266;
  726. }
  727. }
  728. }
  729. .cancel {
  730. width: 100%;
  731. height: 3rem;
  732. display: flex;
  733. justify-content: center;
  734. align-items: center;
  735. border-top: 1rpx solid #E4E7ED;
  736. }
  737. }
  738. .uni-media-list-text-top {
  739. display: flex;
  740. align-items: center;
  741. justify-content: space-between;
  742. padding: 10px;
  743. position: relative;
  744. }
  745. .uni-list {
  746. border: 1xp solid #eee;
  747. }
  748. .to-right-icon {
  749. width: 15px;
  750. height: 15px;
  751. position: absolute;
  752. top: 50%;
  753. transform: translateY(-50%);
  754. }
  755. .text {
  756. font-size: 16px;
  757. color: #333;
  758. }
  759. .tj-btn {
  760. height: 69rpx;
  761. background: #3184f0;
  762. border-radius: 6rpx;
  763. font-size: 25rpx;
  764. font-weight: 400;
  765. width: 100%;
  766. color: #FFFFFF;
  767. line-height: 69rpx;
  768. margin: 40rpx 70rpx;
  769. }
  770. .sc-btn {
  771. height: 69rpx;
  772. background: #f0686b;
  773. border-radius: 6rpx;
  774. font-size: 25rpx;
  775. font-weight: 400;
  776. color: #FFFFFF;
  777. line-height: 69rpx;
  778. margin: 40rpx;
  779. }
  780. // .gesture-area {
  781. // //加浮动弹窗
  782. // width: 100%;
  783. // height: 100%;
  784. // }
  785. </style>