statistics.vue 28 KB

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