overhead.vue 24 KB

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