statistics.vue 27 KB

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