statistics.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220
  1. <template>
  2. <view>
  3. <view v-if="isLeader=='sys_user'">
  4. <scroll-view>
  5. <view class="view-bg">
  6. <text class="title-txt">工程用料统计</text>
  7. <view>
  8. <view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
  9. <view class="uni-list-cell-left">
  10. 行政区
  11. </view>
  12. <view class="uni-list-cell-db">
  13. <view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;"
  14. @click="pickerShow('xzq')">
  15. <span style="color: darkgray;">请选择行政区</span>
  16. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  17. </view>
  18. <view v-else style="margin-top: 10;" @click="pickerShow('xzq')">
  19. <span style="color: black;">{{XZQValue.dictLabel}}</span>
  20. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  21. </view>
  22. </view>
  23. </view>
  24. <view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
  25. <view class="uni-list-cell-left">
  26. 小区
  27. </view>
  28. <view class="uni-list-cell-db">
  29. <view v-if="this.isEmpty(this.XQValue.id)" style="margin-top: 10;"
  30. @click="pickerShow('xq')">
  31. <span style="color: darkgray;">请选择小区</span>
  32. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  33. </view>
  34. <view v-else style="margin-top: 10;" @click="pickerShow('xq')">
  35. <span style="color: black;">{{XQValue.name}}</span>
  36. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
  41. <view class="uni-list-cell-left">
  42. 材料
  43. </view>
  44. <view class="uni-list-cell-db">
  45. <view v-if="this.isEmpty(this.materialValue.name)" style="margin-top: 10;"
  46. @click="pickerShow('cz')">
  47. <span style="color: darkgray;">请选择材料</span>
  48. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  49. </view>
  50. <view v-else style="display: flex;align-items: center; justify-content: flex-end;">
  51. <view style="margin-top: 10; " @click="pickerShow('cz')">
  52. <span style="color: black;">{{materialValue.name}}</span>
  53. <!-- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image> -->
  54. </view>
  55. <image :src="loadImgSrc('icon_close.png')"
  56. style=" width: 15px; height: 15px;margin-left:20rpx ;margin-right: -20rpx;"
  57. @click="clearMaterialInfo">
  58. </image>
  59. </view>
  60. </view>
  61. </view>
  62. <view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
  63. <view class="uni-list-cell-left">
  64. 规格
  65. </view>
  66. <view class="uni-list-cell-db">
  67. <view v-if="this.isEmpty(this.specificationValue.name)" style="margin-top: 10;"
  68. @click="pickerShow('gg')">
  69. <span style="color: darkgray;">请选择规格</span>
  70. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  71. </view>
  72. <view v-else style="display: flex;align-items: center; justify-content: flex-end;">
  73. <view style="margin-top: 10;" @click="pickerShow('gg')">
  74. <span style="color: black;">{{specificationValue.name}}</span>
  75. <!-- <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image> -->
  76. </view>
  77. <image :src="loadImgSrc('icon_close.png')"
  78. style=" width: 15px; height: 15px;margin-left:20rpx ;margin-right: -20rpx;"
  79. @click="clearSpecificationInfo">
  80. </image>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="table">
  86. <view class="felx-row">
  87. <view class="h-tr" style="flex: 1">名称</view>
  88. <view class="h-tr" style="flex: 1">材料</view>
  89. <view class="h-tr" style="flex: 1;align-items: center;">预计用量</view>
  90. <view class="h-tr" style="flex: 1">实际用量</view>
  91. </view>
  92. </view>
  93. <view class="felx-row" v-for="(item, index) in materialUsageList" :key="index">
  94. <view class="h-td" style="flex: 1">{{ item.realityQuality }}</view>
  95. <view class="h-td" style="flex: 1">{{ item.realitySpecifications }}</view>
  96. <view class="h-td" style="flex: 1">{{ item.estimatedSize }}</view>
  97. <view class="h-td" style="flex: 1">{{ item.realitySize }}</view>
  98. </view>
  99. </view>
  100. <view class="view-bg" style="margin-bottom: 40rpx;">
  101. <text class="title-txt">工程进度统计</text>
  102. <view>
  103. <view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
  104. <view class="uni-list-cell-left">
  105. 行政区
  106. </view>
  107. <view class="uni-list-cell-db">
  108. <view v-if="this.isEmpty(this.XZQValue2.dictValue)" style="margin-top: 10;"
  109. @click="pickerShow('xzq2')">
  110. <span style="color: darkgray;">请选择行政区</span>
  111. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  112. </view>
  113. <view v-else style="margin-top: 10;" @click="pickerShow('xzq2')">
  114. <span style="color: black;">{{XZQValue2.dictLabel}}</span>
  115. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
  120. <view class="uni-list-cell-left"> 小区</view>
  121. <view class="uni-list-cell-db">
  122. <view v-if="this.isEmpty(this.XQValue2.id)" style="margin-top: 10;"
  123. @click="pickerShow('xq2')">
  124. <span style="color: darkgray;">请选择小区</span>
  125. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  126. </view>
  127. <view v-else style="margin-top: 10;" @click="pickerShow('xq2')">
  128. <span style="color: black;">{{XQValue2.name}}</span>
  129. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  130. </view>
  131. </view>
  132. </view>
  133. <view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
  134. <view class="uni-list-cell-left">楼栋</view>
  135. <view class="uni-list-cell-db">
  136. <view v-if="this.isEmpty(this.LDValue2.id)" style="margin-top: 10;"
  137. @click="pickerShow('ld2')">
  138. <span style="color: darkgray;">请选择楼栋</span>
  139. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  140. </view>
  141. <view style="margin-top: 10;" @click="pickerShow('ld2')">
  142. <span style="color: black;">{{LDValue2.name}}</span>
  143. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  144. </view>
  145. </view>
  146. </view>
  147. <view class="uni-list-cell" style="border-bottom: 1px solid #f8f8f8;">
  148. <view class="uni-list-cell-left">单元</view>
  149. <view class="uni-list-cell-db">
  150. <view v-if="this.isEmpty(this.DYValue2.id)" style="margin-top: 10;"
  151. @click="pickerShow('dy2')">
  152. <span style="color: darkgray;">请选择单元</span>
  153. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  154. </view>
  155. <view v-else style="margin-top: 10;" @click="pickerShow('dy2')">
  156. <span style="color: black;">{{DYValue2.name}}</span>
  157. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  158. </view>
  159. </view>
  160. </view>
  161. </view>
  162. <image :src="loadImgSrc('lou-img-bg.png')" style="width: 110%;
  163. height: 121px;
  164. position: absolute;
  165. bottom: 15px;
  166. left: -5px;
  167. z-index: 1;
  168. "></image>
  169. <scroll-view :scroll-x="true" class="view_bg_build" v-if="roomList.length > 0">
  170. <view class="HuaDongBiao">
  171. <view class="NeiRong" v-for="(item,index) in roomList" :key="index">
  172. <view class="Fang" v-for="(item2, index2) in roomList[index]" :key="index2">
  173. <view v-if="item2.roomStatus=='施工中'" class="ShiGongZhong" @click="goHistory(item2)">
  174. {{ item2.roomName }}
  175. </view>
  176. <view v-else-if="item2.roomStatus=='未施工'" class="WeiShiGong">{{ item2.roomName }}
  177. </view>
  178. <view v-else class="JunGong" @click="goHistory(item2)">{{ item2.roomName }}</view>
  179. </view>
  180. </view>
  181. </view>
  182. <view style=" width: 48rpx;height: 63rpx;background: #C7EAFF; position:relative; left: 50%; transform:
  183. translateX(-50%); bottom: -10rpx;">
  184. </view>
  185. </scroll-view>
  186. <view v-if="roomList.length == 0" style="padding:50rpx;text-align: center;">暂无数据</view>
  187. <view style="align-items: center; margin-top: 20rpx;">
  188. <view style="display: flex;align-items: center;justify-content:center">
  189. <image class="block-iv" :src="loadImgSrc('ic_legend.png')"></image>
  190. <text style="margin-right: 20px;margin-left: 5px;">图例: </text>
  191. <div class="block-iv" style="background-color: #80d9ae;"></div>
  192. <text style="margin-right: 20px;margin-left: 5px;">竣工</text>
  193. <div class="block-iv" style="background-color: #5bd3ff;"></div>
  194. <text style="margin-right: 20px;margin-left: 5px;">施工中</text>
  195. <div class="block-iv" style="background-color: #ffc881;"></div>
  196. <text style="margin-right: 20px;margin-left: 5px;">未施工</text>
  197. </view>
  198. </view>
  199. </view>
  200. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
  201. subtitleKey="id" v-model="name"></SelectPicker>
  202. <SelectPicker :list="dictOptions" @change="changeSelect" v-if="openDict" @close="closeDict"
  203. titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
  204. </scroll-view>
  205. </view>
  206. <view v-else-if="isLeader=='app_user'">
  207. <!-- <view class="grid-body">
  208. <view class="Grid">
  209. <view class="Grid-Item" v-for="item in List" :key="item.id" @click="changeTab(item.id)"
  210. hover-class="click-hover" hover-start-time="50" hover-stay-time="50"
  211. v-if="userRole.includes(item.title)">
  212. <button class="icon-item" v-if="item.title == '民用工程'">民用工程</button>
  213. <button class="icon-item" v-if="item.title == '工业工程'">工业工程</button>
  214. <button class="icon-item" v-if="item.title == '市政工程'">市政工程</button>
  215. <button class="icon-item" v-if="item.title == '危险作业工程'">危险作业工程</button>
  216. <button class="icon-item" v-if="item.title == '顶管工程'">顶管工程</button>
  217. <button class="icon-item" v-if="item.title == '基建工程'">基建工程</button>
  218. <button class="icon-item" v-if="item.title == '开栓'">开栓</button>
  219. </view>
  220. </view>
  221. </view> -->
  222. <cc-pullScroolView class="pullScrollView" ref="pullScroll" :pullDown="pullDown" :isDownLoading="true">
  223. <view class="notice" v-for="(item,index) in list" :key="index">
  224. <view class="justify-content" @click="chooseNode(item)">
  225. <view class="font-forty">
  226. {{item.areaName+item.buildingName+item.unitName+item.houseName+(item.enginType=='new_built'? '-新建':'-旧改')+'-'+item.enginClassificationName}}
  227. </view>
  228. <view class="font-twenty-eight gray" v-for="state in item.nodeReViewStateList"
  229. v-if="state.Type!='开栓'">
  230. {{state.Type}}-{{state.state == 1 ? '审核通过': (state.content == '暂未审核' ? '暂未审核':'审核未通过')}}
  231. <view v-if="state.content != '暂未审核'">原因:{{state.content}}</view>
  232. </view>
  233. <view class="font-twenty-eight gray">
  234. {{item.createTime}}
  235. </view>
  236. </view>
  237. </view>
  238. </cc-pullScroolView>
  239. </view>
  240. <view class="share">
  241. <view :class="{'share-box': shareState}" @click="handleHiddenShare">
  242. </view>
  243. <view class="share-item" :class="{'share-show': shareState}">
  244. <view class="share-to">
  245. <text>请选择</text>
  246. </view>
  247. <scroll-view scroll-y="true" class="scroll-Y">
  248. <view class="content">
  249. <view class="block" v-for="(item, index) in typeList" :key="index" @click="showTypeSheet(item)"
  250. v-if="item.Type!='开栓'">
  251. <text>{{item.Type}}</text>
  252. </view>
  253. </view>
  254. </scroll-view>
  255. <view class="cancel" @click.stop="handleHiddenShare">
  256. <text>取消</text>
  257. </view>
  258. </view>
  259. </view>
  260. <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
  261. </view>
  262. </template>
  263. <script>
  264. import SelectPicker from '../../components/selectPicker/select_picker.vue'
  265. import bottomSheet from '../../components/bottomSheet/bottomSheet.vue'
  266. import CCBProjectList from '../../uni_modules/cc-pullScroolView/components/cc-pullScroolView/cc-pullScroolView.vue';
  267. import {
  268. gethistoryList,
  269. } from '@/api/common'
  270. import {
  271. getUserType,
  272. getUserRole
  273. } from '@/utils/auth';
  274. import {
  275. getDicts
  276. } from "@/api/system/dict/data";
  277. import user from '@/store/modules/user'
  278. import {
  279. getAreaList,
  280. getBuildingList,
  281. getUnitList,
  282. getHousesList,
  283. getEnginMaterialQualityList,
  284. getEnginSpecificationsList,
  285. getMunicipalStatisticsData,
  286. getObtainRoomcCompletionInformationList,
  287. getRoomProjectId,
  288. getRoomProjectList,
  289. } from '@/api/common'
  290. export default {
  291. components: {
  292. SelectPicker,
  293. CCBProjectList,
  294. bottomSheet
  295. },
  296. data() {
  297. return {
  298. historyList: {}, //历史数据
  299. userRole: getUserRole(),
  300. tabValue: ['旧改', '新建'],
  301. tabIndex: 0,
  302. isLeader: '',
  303. list: [],
  304. newlist: [],
  305. pageSize: 10, // 条数
  306. totalNum: '',
  307. pageNum: 1, // 页数
  308. typeList: '', //二次弹窗数据
  309. villageIndex: 0,
  310. specificationIndex: 0,
  311. materialIndex: 0,
  312. villageIndex2: 0,
  313. buildIndex: 0,
  314. unitIndex: 0,
  315. open: false,
  316. openDict: false,
  317. selectList: [],
  318. dictOptions: [],
  319. XQList: [],
  320. LDList: [],
  321. DYList: [],
  322. projectValue: {
  323. 'dictValue': '0'
  324. },
  325. XZQValue: {},
  326. XQValue: {},
  327. XQList2: [],
  328. LDList2: [],
  329. DYList2: [],
  330. projectValue2: {
  331. 'dictValue': '0'
  332. },
  333. shareState: false,
  334. XZQValue2: {},
  335. XQValue2: {},
  336. LDValue2: {},
  337. DYValue2: {},
  338. specificationValue: {},
  339. specificationList: [],
  340. materialValue: {},
  341. materialList: [],
  342. materialUsageList: [],
  343. roomList: [],
  344. roomCount: 4,
  345. nodeId: '',
  346. nodeType: '',
  347. roomItem: {},
  348. // List: [{
  349. // id: 1,
  350. // title: '民用工程'
  351. // },
  352. // {
  353. // id: 2,
  354. // title: '工业工程'
  355. // },
  356. // {
  357. // id: 3,
  358. // title: '市政工程'
  359. // },
  360. // {
  361. // id: 4,
  362. // title: '危险作业工程'
  363. // },
  364. // {
  365. // id: 5,
  366. // title: '顶管工程'
  367. // },
  368. // {
  369. // id: 6,
  370. // title: '基建工程'
  371. // },
  372. // {
  373. // id: 7,
  374. // title: '开栓'
  375. // },
  376. // ]
  377. }
  378. },
  379. created() {},
  380. onLoad() {
  381. this.isLeader = getUserType()
  382. //this.changeTab();
  383. if (this.isLeader == 'app_user') {
  384. this.changeTab();
  385. }
  386. },
  387. // 上拉加载
  388. onReachBottom() {
  389. // 数据全部加载完
  390. if (this.pageNum * 10 >= this.totalNum) {
  391. } else {
  392. // 显示加载中
  393. this.$refs.pullScroll.showUpLoading();
  394. this.pageNum++;
  395. this.requestData();
  396. }
  397. },
  398. methods: {
  399. goHistory(item) {
  400. this.roomItem = item;
  401. getDicts(item.enginCycle + '_indoor_engin').then(response => {
  402. this.typeList = response.data;
  403. let result = JSON.parse(JSON.stringify(this.typeList).replace(/dictValue/g, 'Type'));
  404. this.typeList = result;
  405. this.handleShowSheet();
  406. });
  407. },
  408. isEmpty(str) {
  409. return (!str || 0 === str.length);
  410. },
  411. // 显示二次弹窗
  412. handleShowSheet() {
  413. this.shareState = true;
  414. },
  415. // 隐藏二次弹窗
  416. handleHiddenShare() {
  417. this.shareState = false;
  418. },
  419. chooseNode(item) {
  420. this.typeList = item.nodeReViewStateList
  421. this.nodeId = item.id;
  422. this.nodeType = item.enginClassification;
  423. if (this.nodeType == 'bottom_leg') { //底腿
  424. let obj = {
  425. id: this.nodeId,
  426. type: item.Type
  427. };
  428. uni.navigateTo({
  429. url: '/pages/statistics/history_details_bottom_leg?params=' + encodeURIComponent(JSON
  430. .stringify(
  431. obj))
  432. })
  433. } else {
  434. this.handleShowSheet();
  435. }
  436. },
  437. showHistoryList() {
  438. this.$refs.refShare.handleShowShare();
  439. },
  440. showTypeSheet(item) {
  441. if (this.isLeader == 'sys_user') {
  442. let param = {
  443. areaId: this.roomItem.areaId,
  444. buildingId: this.roomItem.buildingId,
  445. unitId: this.roomItem.unitId,
  446. houseId: this.roomItem.roomId,
  447. enginCycle: this.projectValue2.dictValue, // 工程周期
  448. enginType: this.roomItem.enginCycle,
  449. enginClassification: 'indoor_engin', //写死 室内
  450. }
  451. getRoomProjectId(param).then(res => {
  452. if (res.code == '200') {
  453. if (res.data != null) {
  454. getRoomProjectList(res.data.id, item.Type).then(res => {
  455. if (res.data.zEngineeringNodeBo != null) {
  456. this.historyList = res.data
  457. this.showHistoryList();
  458. } else {
  459. this.$modal.msg("暂无历史信息")
  460. }
  461. })
  462. } else {
  463. this.$modal.msg("暂无工程信息")
  464. }
  465. } else {
  466. this.$modal.msg(res.msg)
  467. }
  468. })
  469. } else {
  470. let obj = {
  471. id: this.nodeId,
  472. type: item.Type
  473. };
  474. this.handleHiddenShare();
  475. if (this.nodeType == 'indoor_engin') { //室内
  476. uni.navigateTo({
  477. url: '/pages/statistics/historyDetails?params=' + encodeURIComponent(JSON
  478. .stringify(
  479. obj))
  480. })
  481. } else if (this.nodeType == 'overhead') { //架空
  482. uni.navigateTo({
  483. url: '/pages/statistics/historyDetailsCourtyard?params=' + encodeURIComponent(JSON
  484. .stringify(
  485. obj))
  486. })
  487. } else if (this.nodeType == 'courtyard') { //庭院
  488. uni.navigateTo({
  489. url: '/pages/statistics/historyDetailsCourtyard?params=' + encodeURIComponent(JSON
  490. .stringify(
  491. obj))
  492. })
  493. }
  494. }
  495. },
  496. pickerShow(e) {
  497. this.type = e; //赋值类型
  498. if (e == 'gczq') { //工程周期
  499. this.openDict = true;
  500. getDicts("engin_cycle").then(response => {
  501. this.dictOptions = response.data;
  502. });
  503. } else if (e == 'xzq') {
  504. if (this.isEmpty(this.projectValue.dictValue)) {
  505. this.$modal.msg('请选择工程周期')
  506. } else {
  507. this.openDict = true;
  508. getDicts("district").then(response => {
  509. this.dictOptions = response.data;
  510. });
  511. }
  512. } else if (e == 'xq') { //小区
  513. if (this.isEmpty(this.XZQValue.dictValue)) {
  514. this.$modal.msg('请选择行政区')
  515. } else {
  516. this.open = true;
  517. this.selectList = this.XQList;
  518. }
  519. } else if (e == 'ld') { //楼栋
  520. if (this.isEmpty(this.XQValue.id)) {
  521. this.$modal.msg('请选择小区')
  522. } else {
  523. this.open = true;
  524. this.selectList = this.LDList;
  525. }
  526. } else if (e == 'dy') { //单元
  527. if (this.isEmpty(this.LDValue.id)) {
  528. this.$modal.msg('请选择楼栋')
  529. } else {
  530. this.open = true;
  531. this.selectList = this.DYList;
  532. }
  533. } else if (e == 'gczq2') { //工程周期
  534. this.openDict = true;
  535. getDicts("engin_cycle").then(response => {
  536. this.dictOptions = response.data;
  537. });
  538. } else if (e == 'xzq2') { //行政区2
  539. if (this.isEmpty(this.projectValue2.dictValue)) {
  540. this.$modal.msg('请选择工程周期')
  541. } else {
  542. this.openDict = true;
  543. getDicts("district").then(response => {
  544. this.dictOptions = response.data;
  545. });
  546. }
  547. } else if (e == 'xq2') { //小区2
  548. if (this.isEmpty(this.XZQValue2.dictValue)) {
  549. this.$modal.msg('请选择行政区')
  550. } else {
  551. this.open = true;
  552. this.selectList = this.XQList2;
  553. }
  554. } else if (e == 'ld2') { //楼栋2
  555. if (this.isEmpty(this.XQValue2.id)) {
  556. this.$modal.msg('请选择小区')
  557. } else {
  558. this.open = true;
  559. this.selectList = this.LDList2;
  560. }
  561. } else if (e == 'dy2') { //单元2
  562. if (this.isEmpty(this.LDValue2.id)) {
  563. this.$modal.msg('请选择楼栋')
  564. } else {
  565. this.open = true;
  566. this.selectList = this.DYList2;
  567. }
  568. } else if (e == 'gg') { //规格
  569. if (this.isEmpty(this.materialValue.id)) {
  570. this.$modal.msg('请选择材料')
  571. } else {
  572. this.open = true;
  573. this.selectList = this.materialList;
  574. }
  575. } else if (e == 'cz') { //材料
  576. this.open = true;
  577. getEnginMaterialQualityList("民用工程").then(response => {
  578. this.selectList = response.data;
  579. });
  580. }
  581. },
  582. changeSelect(item, index) {
  583. // this.index = index;
  584. // this.address = item.communityName;
  585. this.open = false;
  586. this.openDict = false;
  587. if (this.type == 'xzq') {
  588. this.XZQValue = item;
  589. //根据行政区id获取小区数据
  590. this.XQValue = ''; //重置小区数据
  591. this.LDValue = ''; //重置楼栋数据
  592. this.DYValue = ''; //重置单元数据
  593. this.FJValue = ''; //重置房间数据
  594. getAreaList(item.dictValue).then(res => {
  595. this.XQList = res.data;
  596. })
  597. } else if (this.type == 'gczq') {
  598. this.projectValue = item
  599. } else if (this.type == 'xq') {
  600. this.XQValue = item;
  601. //根据小区id 获取楼栋数据
  602. this.LDValue = ''; //重置楼栋数据
  603. this.DYValue = ''; //重置单元数据
  604. this.FJValue = ''; //重置房间数据
  605. this.queryMaterialsUsedList();
  606. } else if (this.type == 'ld') {
  607. this.LDValue = item;
  608. //根据楼栋ID 获取单元数据
  609. this.DYValue = ''; //重置单元数据
  610. this.FJValue = ''; //重置房间数据
  611. getUnitList(item.id).then(res => {
  612. this.DYList = res.data
  613. })
  614. } else if (this.type == 'dy') {
  615. this.DYValue = item;
  616. } else if (this.type == 'gczq2') {
  617. this.projectValue2 = item
  618. } else if (this.type == 'xzq2') {
  619. this.XZQValue2 = item;
  620. //根据行政区id获取小区数据
  621. this.XQValue2 = ''; //重置小区数据
  622. this.LDValue2 = ''; //重置楼栋数据
  623. this.DYValue2 = ''; //重置单元数据
  624. this.FJValue2 = ''; //重置房间数据
  625. getAreaList(item.dictValue).then(res => {
  626. this.XQList2 = res.data;
  627. })
  628. } else if (this.type == 'xq2') { //小区2
  629. this.XQValue2 = item;
  630. //根据小区id 获取楼栋数据
  631. this.LDValue2 = ''; //重置楼栋数据
  632. this.DYValue2 = ''; //重置单元数据
  633. this.FJValue2 = ''; //重置房间数据
  634. getBuildingList(item.id).then(res => {
  635. this.LDList2 = res.data
  636. })
  637. } else if (this.type == 'ld2') {
  638. this.LDValue2 = item;
  639. //根据楼栋ID 获取单元数据
  640. this.DYValue2 = ''; //重置单元数据
  641. this.FJValue2 = ''; //重置房间数据
  642. getUnitList(item.id).then(res => {
  643. this.DYList2 = res.data
  644. })
  645. } else if (this.type == 'dy2') {
  646. this.DYValue2 = item;
  647. this.queryProjectStatisticsList();
  648. } else if (this.type == 'gg') { //规格
  649. this.specificationValue = item;
  650. this.queryMaterialsUsedList();
  651. } else if (this.type == 'cz') { //材料
  652. this.materialValue = item;
  653. this.specificationValue = ''; //重置规格
  654. this.queryMaterialsUsedList();
  655. //根据材质ID 获取规格数据
  656. getEnginSpecificationsList(item.id).then(res => {
  657. this.materialList = res.data
  658. })
  659. }
  660. },
  661. //关闭弹窗
  662. close(e) {
  663. this.open = false
  664. },
  665. //关闭弹窗
  666. closeDict(e) {
  667. this.openDict = false
  668. },
  669. queryMaterialsUsedList() {
  670. if (this.isEmpty(this.XQValue.id)) {
  671. this.$modal.msg('请选择小区')
  672. return;
  673. }
  674. let param = {
  675. enginCycle: this.projectValue.dictValue, //工程周期
  676. areaId: this.XQValue.id,
  677. realityQuality: this.materialValue.id,
  678. realitySpecifications: this.specificationValue.id,
  679. };
  680. getMunicipalStatisticsData(param).then(res => {
  681. this.materialUsageList = res.data;
  682. })
  683. },
  684. queryProjectStatisticsList() {
  685. let param = {
  686. enginCycle: this.projectValue.dictValue, //工程周期
  687. areaId: this.XQValue2.id,
  688. buildingId: this.LDValue2.id,
  689. unitId: this.DYValue2.id,
  690. };
  691. getObtainRoomcCompletionInformationList(param).then(res => {
  692. this.roomList = res.data[0].roomStatusVoList;
  693. this.roomCount = res.data[0].roomStatusVoList.length;
  694. })
  695. },
  696. getColorByStatus(status) {
  697. if (this.isEmpty(status)) {
  698. return "#fff";
  699. }
  700. if (status == '施工中') {
  701. return "#5bd3ff";
  702. } else if (status == '未施工') {
  703. return "#ffc881";
  704. } else if (status == '竣工') {
  705. return "#80d9ae";
  706. }
  707. },
  708. //材料清空val
  709. clearMaterialInfo() {
  710. this.materialValue = '';
  711. this.specificationValue = '';
  712. this.queryMaterialsUsedList();
  713. },
  714. clearSpecificationInfo() {
  715. this.specificationValue = '';
  716. this.queryMaterialsUsedList();
  717. },
  718. // 下拉刷新
  719. pullDown(pullScroll) {
  720. this.pageNum = 1;
  721. setTimeout(() => {
  722. this.requestData(pullScroll);
  723. }, 1000);
  724. },
  725. getList() {
  726. let myThis = this;
  727. this.$nextTick(() => {
  728. myThis.$refs.pullScroll.refresh();
  729. });
  730. },
  731. changeTab(e) {
  732. this.pageSize = 10; // 条数
  733. this.totalNum = '';
  734. this.pageNum = 1; // 页数
  735. //this.tabIndex = e;
  736. this.requestData();
  737. },
  738. requestData() {
  739. uni.showLoading()
  740. let type = ''
  741. gethistoryList(user.state.name, this.pageNum, this.pageSize).then(res => {
  742. this.totalNum = res.total
  743. if (res.code == '200') {
  744. uni.hideLoading()
  745. if (res.rows.length !== 0) {
  746. //首次加载10条数据,后进行拼接
  747. if (this.pageNum == 1) {
  748. this.list = [];
  749. this.list = res.rows
  750. } else {
  751. this.list = this.list.concat(res.rows)
  752. }
  753. // 如果是最后一页
  754. if (this.pageNum * 10 >= this.totalNum) {
  755. this.$refs.pullScroll.finish();
  756. } else {
  757. // 不是最后一页
  758. this.$refs.pullScroll.success();
  759. }
  760. } else {
  761. this.list = [];
  762. this.$refs.pullScroll.empty();
  763. }
  764. } else {
  765. this.$modal.msg(res.msg + "")
  766. this.$refs.pullScroll.error();
  767. }
  768. })
  769. },
  770. }
  771. }
  772. </script>
  773. <style lang="scss">
  774. .to-right-icon {
  775. width: 15px;
  776. height: 15px;
  777. position: absolute;
  778. top: 50%;
  779. transform: translateY(-50%);
  780. }
  781. .no-click {
  782. pointer-events: none;
  783. }
  784. .marginLeft5 {
  785. margin-left: 5px;
  786. }
  787. .title-txt {
  788. font-size: 15px;
  789. font-weight: bold;
  790. color: black;
  791. padding: 20rpx 0;
  792. }
  793. .content-txt {
  794. font-size: 10px;
  795. font-weight: bold;
  796. color: black;
  797. }
  798. .view-bg {
  799. margin-left: 8px;
  800. margin-right: 8px;
  801. margin-top: 8px;
  802. background-color: #fff;
  803. border-radius: 5px;
  804. padding: 20px;
  805. display: flex;
  806. flex-direction: column;
  807. }
  808. .uni-list {
  809. background-color: #FFFFFF;
  810. position: relative;
  811. width: 100%;
  812. display: flex;
  813. flex-direction: column;
  814. }
  815. .uni-list-cell {
  816. display: flex;
  817. align-items: center;
  818. justify-content: space-between;
  819. padding: 10px 0;
  820. position: relative;
  821. }
  822. .uni-list-cell-left {
  823. white-space: nowrap;
  824. font-size: 28rpx;
  825. }
  826. .centered {
  827. text-align: center;
  828. background-color: #e2f4ff;
  829. }
  830. .text {
  831. background-color: #e2f4ff;
  832. height: 20rpx;
  833. }
  834. .view_bg_build {
  835. background-color: #e2f4ff;
  836. padding: 10px 10px 0 10px;
  837. margin: 0 auto;
  838. border: 1px solid #5bd3ff;
  839. white-space: nowrap;
  840. position: relative;
  841. z-index: 2;
  842. }
  843. .grid-text {
  844. font-size: 14px;
  845. color: #000000;
  846. text-align: center;
  847. padding-left: 30rpx;
  848. padding-right: 30rpx;
  849. padding-top: 20rpx;
  850. padding-bottom: 20rpx;
  851. }
  852. .name {
  853. flex: 0;
  854. font-size: 14px;
  855. color: #000000;
  856. overflow: hidden;
  857. text-overflow: ellipsis;
  858. white-space: nowrap;
  859. }
  860. .table-item {
  861. overflow: hidden;
  862. text-overflow: ellipsis;
  863. white-space: nowrap;
  864. }
  865. .block-iv {
  866. width: 20px;
  867. height: 20px;
  868. }
  869. .table {
  870. width: 100%;
  871. border-radius: 8rpx;
  872. background: #FFFFFF;
  873. /* border: 1rpx solid #EFEFEF; */
  874. font-size: 28rpx;
  875. margin-top: 40rpx;
  876. }
  877. .felx-row {
  878. width: 100%;
  879. display: flex;
  880. justify-content: space-between;
  881. align-items: center;
  882. }
  883. .h-tr {
  884. box-sizing: border-box;
  885. display: flex;
  886. flex-direction: row;
  887. flex-wrap: nowrap;
  888. justify-content: center;
  889. align-items: center;
  890. align-content: center;
  891. border-color: #ccc;
  892. border-style: solid;
  893. border-width: 0;
  894. border-width: 1px;
  895. color: #3d7dd7;
  896. }
  897. .h-td {
  898. box-sizing: border-box;
  899. padding: 3px;
  900. word-break: break-all;
  901. border-color: #ccc;
  902. border-style: solid;
  903. border-width: 1px;
  904. border-right-width: 1px;
  905. display: flex;
  906. flex-direction: row;
  907. flex-wrap: nowrap;
  908. justify-content: center;
  909. align-items: center;
  910. align-content: center;
  911. min-height: 64rpx;
  912. }
  913. .LouCeng {
  914. font-size: 30rpx;
  915. background-color: #4a4b52;
  916. color: #FFEB3B;
  917. font-weight: bold;
  918. }
  919. .Fang {
  920. width: 100%;
  921. display: inline-block;
  922. line-height: 50rpx;
  923. text-align: center;
  924. margin-right: 10px;
  925. margin-bottom: 10px;
  926. background-color: red;
  927. }
  928. .HuaDongBiao {
  929. display: flex;
  930. flex-direction: column-reverse;
  931. position: relative;
  932. }
  933. .NeiRong {
  934. display: flex;
  935. flex-wrap: nowrap;
  936. }
  937. .NeiRong :last-child {
  938. margin-right: 0 !important;
  939. }
  940. .ShiGongZhong {
  941. background-color: #5bd3ff;
  942. color: #000;
  943. }
  944. .WeiShiGong {
  945. background-color: #ffc881;
  946. color: #000;
  947. }
  948. .JunGong {
  949. background-color: #80d9ae;
  950. color: #000;
  951. }
  952. .container {
  953. display: flex;
  954. margin-left: 10px;
  955. width: 100%;
  956. margin-top: 10px;
  957. margin-right: 10px;
  958. justify-content: space-between;
  959. }
  960. .notice {
  961. margin: 20rpx;
  962. padding: 20rpx;
  963. background: #FFFFFF;
  964. box-shadow: 0rpx 8rpx 17rpx 0rpx rgba(0, 0, 0, 0.04);
  965. border-radius: 10rpx;
  966. }
  967. .text {
  968. border-left: 15rpx solid #3857F3;
  969. padding-left: 20rpx;
  970. }
  971. .share {
  972. width: 100%;
  973. height: 100%;
  974. }
  975. .share-box {
  976. width: 100%;
  977. height: 100%;
  978. position: fixed;
  979. top: 0rpx;
  980. left: 0rpx;
  981. bottom: 0rpx;
  982. right: 0rpx;
  983. background-color: rgba(0, 0, 0, 0.4);
  984. transition: .3s;
  985. z-index: 999;
  986. }
  987. .share-show {
  988. transition: all 0.3s ease;
  989. transform: translateY(0%) !important;
  990. }
  991. .scroll-Y {
  992. height: 350rpx;
  993. }
  994. .share-item {
  995. position: fixed;
  996. left: 0;
  997. bottom: 0;
  998. width: 100%;
  999. height: auto;
  1000. background-color: #FFFFFF;
  1001. transition: all 0.3s ease;
  1002. transform: translateY(100%);
  1003. z-index: 1999;
  1004. border-top-left-radius: 40rpx;
  1005. border-top-right-radius: 40rpx;
  1006. .share-to {
  1007. width: 100%;
  1008. height: 3rem;
  1009. display: flex;
  1010. justify-content: center;
  1011. align-items: center;
  1012. &::after {
  1013. content: '';
  1014. width: 240rpx;
  1015. height: 0rpx;
  1016. border-top: 1px solid #E4E7ED;
  1017. -webkit-transform: scaleY(0.5);
  1018. transform: scaleY(0.5);
  1019. margin-left: 30rpx;
  1020. }
  1021. &::before {
  1022. content: '';
  1023. width: 240rpx;
  1024. height: 0rpx;
  1025. border-top: 1px solid #E4E7ED;
  1026. -webkit-transform: scaleY(0.5);
  1027. transform: scaleY(0.5);
  1028. margin-right: 30rpx;
  1029. }
  1030. }
  1031. .content {
  1032. width: 100%;
  1033. height: 50%;
  1034. display: flex;
  1035. flex-wrap: wrap;
  1036. .block {
  1037. width: 100%;
  1038. display: flex;
  1039. flex-direction: column;
  1040. justify-content: center;
  1041. align-items: center;
  1042. height: 80rpx;
  1043. text {
  1044. margin-top: 16rpx;
  1045. font-size: 28rpx;
  1046. color: #606266;
  1047. }
  1048. }
  1049. }
  1050. .cancel {
  1051. width: 100%;
  1052. height: 3rem;
  1053. display: flex;
  1054. justify-content: center;
  1055. align-items: center;
  1056. border-top: 1rpx solid #E4E7ED;
  1057. }
  1058. }
  1059. </style>