statistics.vue 26 KB

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