overhead.vue 23 KB

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