statistics.vue 27 KB

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