statistics.vue 28 KB

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