overhead.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  1. <template>
  2. <scroll-view>
  3. <view class="background">
  4. <view class="uni-list">
  5. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  6. <view>
  7. 行政区
  8. </view>
  9. <view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
  10. @click="pickerShow('xzq')">
  11. <span style="color: darkgray;">请选择行政区</span>
  12. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  13. </view>
  14. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
  15. <span style="color: black;">{{XZQValue.dictLabel}}</span>
  16. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="uni-list">
  21. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  22. <view>
  23. 小区
  24. </view>
  25. <view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  26. @click="pickerShow('xq')">
  27. <span style="color: darkgray;">请选择小区</span>
  28. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  29. </view>
  30. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
  31. <span style="color: black;">{{XQValue.name}}</span>
  32. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="uni-list">
  37. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  38. <view class="uni-list-cell-left">
  39. 楼栋
  40. </view>
  41. <view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  42. @click="pickerShow('ld')">
  43. <span style="color: darkgray;">请选择楼栋</span>
  44. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  45. </view>
  46. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
  47. <span style="color: black;">{{LDValue.name}}</span>
  48. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="uni-list" style="margin-top: 10;">
  53. <view class="container">
  54. <view class="uni-list-cell-left">
  55. 单元
  56. </view>
  57. <view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;"
  58. @click="pickerShow('dy')">
  59. <span style="color: darkgray;">请选择单元</span>
  60. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  61. </view>
  62. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
  63. <span style="color: black;">{{DYValue.name}}</span>
  64. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  65. </view>
  66. </view>
  67. </view>
  68. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
  69. subtitleKey="id" v-model="name"></SelectPicker>
  70. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
  71. titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
  72. </view>
  73. <view class="background">
  74. <view>
  75. <view class="uni-list">
  76. <view
  77. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  78. {{objValue.enginClassValue}}
  79. <span
  80. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  81. @click="history">历史</span>
  82. </view>
  83. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  84. <view>
  85. 施工时间
  86. </view>
  87. <view @click="openDatetimePicker('sg')">
  88. <span style="color: black;">{{time}}</span>
  89. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  90. </view>
  91. </view>
  92. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  93. <view class="uni-common-mt" style="width: 100%;">
  94. <text class="uni-title uni-common-pl">施工内容</text>
  95. <view style="width: 100%;box-sizing: border-box;">
  96. <textarea class="textarea" placeholder="请输入施工内容" maxlength="255"
  97. placeholder-style="padding: 10rpx;"
  98. style="width: 100%;height: 100%;border: 1rpx solid #cccccc; border-radius: 15rpx;padding: 10rpx;line-height:normal;"
  99. auto-height v-model="projectContent"></textarea>
  100. </view>
  101. </view>
  102. </view>
  103. </view>
  104. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  105. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  106. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  107. <image :src="loadImgSrc('updateimg.png')" mode=""
  108. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"
  109. v-show="reviewStatus!='1'"></image>
  110. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  111. <view
  112. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  113. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  114. @click="showPhoto(index)">
  115. </image>
  116. </view>
  117. <view v-else>
  118. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  119. </view>
  120. <view @click="remove(index)"
  121. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  122. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  123. </image>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. </view>
  130. <view class="action-btn" v-show="reviewStatus!='1'">
  131. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
  132. </view>
  133. <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
  134. <yt-dateTimePicker ref="myPicker" @submit="handleSubmit" :start-year="2024" :end-year="2099"
  135. :time-hide="[true, true, true, true, true, true]" :time-label="['年', '月', '日', '时', '分', '秒']" />
  136. </scroll-view>
  137. </template>
  138. <script>
  139. import SelectPicker from '../../../components/selectPicker/select_picker.vue'
  140. import bottomSheet from '../../../components/bottomSheet/bottomSheet.vue'
  141. import {
  142. getDicts
  143. } from "@/api/system/dict/data";
  144. import {
  145. getAreaList,
  146. getBuildingList,
  147. getUnitList,
  148. addTearOldPipe,
  149. getEnginMaterialQualityList,
  150. getEnginSpecificationsList,
  151. getRoomProjectList,
  152. getRoomProjectId,
  153. } from '@/api/common'
  154. import {
  155. getToken
  156. } from '../../../utils/auth';
  157. export default {
  158. components: {
  159. SelectPicker,
  160. bottomSheet,
  161. },
  162. data() {
  163. return {
  164. headers: {
  165. Authorization: "Bearer " + getToken()
  166. },
  167. reviewStatus: '', //是否可以点击
  168. startDate: '2022-02-04',
  169. endDate: '2025-02-04',
  170. mode: 4,
  171. type: '',
  172. open: false,
  173. objValue: '', //上一页面传过来的值 新增接口用
  174. openDict: false,
  175. selectList: [],
  176. dictOptions: [],
  177. imgArr: [],
  178. XQValue: {},
  179. XZQValue: {},
  180. projectValue: {
  181. 'dictValue': '0'
  182. },
  183. LevelValue: {},
  184. isOkValue: '', //分段打压是否合格
  185. isOkLabel: '', //分段打压是否合格label
  186. LDValue: {},
  187. DYValue: {},
  188. FJValue: {},
  189. time: '', //施工时间
  190. timeType: '', //时间类型
  191. BackfillingTime: '', //回填时间
  192. showTime: false,
  193. specificationValue: {}, //规格
  194. projectContent: '', //施工内容
  195. materialValue: {}, //材质
  196. brandValue: {}, //品牌
  197. doorValue: {}, //上门类型
  198. SelfClosValve: {}, //自闭阀类型
  199. materialList: '', //材质list
  200. XQList: '',
  201. LDList: '',
  202. progress: 0, //上传图片进度百分比
  203. loading: false,
  204. inputNumberValue: '',
  205. title: '',
  206. historyList: {} //历史数据
  207. }
  208. },
  209. created() {
  210. this.time = this.traversalTime(new Date().getTime()) //在data里定义变量-nowTime
  211. },
  212. onLoad(options) {
  213. if ('params' in options) {
  214. this.objValue = JSON.parse(decodeURIComponent(options.params));
  215. if (this.objValue.enginType == `old_renovation`) {
  216. this.title = '旧改工程-架空'
  217. } else if (this.objValue.enginType == `new_built`) {
  218. this.title = '新建工程-架空'
  219. }
  220. uni.setNavigationBarTitle({
  221. title: this.title
  222. })
  223. }
  224. },
  225. methods: {
  226. // 打开picker
  227. openDatetimePicker(type) {
  228. this.timeType = type;
  229. this.$refs.myPicker.show();
  230. },
  231. // 关闭picker
  232. closeDatetimePicker() {
  233. this.$refs.myPicker.hide();
  234. },
  235. handleSubmit(e) {
  236. if (this.timeType == 'ht') {
  237. this.BackfillingTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
  238. } else {
  239. this.time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
  240. }
  241. },
  242. //获取当前时间
  243. traversalTime(timestamp) {
  244. //timestamp(时间戳)是整数,否则要parseInt转换
  245. let time = new Date(timestamp);
  246. let y = time.getFullYear();
  247. let m = time.getMonth() + 1;
  248. let d = time.getDate();
  249. let h = time.getHours();
  250. let mm = time.getMinutes();
  251. let s = time.getSeconds();
  252. return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this.addTimes(
  253. mm) + ':' + this.addTimes(s);
  254. },
  255. addTimes(m) {
  256. return m < 10 ? '0' + m : m
  257. },
  258. //判断是否选择
  259. isEmpty(str) {
  260. return (!str || 0 === str.length);
  261. },
  262. // 显示历史弹窗
  263. handleShowSheet() {
  264. this.shareState = true;
  265. },
  266. // 隐藏历史弹窗
  267. handleHiddenShare() {
  268. this.shareState = false;
  269. },
  270. showPhoto(index) {
  271. let newArr = [];
  272. this.imgArr.forEach((item, index) => {
  273. if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg' ||
  274. item.substring(item.length - 4) == 'jpeg') {
  275. newArr.push(item)
  276. }
  277. });
  278. uni.previewImage({
  279. current: index,
  280. urls: newArr,
  281. })
  282. },
  283. remove(index) {
  284. uni.showModal({
  285. title: '提示',
  286. content: '是否删除该图片或视频?',
  287. success: (res) => {
  288. if (res.confirm) {
  289. this.imgArr.splice(index, 1)
  290. if (this.imgArr.length <= 0) {
  291. this.photo = true;
  292. }
  293. }
  294. }
  295. })
  296. },
  297. choose() {
  298. let _this = this;
  299. uni.showActionSheet({
  300. title: '上传',
  301. itemList: ['图片', '视频'],
  302. success: (res) => {
  303. if (res.tapIndex == 0) {
  304. this.chooseimage()
  305. } else {
  306. this.choosevideo()
  307. }
  308. }
  309. })
  310. },
  311. chooseimage() {
  312. let _this = this;
  313. uni.chooseImage({
  314. sizeType: ['album', 'camera'],
  315. success(resp) {
  316. resp.tempFiles.forEach((item, index) => {
  317. const task = uni.uploadFile({
  318. url: _this.$HTTP + `/obs`,
  319. filePath: item.path,
  320. name: 'file',
  321. formData: {},
  322. header: _this.headers,
  323. success: res => {
  324. // 判断是否json字符串,将其转为json格式
  325. // let data = _this.$u.test.jsonString(res
  326. // .data) ? JSON.parse(res.data) : res.data;
  327. let data = JSON.parse(res.data);
  328. if (![200].includes(data.code)) {
  329. // this.uploadError(index, data);
  330. _this.$modal.msg(data.msg)
  331. } else {
  332. if (_this.progress === 100) {
  333. _this.imgArr.push(data.data.url)
  334. _this.$modal.msg('上传成功!')
  335. _this.photo = false;
  336. }
  337. }
  338. },
  339. fail: e => {
  340. _this.$modal.msg('上传失败!')
  341. //_this.uploadError(index, e);
  342. },
  343. complete: res => {
  344. uni.hideLoading();
  345. _this.uploading = false;
  346. }
  347. });
  348. task.onProgressUpdate(res => {
  349. _this.progress = res.progress;
  350. uni.showLoading({
  351. title: '上传中'
  352. })
  353. if (_this.progress != 100) {
  354. _this.loading = false
  355. } else {
  356. _this.loading = true
  357. }
  358. });
  359. })
  360. },
  361. })
  362. },
  363. choosevideo() {
  364. let _this = this;
  365. uni.chooseVideo({
  366. sourceType: ['album', 'camera'],
  367. maxDuration: 30,
  368. success(resp) {
  369. const task = uni.uploadFile({
  370. url: _this.$HTTP + `/obs`,
  371. filePath: resp.tempFilePath,
  372. name: 'file',
  373. formData: {},
  374. header: _this.headers,
  375. success: res => {
  376. // 判断是否json字符串,将其转为json格式
  377. let data = JSON.parse(res.data);
  378. if (![200].includes(res.statusCode)) {
  379. this.uploadError(index, data);
  380. } else {
  381. //上传成功
  382. if (_this.progress === 100) {
  383. _this.imgArr.push(data.data.url)
  384. _this.$modal.msg('上传成功!')
  385. _this.photo = false;
  386. }
  387. }
  388. },
  389. fail: e => {
  390. _this.$modal.msg('上传失败!')
  391. this.uploadError(index, e);
  392. },
  393. complete: res => {
  394. uni.hideLoading();
  395. _this.uploading = false;
  396. }
  397. });
  398. task.onProgressUpdate(res => {
  399. _this.progress = res.progress;
  400. uni.showLoading({
  401. title: '上传中'
  402. })
  403. if (_this.progress != 100) {
  404. _this.loading = false
  405. } else {
  406. _this.loading = true
  407. }
  408. });
  409. },
  410. })
  411. },
  412. pickerShow(e) {
  413. this.type = e; //赋值类型
  414. if (e == 'gczq') { //工程周期
  415. this.openDict = true;
  416. getDicts("engin_cycle").then(response => {
  417. this.dictOptions = response.data;
  418. });
  419. } else if (e == 'xzq') { //行政区
  420. if (this.isEmpty(this.projectValue.dictValue)) {
  421. this.$modal.msg('请选择工程周期')
  422. } else {
  423. this.openDict = true;
  424. getDicts("district").then(response => {
  425. this.dictOptions = response.data;
  426. });
  427. }
  428. //this.selectList = this.dictOptions;
  429. } else if (e == 'xq') { //小区
  430. if (this.isEmpty(this.XZQValue.dictValue)) {
  431. getAreaList('').then(res => {
  432. this.XQList = res.data;
  433. this.open = true;
  434. this.selectList = this.XQList;
  435. })
  436. } else {
  437. this.open = true;
  438. this.selectList = this.XQList;
  439. }
  440. } else if (e == 'ld') { //楼栋
  441. if (this.isEmpty(this.XQValue.id)) {
  442. this.$modal.msg('请选择小区')
  443. } else {
  444. this.open = true;
  445. this.selectList = this.LDList;
  446. }
  447. } else if (e == 'dy') { //单元
  448. if (this.isEmpty(this.LDValue.id)) {
  449. this.$modal.msg('请选择楼栋')
  450. } else {
  451. this.open = true;
  452. this.selectList = this.DYList;
  453. }
  454. }
  455. },
  456. changeSelectDict(item, index) {
  457. this.openDict = false;
  458. if (this.type == 'isok') {
  459. this.isOkValue = item
  460. } else if (this.type == 'gczq') {
  461. this.projectValue = item
  462. if (!this.isEmpty(this.LDValue.id)) {
  463. // 工程周期切换
  464. this.getStatus();
  465. }
  466. } else if (this.type == 'xzq') {
  467. this.XZQValue = item;
  468. //根据行政区id获取小区数据
  469. this.XQValue = ''; //重置小区数据
  470. this.LDValue = ''; //重置楼栋数据
  471. this.DYValue = ''; //重置单元数据
  472. getAreaList(item.dictValue).then(res => {
  473. this.XQList = res.data;
  474. })
  475. }
  476. },
  477. changeSelect(item, index) {
  478. // this.index = index;
  479. // this.address = item.communityName;
  480. this.open = false;
  481. if (this.type == 'xq') {
  482. this.XZQValue = {
  483. dictValue: item.district,
  484. dictLabel: item.districtName
  485. };
  486. this.XQValue = item;
  487. //根据小区id 获取楼栋数据
  488. this.LDValue = ''; //重置楼栋数据
  489. this.DYValue = ''; //重置单元数据
  490. this.FJValue = ''; //重置房间数据
  491. getBuildingList(item.id).then(res => {
  492. this.LDList = res.data
  493. })
  494. } else if (this.type == 'ld') {
  495. this.LDValue = item;
  496. if (!this.isEmpty(this.projectValue.dictValue)) {
  497. this.getStatus();
  498. }
  499. //根据楼栋ID 获取单元数据
  500. this.DYValue = ''; //重置单元数据
  501. this.FJValue = ''; //重置房间数据
  502. getUnitList(item.id).then(res => {
  503. this.DYList = res.data
  504. })
  505. } else if (this.type == 'dy') {
  506. this.DYValue = item;
  507. if (!this.isEmpty(this.projectValue.dictValue)) {
  508. this.getStatus();
  509. }
  510. }
  511. },
  512. //关闭弹窗
  513. close(e) {
  514. this.open = false
  515. },
  516. //关闭弹窗
  517. closeDict(e) {
  518. this.openDict = false
  519. },
  520. getStatus() {
  521. let unitId = '';
  522. let houseId = '';
  523. if (this.isEmpty(this.DYValue.id)) {
  524. unitId = '';
  525. } else {
  526. unitId = this.DYValue.id
  527. }
  528. let param = {
  529. areaId: this.XQValue.id, // 小区id
  530. buildingId: this.LDValue.id, // 楼宇id
  531. unitId: unitId, // 单元id
  532. houseId: houseId, // 房间id
  533. enginCycle: this.projectValue.dictValue, // 工程周期
  534. enginType: this.objValue.enginType, //写死 上一页面传过来的
  535. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  536. }
  537. getRoomProjectId(param).then(res => {
  538. if (res.code == '200') {
  539. if (res.data != null && res.data.zEngineeringNodeBoList != null) {
  540. res.data.zEngineeringNodeBoList.forEach((item, index) => {
  541. if (this.objValue.enginClassValue == item.type) {
  542. this.reviewStatus = item.reviewStatus;
  543. if (item.reviewStatus == '1')
  544. this.$modal.msg('当前工程已结束')
  545. }
  546. })
  547. } else {
  548. this.reviewStatus = '' //置空
  549. }
  550. } else {
  551. this.$modal.msg(res.msg)
  552. this.reviewStatus = '' //置空
  553. }
  554. })
  555. },
  556. //提交数据
  557. submit() {
  558. if (this.isEmpty(this.projectValue.dictValue)) {
  559. this.$modal.msg("请选择工程周期")
  560. return
  561. }
  562. if (this.isEmpty(this.XZQValue.dictValue)) {
  563. this.$modal.msg("请选择行政区")
  564. return
  565. }
  566. if (this.isEmpty(this.XQValue.id)) {
  567. this.$modal.msg("请选择小区")
  568. return
  569. } else if (this.isEmpty(this.LDValue.id)) {
  570. this.$modal.msg("请选择楼栋")
  571. }
  572. if (this.imgArr.length <= 0) {
  573. this.$modal.msg('请上传照片或视频')
  574. return
  575. }
  576. if (this.loading == false) {
  577. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  578. return
  579. }
  580. //提交
  581. this.onsubmit();
  582. },
  583. onsubmit() {
  584. //this.$modal.loading('提交中')
  585. let unitId = '';
  586. let houseId = '';
  587. let buildingId = '';
  588. if (this.isEmpty(this.DYValue.id)) {
  589. unitId = '';
  590. } else {
  591. unitId = this.DYValue.id
  592. }
  593. //提交
  594. let param = {
  595. district: this.XZQValue.dictValue,
  596. areaId: this.XQValue.id,
  597. buildingId: this.LDValue.id,
  598. unitId: unitId,
  599. houseId: houseId, //传空
  600. enginType: this.objValue.enginType, //写死 上一页面传过来的 新建/旧改
  601. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  602. enginCycle: this.projectValue.dictValue, //工程周期
  603. zEngineeringNodeBo: {
  604. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  605. zEngineeringInfoBo: {
  606. //constructAccordingDrawings: this.isCheck, //是否按图纸施工
  607. segmentedCompressionQualified: this.isOkValue, // 分段打压是否台格
  608. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  609. constructTime: this.time, //施工时间
  610. backfillTime: this.BackfillingTime, // 回填时间
  611. remark: this.projectContent, //施工内容
  612. // headName: this.user.nickName, // 负责人名称
  613. // headPhone: this.user.phonenumber, // 负责人电话
  614. zEngineeringMaterialBo: [{
  615. materialQuality: this.materialValue.id, //材质
  616. specifications: this.specificationValue.id, //规格
  617. number: this.inputNumberValue //数量
  618. }]
  619. }
  620. }
  621. }
  622. uni.showLoading()
  623. addTearOldPipe(param).then(res => {
  624. if (res.code == '200') {
  625. uni.hideLoading()
  626. uni.showToast({
  627. title: res.msg,
  628. icon: 'none',
  629. //显示持续时间为 3秒
  630. duration: 2000
  631. });
  632. setTimeout(function() {
  633. uni.navigateBack();
  634. }, 1000)
  635. }
  636. //this.$modal.closeLoading()
  637. })
  638. },
  639. history() {
  640. if (this.isEmpty(this.projectValue.dictValue)) {
  641. this.$modal.msg("请选择工程周期")
  642. return
  643. }
  644. if (this.isEmpty(this.XZQValue.dictValue)) {
  645. this.$modal.msg("请选择行政区")
  646. return
  647. }
  648. if (this.isEmpty(this.XQValue.id)) {
  649. this.$modal.msg("请选择小区")
  650. return
  651. }
  652. if (this.isEmpty(this.LDValue.id)) {
  653. this.$modal.msg("请选择楼栋")
  654. return
  655. }
  656. let unitId = '';
  657. let houseId = '';
  658. if (this.isEmpty(this.DYValue.id)) {
  659. unitId = '';
  660. } else {
  661. unitId = this.DYValue.id
  662. }
  663. let param = {
  664. areaId: this.XQValue.id, // 小区id
  665. buildingId: this.LDValue.id, // 楼宇id
  666. unitId: unitId, // 单元id
  667. houseId: houseId, // 房间id
  668. enginCycle: this.projectValue.dictValue, // 工程周期
  669. enginType: this.objValue.enginType, //写死 上一页面传过来的 新建/旧改
  670. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  671. }
  672. getRoomProjectId(param).then(res => {
  673. if (res.code == '200') {
  674. if (res.data != null) {
  675. getRoomProjectList(res.data.id, this.objValue.enginClassValue).then(
  676. res => {
  677. this.historyList = res.data
  678. if (res.data.zEngineeringNodeBo != null) {
  679. this.showHistoryList();
  680. } else {
  681. this.$modal.msg("暂无历史信息")
  682. }
  683. })
  684. } else {
  685. this.$modal.msg("暂无工程信息")
  686. }
  687. } else {
  688. this.$modal.msg(res.msg)
  689. }
  690. })
  691. },
  692. showHistoryList() {
  693. this.$refs.refShare.handleShowShare();
  694. }
  695. }
  696. }
  697. </script>
  698. <style lang="scss">
  699. .container {
  700. display: flex;
  701. align-items: center;
  702. justify-content: space-between;
  703. padding: 10px;
  704. position: relative;
  705. }
  706. .uni-list {
  707. border: 1xp solid #eee;
  708. }
  709. .to-right-icon {
  710. width: 15px;
  711. height: 15px;
  712. position: absolute;
  713. top: 50%;
  714. transform: translateY(-50%);
  715. }
  716. .text {
  717. font-size: 16px;
  718. color: #333;
  719. }
  720. .background {
  721. // border: 15px solid hsla(0, 0%, 100%, .5);
  722. background: white;
  723. background-clip: padding-box;
  724. padding: 20rpx;
  725. border-radius: 20rpx;
  726. margin: 20rpx;
  727. /*从padding开始往外面裁剪背景*/
  728. }
  729. .btn {
  730. width: 715rpx;
  731. height: 69rpx;
  732. background: #79A4F0;
  733. border-radius: 6rpx;
  734. font-size: 25rpx;
  735. font-family: Microsoft YaHei;
  736. font-weight: 400;
  737. color: #FFFFFF;
  738. line-height: 69rpx;
  739. margin-top: 40rpx;
  740. margin-bottom: 100rpx;
  741. }
  742. .number {
  743. display: flex;
  744. /* 水平居中显示子元素 */
  745. align-items: flex-start;
  746. /* 垂直居中显示子元素 */
  747. justify-content: space-between;
  748. /* 左右间距等于间距大小 */
  749. padding: 10px;
  750. /* 设置padding以提高视觉效果 */
  751. }
  752. .textarea {
  753. margin-top: 10upx;
  754. width: 100%;
  755. border: 1rpx solid red;
  756. min-height: 100upx;
  757. line-height: 20px;
  758. }
  759. </style>