overhead.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879
  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: {'dictValue':'0'},
  181. LevelValue: {},
  182. isOkValue: '', //分段打压是否合格
  183. isOkLabel: '', //分段打压是否合格label
  184. LDValue: {},
  185. DYValue: {},
  186. FJValue: {},
  187. time: '', //施工时间
  188. timeType: '', //时间类型
  189. BackfillingTime: '', //回填时间
  190. showTime: false,
  191. specificationValue: {}, //规格
  192. projectContent: '', //施工内容
  193. materialValue: {}, //材质
  194. brandValue: {}, //品牌
  195. doorValue: {}, //上门类型
  196. SelfClosValve: {}, //自闭阀类型
  197. materialList: '', //材质list
  198. XQList: '',
  199. LDList: '',
  200. progress: 0, //上传图片进度百分比
  201. loading: false,
  202. inputNumberValue: '',
  203. title: '',
  204. historyList: {} //历史数据
  205. }
  206. },
  207. created() {
  208. this.time = this.traversalTime(new Date().getTime()) //在data里定义变量-nowTime
  209. },
  210. onLoad(options) {
  211. if ('params' in options) {
  212. this.objValue = JSON.parse(decodeURIComponent(options.params));
  213. if (this.objValue.enginType == `old_renovation`) {
  214. this.title = '旧改工程-架空'
  215. } else if (this.objValue.enginType == `new_built`) {
  216. this.title = '新建工程-架空'
  217. }
  218. uni.setNavigationBarTitle({
  219. title: this.title
  220. })
  221. }
  222. },
  223. methods: {
  224. // 打开picker
  225. openDatetimePicker(type) {
  226. this.timeType = type;
  227. this.$refs.myPicker.show();
  228. },
  229. // 关闭picker
  230. closeDatetimePicker() {
  231. this.$refs.myPicker.hide();
  232. },
  233. handleSubmit(e) {
  234. if (this.timeType == 'ht') {
  235. this.BackfillingTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
  236. } else {
  237. this.time = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`;
  238. }
  239. },
  240. //获取当前时间
  241. traversalTime(timestamp) {
  242. //timestamp(时间戳)是整数,否则要parseInt转换
  243. let time = new Date(timestamp);
  244. let y = time.getFullYear();
  245. let m = time.getMonth() + 1;
  246. let d = time.getDate();
  247. let h = time.getHours();
  248. let mm = time.getMinutes();
  249. let s = time.getSeconds();
  250. return y + '-' + this.addTimes(m) + '-' + this.addTimes(d) + ' ' + this.addTimes(h) + ':' + this.addTimes(
  251. mm) + ':' + this.addTimes(s);
  252. },
  253. addTimes(m) {
  254. return m < 10 ? '0' + m : m
  255. },
  256. //判断是否选择
  257. isEmpty(str) {
  258. return (!str || 0 === str.length);
  259. },
  260. // 显示历史弹窗
  261. handleShowSheet() {
  262. this.shareState = true;
  263. },
  264. // 隐藏历史弹窗
  265. handleHiddenShare() {
  266. this.shareState = false;
  267. },
  268. showPhoto(index) {
  269. uni.previewImage({
  270. current: index,
  271. urls: this.imgArr,
  272. })
  273. },
  274. remove(index) {
  275. uni.showModal({
  276. title: '提示',
  277. content: '是否删除该图片或视频?',
  278. success: (res) => {
  279. if (res.confirm) {
  280. this.imgArr.splice(index, 1)
  281. console.log('this.imgarr', this.imgArr)
  282. if (this.imgArr.length <= 0) {
  283. this.photo = true;
  284. }
  285. }
  286. }
  287. })
  288. },
  289. choose() {
  290. let _this = this;
  291. uni.showActionSheet({
  292. title: '上传',
  293. itemList: ['图片', '视频'],
  294. success: (res) => {
  295. console.log(res)
  296. if (res.tapIndex == 0) {
  297. this.chooseimage()
  298. } else {
  299. this.choosevideo()
  300. }
  301. }
  302. })
  303. },
  304. chooseimage() {
  305. let _this = this;
  306. console.log('图片', _this.headers)
  307. uni.chooseImage({
  308. sizeType: ['album', 'camera'],
  309. success(resp) {
  310. resp.tempFiles.forEach((item, index) => {
  311. const task = uni.uploadFile({
  312. url: _this.$HTTP + `/obs`,
  313. filePath: item.path,
  314. name: 'file',
  315. formData: {},
  316. header: _this.headers,
  317. success: res => {
  318. // 判断是否json字符串,将其转为json格式
  319. console.log("结果", res)
  320. // let data = _this.$u.test.jsonString(res
  321. // .data) ? JSON.parse(res.data) : res.data;
  322. let data = JSON.parse(res.data);
  323. if (![200].includes(data.code)) {
  324. // this.uploadError(index, data);
  325. _this.$modal.msg(data.msg)
  326. } else {
  327. if (_this.progress === 100) {
  328. console.log('_this.progress', _this.progress)
  329. //console.log('data----', data)data
  330. console.log('res--', res)
  331. _this.imgArr.push(data.data.url)
  332. console.log('imgArr', _this.imgArr)
  333. _this.$modal.msg('上传成功!')
  334. _this.photo = false;
  335. }
  336. }
  337. },
  338. fail: e => {
  339. console.log(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. console.log('onProgressUpdate', res)
  351. console.log('task.onProgressUpdate', _this.progress)
  352. uni.showLoading({
  353. title: '上传中'
  354. })
  355. if (_this.progress != 100) {
  356. _this.loading = false
  357. console.log('_this.loading false', _this.loading)
  358. } else {
  359. _this.loading = true
  360. console.log('_this.loading true', _this.loading)
  361. }
  362. });
  363. })
  364. },
  365. })
  366. },
  367. choosevideo() {
  368. let _this = this;
  369. console.log('视频')
  370. uni.chooseVideo({
  371. sourceType: ['album', 'camera'],
  372. maxDuration: 30,
  373. success(resp) {
  374. const task = uni.uploadFile({
  375. url: _this.$HTTP + `/obs`,
  376. filePath: resp.tempFilePath,
  377. name: 'file',
  378. formData: {},
  379. header: _this.headers,
  380. success: res => {
  381. // 判断是否json字符串,将其转为json格式
  382. let data = JSON.parse(res.data);
  383. if (![200].includes(res.statusCode)) {
  384. this.uploadError(index, data);
  385. } else {
  386. //上传成功
  387. if (_this.progress === 100) {
  388. console.log('_this.progress', _this.progress)
  389. _this.imgArr.push(data.data.url)
  390. console.log('imgArr', _this.imgArr)
  391. _this.$modal.msg('上传成功!')
  392. _this.photo = false;
  393. }
  394. }
  395. },
  396. fail: e => {
  397. _this.$modal.msg('上传失败!')
  398. this.uploadError(index, e);
  399. },
  400. complete: res => {
  401. uni.hideLoading();
  402. _this.uploading = false;
  403. }
  404. });
  405. task.onProgressUpdate(res => {
  406. _this.progress = res.progress;
  407. console.log('onProgressUpdate', res)
  408. uni.showLoading({
  409. title: '上传中'
  410. })
  411. if (_this.progress != 100) {
  412. _this.loading = false
  413. console.log('_this.loading false', _this.loading)
  414. } else {
  415. _this.loading = true
  416. console.log('_this.loading true', _this.loading)
  417. }
  418. });
  419. },
  420. })
  421. },
  422. pickerShow(e) {
  423. this.type = e; //赋值类型
  424. if (e == 'gczq') { //工程周期
  425. this.openDict = true;
  426. getDicts("engin_cycle").then(response => {
  427. this.dictOptions = response.data;
  428. });
  429. } else if (e == 'xzq') { //行政区
  430. if (this.isEmpty(this.projectValue.dictValue)) {
  431. this.$modal.msg('请选择工程周期')
  432. } else {
  433. this.openDict = true;
  434. getDicts("district").then(response => {
  435. this.dictOptions = response.data;
  436. });
  437. }
  438. //this.selectList = this.dictOptions;
  439. } else if (e == 'xq') { //小区
  440. if (this.isEmpty(this.XZQValue.dictValue)) {
  441. this.$modal.msg('请选择行政区')
  442. } else {
  443. this.open = true;
  444. this.selectList = this.XQList;
  445. }
  446. } else if (e == 'ld') { //楼栋
  447. if (this.isEmpty(this.XQValue.id)) {
  448. this.$modal.msg('请选择小区')
  449. } else {
  450. this.open = true;
  451. this.selectList = this.LDList;
  452. }
  453. } else if (e == 'dy') { //单元
  454. if (this.isEmpty(this.LDValue.id)) {
  455. this.$modal.msg('请选择楼栋')
  456. } else {
  457. this.open = true;
  458. this.selectList = this.DYList;
  459. }
  460. }
  461. },
  462. changeSelectDict(item, index) {
  463. this.openDict = false;
  464. if (this.type == 'isok') {
  465. this.isOkValue = item
  466. } else if (this.type == 'gczq') {
  467. this.projectValue = item
  468. if (!this.isEmpty(this.LDValue.id)) {
  469. // 工程周期切换
  470. this.getStatus();
  471. }
  472. } else if (this.type == 'xzq') {
  473. this.XZQValue = item;
  474. //根据行政区id获取小区数据
  475. this.XQValue = ''; //重置小区数据
  476. this.LDValue = ''; //重置楼栋数据
  477. this.DYValue = ''; //重置单元数据
  478. getAreaList(item.dictValue).then(res => {
  479. this.XQList = res.data;
  480. })
  481. }
  482. },
  483. changeSelect(item, index) {
  484. // this.index = index;
  485. // this.address = item.communityName;
  486. this.open = false;
  487. if (this.type == 'xq') {
  488. this.XQValue = item;
  489. //根据小区id 获取楼栋数据
  490. this.LDValue = ''; //重置楼栋数据
  491. this.DYValue = ''; //重置单元数据
  492. this.FJValue = ''; //重置房间数据
  493. getBuildingList(item.id).then(res => {
  494. this.LDList = res.data
  495. // console.log("楼栋=", res)
  496. })
  497. } else if (this.type == 'ld') {
  498. this.LDValue = item;
  499. if (!this.isEmpty(this.projectValue.dictValue)) {
  500. this.getStatus();
  501. }
  502. //根据楼栋ID 获取单元数据
  503. this.DYValue = ''; //重置单元数据
  504. this.FJValue = ''; //重置房间数据
  505. getUnitList(item.id).then(res => {
  506. this.DYList = res.data
  507. // console.log("单元=", res)
  508. })
  509. } else if (this.type == 'dy') {
  510. this.DYValue = item;
  511. if (!this.isEmpty(this.projectValue.dictValue)) {
  512. this.getStatus();
  513. }
  514. }
  515. },
  516. //关闭弹窗
  517. close(e) {
  518. this.open = false
  519. },
  520. //关闭弹窗
  521. closeDict(e) {
  522. this.openDict = false
  523. },
  524. getStatus() {
  525. let unitId = '';
  526. let houseId = '';
  527. if (this.isEmpty(this.DYValue.id)) {
  528. unitId = '';
  529. } else {
  530. unitId = this.DYValue.id
  531. }
  532. let param = {
  533. areaId: this.XQValue.id, // 小区id
  534. buildingId: this.LDValue.id, // 楼宇id
  535. unitId: unitId, // 单元id
  536. houseId: houseId, // 房间id
  537. enginCycle: this.projectValue.dictValue, // 工程周期
  538. enginType: this.objValue.enginType, //写死 上一页面传过来的
  539. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  540. }
  541. getRoomProjectId(param).then(res => {
  542. if (res.code == '200') {
  543. if (res.data != null && res.data.zEngineeringNodeBoList != null) {
  544. res.data.zEngineeringNodeBoList.forEach((item, index) => {
  545. if (this.objValue.enginClassValue == item.type) {
  546. this.reviewStatus = item.reviewStatus;
  547. if (item.reviewStatus == '1')
  548. this.$modal.msg('当前工程已结束')
  549. }
  550. })
  551. } else {
  552. this.reviewStatus = '' //置空
  553. }
  554. } else {
  555. this.$modal.msg(res.msg)
  556. this.reviewStatus = '' //置空
  557. }
  558. })
  559. },
  560. //提交数据
  561. submit() {
  562. if (this.isEmpty(this.projectValue.dictValue)) {
  563. this.$modal.msg("请选择工程周期")
  564. return
  565. }
  566. if (this.isEmpty(this.XZQValue.dictValue)) {
  567. this.$modal.msg("请选择行政区")
  568. return
  569. }
  570. if (this.isEmpty(this.XQValue.id)) {
  571. this.$modal.msg("请选择小区")
  572. return
  573. } else if (this.isEmpty(this.LDValue.id)) {
  574. this.$modal.msg("请选择楼栋")
  575. }
  576. if (this.imgArr.length <= 0) {
  577. this.$modal.msg('请上传照片或视频')
  578. return
  579. }
  580. if (this.loading == false) {
  581. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  582. return
  583. }
  584. //提交
  585. this.onsubmit();
  586. },
  587. onsubmit() {
  588. this.$modal.loading('提交中')
  589. let unitId = '';
  590. let houseId = '';
  591. let buildingId = '';
  592. if (this.isEmpty(this.DYValue.id)) {
  593. unitId = '';
  594. } else {
  595. unitId = this.DYValue.id
  596. }
  597. //提交
  598. let param = {
  599. district: this.XZQValue.dictValue,
  600. areaId: this.XQValue.id,
  601. buildingId: this.LDValue.id,
  602. unitId: unitId,
  603. houseId: houseId, //传空
  604. enginType: this.objValue.enginType, //写死 上一页面传过来的 新建/旧改
  605. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  606. enginCycle: this.projectValue.dictValue, //工程周期
  607. zEngineeringNodeBo: {
  608. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  609. zEngineeringInfoBo: {
  610. //constructAccordingDrawings: this.isCheck, //是否按图纸施工
  611. segmentedCompressionQualified: this.isOkValue, // 分段打压是否台格
  612. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  613. constructTime: this.time, //施工时间
  614. backfillTime: this.BackfillingTime, // 回填时间
  615. remark: this.projectContent, //施工内容
  616. // headName: this.user.nickName, // 负责人名称
  617. // headPhone: this.user.phonenumber, // 负责人电话
  618. zEngineeringMaterialBo: [{
  619. materialQuality: this.materialValue.id, //材质
  620. specifications: this.specificationValue.id, //规格
  621. number: this.inputNumberValue //数量
  622. }]
  623. }
  624. }
  625. }
  626. addTearOldPipe(param).then(res => {
  627. if (res.code == '200') {
  628. uni.showToast({
  629. title: res.msg,
  630. icon: 'none',
  631. //显示持续时间为 3秒
  632. duration: 2000
  633. });
  634. setTimeout(function() {
  635. uni.navigateBack();
  636. }, 1000)
  637. }
  638. this.$modal.closeLoading()
  639. })
  640. },
  641. history() {
  642. if (this.isEmpty(this.projectValue.dictValue)) {
  643. this.$modal.msg("请选择工程周期")
  644. return
  645. }
  646. if (this.isEmpty(this.XZQValue.dictValue)) {
  647. this.$modal.msg("请选择行政区")
  648. return
  649. }
  650. if (this.isEmpty(this.XQValue.id)) {
  651. this.$modal.msg("请选择小区")
  652. return
  653. }
  654. if (this.isEmpty(this.LDValue.id)) {
  655. this.$modal.msg("请选择楼栋")
  656. return
  657. }
  658. let unitId = '';
  659. let houseId = '';
  660. if (this.isEmpty(this.DYValue.id)) {
  661. unitId = '';
  662. } else {
  663. unitId = this.DYValue.id
  664. }
  665. let param = {
  666. areaId: this.XQValue.id, // 小区id
  667. buildingId: this.LDValue.id, // 楼宇id
  668. unitId: unitId, // 单元id
  669. houseId: houseId, // 房间id
  670. enginCycle: this.projectValue.dictValue, // 工程周期
  671. enginType: this.objValue.enginType, //写死 上一页面传过来的 新建/旧改
  672. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  673. }
  674. getRoomProjectId(param).then(res => {
  675. if (res.code == '200') {
  676. if (res.data != null) {
  677. getRoomProjectList(res.data.id, this.objValue.enginClassValue).then(
  678. res => {
  679. this.historyList = res.data
  680. if (res.data.zEngineeringNodeBo != null) {
  681. this.showHistoryList();
  682. } else {
  683. this.$modal.msg("暂无历史信息")
  684. }
  685. })
  686. } else {
  687. this.$modal.msg("暂无工程信息")
  688. }
  689. } else {
  690. this.$modal.msg(res.msg)
  691. }
  692. })
  693. },
  694. showHistoryList() {
  695. this.$refs.refShare.handleShowShare();
  696. }
  697. }
  698. }
  699. </script>
  700. <style lang="scss">
  701. .container {
  702. display: flex;
  703. align-items: center;
  704. justify-content: space-between;
  705. padding: 10px;
  706. position: relative;
  707. }
  708. .uni-list {
  709. border: 1xp solid #eee;
  710. }
  711. .to-right-icon {
  712. width: 15px;
  713. height: 15px;
  714. position: absolute;
  715. top: 50%;
  716. transform: translateY(-50%);
  717. }
  718. .text {
  719. font-size: 16px;
  720. color: #333;
  721. }
  722. .background {
  723. // border: 15px solid hsla(0, 0%, 100%, .5);
  724. background: white;
  725. background-clip: padding-box;
  726. padding: 20rpx;
  727. border-radius: 20rpx;
  728. margin: 20rpx;
  729. /*从padding开始往外面裁剪背景*/
  730. }
  731. .btn {
  732. width: 715rpx;
  733. height: 69rpx;
  734. background: #79A4F0;
  735. border-radius: 6rpx;
  736. font-size: 25rpx;
  737. font-family: Microsoft YaHei;
  738. font-weight: 400;
  739. color: #FFFFFF;
  740. line-height: 69rpx;
  741. margin-top: 40rpx;
  742. margin-bottom: 100rpx;
  743. }
  744. .number {
  745. display: flex;
  746. /* 水平居中显示子元素 */
  747. align-items: flex-start;
  748. /* 垂直居中显示子元素 */
  749. justify-content: space-between;
  750. /* 左右间距等于间距大小 */
  751. padding: 10px;
  752. /* 设置padding以提高视觉效果 */
  753. }
  754. .textarea {
  755. margin-top: 10upx;
  756. width: 100%;
  757. border: 1rpx solid red;
  758. min-height: 100upx;
  759. line-height: 20px;
  760. }
  761. </style>