overhead.vue 25 KB

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