historyDetailMunicipal.vue 24 KB

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