statistics.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  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. if (this.nodeType == 'bottom_leg') { //底腿
  397. let obj = {
  398. id: this.nodeId,
  399. type: item.Type
  400. };
  401. uni.navigateTo({
  402. url: '/pages/statistics/history_details_bottom_leg?params=' + encodeURIComponent(JSON
  403. .stringify(
  404. obj))
  405. })
  406. } else {
  407. this.handleShowSheet();
  408. }
  409. },
  410. showTypeSheet(item) {
  411. let obj = {
  412. id: this.nodeId,
  413. type: item.Type
  414. };
  415. this.handleHiddenShare();
  416. if (this.nodeType == 'indoor_engin') { //室内
  417. uni.navigateTo({
  418. url: '/pages/statistics/historyDetails?params=' + encodeURIComponent(JSON
  419. .stringify(
  420. obj))
  421. })
  422. } else if (this.nodeType == 'overhead') { //架空
  423. uni.navigateTo({
  424. url: '/pages/statistics/historyDetails?params=' + encodeURIComponent(JSON
  425. .stringify(
  426. obj))
  427. })
  428. } else if (this.nodeType == 'courtyard') { //庭院
  429. uni.navigateTo({
  430. url: '/pages/statistics/historyDetailsCourtyard?params=' + encodeURIComponent(JSON
  431. .stringify(
  432. obj))
  433. })
  434. }
  435. },
  436. pickerShow(e) {
  437. this.type = e; //赋值类型
  438. if (e == 'gczq') { //工程周期
  439. this.openDict = true;
  440. getDicts("engin_cycle").then(response => {
  441. this.dictOptions = response.data;
  442. });
  443. } else if (e == 'xzq') {
  444. if (this.isEmpty(this.projectValue.dictValue)) {
  445. this.$modal.msg('请选择工程周期')
  446. } else {
  447. this.openDict = true;
  448. getDicts("district").then(response => {
  449. this.dictOptions = response.data;
  450. });
  451. }
  452. } else if (e == 'xq') { //小区
  453. if (this.isEmpty(this.XZQValue.dictValue)) {
  454. this.$modal.msg('请选择行政区')
  455. } else {
  456. this.open = true;
  457. this.selectList = this.XQList;
  458. }
  459. } else if (e == 'ld') { //楼栋
  460. if (this.isEmpty(this.XQValue.id)) {
  461. this.$modal.msg('请选择小区')
  462. } else {
  463. this.open = true;
  464. this.selectList = this.LDList;
  465. }
  466. } else if (e == 'dy') { //单元
  467. if (this.isEmpty(this.LDValue.id)) {
  468. this.$modal.msg('请选择楼栋')
  469. } else {
  470. this.open = true;
  471. this.selectList = this.DYList;
  472. }
  473. } else if (e == 'gczq2') { //工程周期
  474. this.openDict = true;
  475. getDicts("engin_cycle").then(response => {
  476. this.dictOptions = response.data;
  477. });
  478. } else if (e == 'xzq2') { //行政区2
  479. if (this.isEmpty(this.projectValue2.dictValue)) {
  480. this.$modal.msg('请选择工程周期')
  481. } else {
  482. this.openDict = true;
  483. getDicts("district").then(response => {
  484. this.dictOptions = response.data;
  485. });
  486. }
  487. } else if (e == 'xq2') { //小区2
  488. if (this.isEmpty(this.XZQValue2.dictValue)) {
  489. this.$modal.msg('请选择行政区')
  490. } else {
  491. this.open = true;
  492. this.selectList = this.XQList2;
  493. }
  494. } else if (e == 'ld2') { //楼栋2
  495. if (this.isEmpty(this.XQValue2.id)) {
  496. this.$modal.msg('请选择小区')
  497. } else {
  498. this.open = true;
  499. this.selectList = this.LDList2;
  500. }
  501. } else if (e == 'dy2') { //单元2
  502. if (this.isEmpty(this.LDValue2.id)) {
  503. this.$modal.msg('请选择楼栋')
  504. } else {
  505. this.open = true;
  506. this.selectList = this.DYList2;
  507. }
  508. } else if (e == 'gg') { //规格
  509. if (this.isEmpty(this.materialValue.id)) {
  510. this.$modal.msg('请选择材料')
  511. } else {
  512. this.open = true;
  513. this.selectList = this.materialList;
  514. }
  515. } else if (e == 'cz') { //材料
  516. this.open = true;
  517. getEnginMaterialQualityList("民用工程").then(response => {
  518. this.selectList = response.data;
  519. });
  520. }
  521. },
  522. changeSelect(item, index) {
  523. // this.index = index;
  524. // this.address = item.communityName;
  525. this.open = false;
  526. this.openDict = false;
  527. if (this.type == 'xzq') {
  528. this.XZQValue = item;
  529. //根据行政区id获取小区数据
  530. this.XQValue = ''; //重置小区数据
  531. this.LDValue = ''; //重置楼栋数据
  532. this.DYValue = ''; //重置单元数据
  533. this.FJValue = ''; //重置房间数据
  534. getAreaList(item.dictValue).then(res => {
  535. this.XQList = res.data;
  536. })
  537. } else if (this.type == 'gczq') {
  538. this.projectValue = item
  539. } else if (this.type == 'xq') {
  540. this.XQValue = item;
  541. //根据小区id 获取楼栋数据
  542. this.LDValue = ''; //重置楼栋数据
  543. this.DYValue = ''; //重置单元数据
  544. this.FJValue = ''; //重置房间数据
  545. this.queryMaterialsUsedList();
  546. } else if (this.type == 'ld') {
  547. this.LDValue = item;
  548. //根据楼栋ID 获取单元数据
  549. this.DYValue = ''; //重置单元数据
  550. this.FJValue = ''; //重置房间数据
  551. getUnitList(item.id).then(res => {
  552. this.DYList = res.data
  553. })
  554. } else if (this.type == 'dy') {
  555. this.DYValue = item;
  556. } else if (this.type == 'gczq2') {
  557. this.projectValue2 = item
  558. } else if (this.type == 'xzq2') {
  559. this.XZQValue2 = item;
  560. //根据行政区id获取小区数据
  561. this.XQValue2 = ''; //重置小区数据
  562. this.LDValue2 = ''; //重置楼栋数据
  563. this.DYValue2 = ''; //重置单元数据
  564. this.FJValue2 = ''; //重置房间数据
  565. getAreaList(item.dictValue).then(res => {
  566. this.XQList2 = res.data;
  567. })
  568. } else if (this.type == 'xq2') { //小区2
  569. this.XQValue2 = item;
  570. //根据小区id 获取楼栋数据
  571. this.LDValue2 = ''; //重置楼栋数据
  572. this.DYValue2 = ''; //重置单元数据
  573. this.FJValue2 = ''; //重置房间数据
  574. getBuildingList(item.id).then(res => {
  575. this.LDList2 = res.data
  576. })
  577. } else if (this.type == 'ld2') {
  578. this.LDValue2 = item;
  579. //根据楼栋ID 获取单元数据
  580. this.DYValue2 = ''; //重置单元数据
  581. this.FJValue2 = ''; //重置房间数据
  582. getUnitList(item.id).then(res => {
  583. this.DYList2 = res.data
  584. })
  585. } else if (this.type == 'dy2') {
  586. this.DYValue2 = item;
  587. this.queryProjectStatisticsList();
  588. } else if (this.type == 'gg') { //规格
  589. this.specificationValue = item;
  590. this.queryMaterialsUsedList();
  591. } else if (this.type == 'cz') { //材料
  592. this.materialValue = item;
  593. this.specificationValue = ''; //重置规格
  594. this.queryMaterialsUsedList();
  595. //根据材质ID 获取规格数据
  596. getEnginSpecificationsList(item.id).then(res => {
  597. this.materialList = res.data
  598. })
  599. }
  600. },
  601. //关闭弹窗
  602. close(e) {
  603. this.open = false
  604. },
  605. //关闭弹窗
  606. closeDict(e) {
  607. this.openDict = false
  608. },
  609. queryMaterialsUsedList() {
  610. if (this.isEmpty(this.XQValue.id)) {
  611. this.$modal.msg('请选择小区')
  612. return;
  613. }
  614. let param = {
  615. enginCycle: this.projectValue.dictValue, //工程周期
  616. areaId: this.XQValue.id,
  617. realityQuality: this.materialValue.id,
  618. realitySpecifications: this.specificationValue.id,
  619. };
  620. getMunicipalStatisticsData(param).then(res => {
  621. this.materialUsageList = res.data;
  622. })
  623. },
  624. queryProjectStatisticsList() {
  625. let param = {
  626. enginCycle: this.projectValue.dictValue, //工程周期
  627. areaId: this.XQValue2.id,
  628. buildingId: this.LDValue2.id,
  629. unitId: this.DYValue2.id,
  630. };
  631. getObtainRoomcCompletionInformationList(param).then(res => {
  632. this.roomList = res.data[0].roomStatusVoList;
  633. this.roomCount = res.data[0].roomStatusVoList.length;
  634. })
  635. },
  636. getColorByStatus(status) {
  637. if (this.isEmpty(status)) {
  638. return "#fff";
  639. }
  640. if (status == '施工中') {
  641. return "#5bd3ff";
  642. } else if (status == '未施工') {
  643. return "#ffc881";
  644. } else if (status == '竣工') {
  645. return "#80d9ae";
  646. }
  647. },
  648. //材料清空val
  649. clearMaterialInfo() {
  650. this.materialValue = '';
  651. this.specificationValue = '';
  652. this.queryMaterialsUsedList();
  653. },
  654. clearSpecificationInfo() {
  655. this.specificationValue = '';
  656. this.queryMaterialsUsedList();
  657. },
  658. // 下拉刷新
  659. pullDown(pullScroll) {
  660. this.pageNum = 1;
  661. setTimeout(() => {
  662. this.requestData(pullScroll);
  663. }, 1000);
  664. },
  665. getList() {
  666. let myThis = this;
  667. this.$nextTick(() => {
  668. myThis.$refs.pullScroll.refresh();
  669. });
  670. },
  671. changeTab(e) {
  672. this.pageSize = 10; // 条数
  673. this.totalNum = '';
  674. this.pageNum = 1; // 页数
  675. this.tabIndex = e;
  676. this.requestData();
  677. },
  678. requestData() {
  679. uni.showLoading()
  680. let type = ''
  681. gethistoryList(user.state.name, this.pageNum, this.pageSize).then(res => {
  682. this.totalNum = res.total
  683. if (res.code == '200') {
  684. uni.hideLoading()
  685. if (res.rows.length !== 0) {
  686. //首次加载10条数据,后进行拼接
  687. if (this.pageNum == 1) {
  688. this.list = [];
  689. this.list = res.rows
  690. } else {
  691. this.list = this.list.concat(res.rows)
  692. }
  693. // 如果是最后一页
  694. if (this.pageNum * 10 >= this.totalNum) {
  695. this.$refs.pullScroll.finish();
  696. } else {
  697. // 不是最后一页
  698. this.$refs.pullScroll.success();
  699. }
  700. } else {
  701. this.list = [];
  702. this.$refs.pullScroll.empty();
  703. }
  704. } else {
  705. this.$modal.msg(res.msg + "")
  706. this.$refs.pullScroll.error();
  707. }
  708. })
  709. },
  710. }
  711. }
  712. </script>
  713. <style lang="scss">
  714. .to-right-icon {
  715. width: 15px;
  716. height: 15px;
  717. position: absolute;
  718. top: 50%;
  719. transform: translateY(-50%);
  720. }
  721. .no-click {
  722. pointer-events: none;
  723. }
  724. .marginLeft5 {
  725. margin-left: 5px;
  726. }
  727. .title-txt {
  728. font-size: 15px;
  729. font-weight: bold;
  730. color: black;
  731. padding: 20rpx 0;
  732. }
  733. .content-txt {
  734. font-size: 10px;
  735. font-weight: bold;
  736. color: black;
  737. }
  738. .view-bg {
  739. margin-left: 8px;
  740. margin-right: 8px;
  741. margin-top: 8px;
  742. background-color: #fff;
  743. border-radius: 5px;
  744. padding: 20px;
  745. display: flex;
  746. flex-direction: column;
  747. }
  748. .uni-list {
  749. background-color: #FFFFFF;
  750. position: relative;
  751. width: 100%;
  752. display: flex;
  753. flex-direction: column;
  754. }
  755. .uni-list-cell {
  756. display: flex;
  757. align-items: center;
  758. justify-content: space-between;
  759. padding: 10px 0;
  760. position: relative;
  761. }
  762. .uni-list-cell-left {
  763. white-space: nowrap;
  764. font-size: 28rpx;
  765. }
  766. .centered {
  767. text-align: center;
  768. background-color: #e2f4ff;
  769. }
  770. .text {
  771. background-color: #e2f4ff;
  772. height: 20rpx;
  773. }
  774. .view_bg_build {
  775. background-color: #e2f4ff;
  776. padding: 10px 10px 0 10px;
  777. margin: 0 auto;
  778. border: 1px solid #5bd3ff;
  779. white-space: nowrap;
  780. position: relative;
  781. z-index: 2;
  782. }
  783. .grid-text {
  784. font-size: 14px;
  785. color: #000000;
  786. text-align: center;
  787. padding-left: 30rpx;
  788. padding-right: 30rpx;
  789. padding-top: 20rpx;
  790. padding-bottom: 20rpx;
  791. }
  792. .name {
  793. flex: 0;
  794. font-size: 14px;
  795. color: #000000;
  796. overflow: hidden;
  797. text-overflow: ellipsis;
  798. white-space: nowrap;
  799. }
  800. .table-item {
  801. overflow: hidden;
  802. text-overflow: ellipsis;
  803. white-space: nowrap;
  804. }
  805. .block-iv {
  806. width: 20px;
  807. height: 20px;
  808. }
  809. .table {
  810. width: 100%;
  811. border-radius: 8rpx;
  812. background: #FFFFFF;
  813. /* border: 1rpx solid #EFEFEF; */
  814. font-size: 28rpx;
  815. margin-top: 40rpx;
  816. }
  817. .felx-row {
  818. width: 100%;
  819. display: flex;
  820. justify-content: space-between;
  821. align-items: center;
  822. }
  823. .h-tr {
  824. box-sizing: border-box;
  825. display: flex;
  826. flex-direction: row;
  827. flex-wrap: nowrap;
  828. justify-content: center;
  829. align-items: center;
  830. align-content: center;
  831. border-color: #ccc;
  832. border-style: solid;
  833. border-width: 0;
  834. border-width: 1px;
  835. color: #3d7dd7;
  836. }
  837. .h-td {
  838. box-sizing: border-box;
  839. padding: 3px;
  840. word-break: break-all;
  841. border-color: #ccc;
  842. border-style: solid;
  843. border-width: 1px;
  844. border-right-width: 1px;
  845. display: flex;
  846. flex-direction: row;
  847. flex-wrap: nowrap;
  848. justify-content: center;
  849. align-items: center;
  850. align-content: center;
  851. min-height: 64rpx;
  852. }
  853. .LouCeng {
  854. font-size: 30rpx;
  855. background-color: #4a4b52;
  856. color: #FFEB3B;
  857. font-weight: bold;
  858. }
  859. .Fang {
  860. width: 100%;
  861. display: inline-block;
  862. line-height: 50rpx;
  863. text-align: center;
  864. margin-right: 10px;
  865. margin-bottom: 10px;
  866. background-color: red;
  867. }
  868. .HuaDongBiao {
  869. display: flex;
  870. flex-direction: column-reverse;
  871. position: relative;
  872. }
  873. .NeiRong {
  874. display: flex;
  875. flex-wrap: nowrap;
  876. }
  877. .NeiRong :last-child {
  878. margin-right: 0 !important;
  879. }
  880. .ShiGongZhong {
  881. background-color: #5bd3ff;
  882. color: #000;
  883. }
  884. .WeiShiGong {
  885. background-color: #ffc881;
  886. color: #000;
  887. }
  888. .JunGong {
  889. background-color: #80d9ae;
  890. color: #000;
  891. }
  892. .container {
  893. display: flex;
  894. margin-left: 10px;
  895. width: 100%;
  896. margin-top: 10px;
  897. margin-right: 10px;
  898. justify-content: space-between;
  899. }
  900. .notice {
  901. margin: 20rpx;
  902. padding: 20rpx;
  903. background: #FFFFFF;
  904. box-shadow: 0rpx 8rpx 17rpx 0rpx rgba(0, 0, 0, 0.04);
  905. border-radius: 10rpx;
  906. }
  907. .text {
  908. border-left: 15rpx solid #3857F3;
  909. padding-left: 20rpx;
  910. }
  911. .share {
  912. width: 100%;
  913. height: 100%;
  914. }
  915. .share-box {
  916. width: 100%;
  917. height: 100%;
  918. position: fixed;
  919. top: 0rpx;
  920. left: 0rpx;
  921. bottom: 0rpx;
  922. right: 0rpx;
  923. background-color: rgba(0, 0, 0, 0.4);
  924. transition: .3s;
  925. z-index: 999;
  926. }
  927. .share-show {
  928. transition: all 0.3s ease;
  929. transform: translateY(0%) !important;
  930. }
  931. .scroll-Y {
  932. height: 350rpx;
  933. }
  934. .share-item {
  935. position: fixed;
  936. left: 0;
  937. bottom: 0;
  938. width: 100%;
  939. height: auto;
  940. background-color: #FFFFFF;
  941. transition: all 0.3s ease;
  942. transform: translateY(100%);
  943. z-index: 1999;
  944. border-top-left-radius: 40rpx;
  945. border-top-right-radius: 40rpx;
  946. .share-to {
  947. width: 100%;
  948. height: 3rem;
  949. display: flex;
  950. justify-content: center;
  951. align-items: center;
  952. &::after {
  953. content: '';
  954. width: 240rpx;
  955. height: 0rpx;
  956. border-top: 1px solid #E4E7ED;
  957. -webkit-transform: scaleY(0.5);
  958. transform: scaleY(0.5);
  959. margin-left: 30rpx;
  960. }
  961. &::before {
  962. content: '';
  963. width: 240rpx;
  964. height: 0rpx;
  965. border-top: 1px solid #E4E7ED;
  966. -webkit-transform: scaleY(0.5);
  967. transform: scaleY(0.5);
  968. margin-right: 30rpx;
  969. }
  970. }
  971. .content {
  972. width: 100%;
  973. height: 50%;
  974. display: flex;
  975. flex-wrap: wrap;
  976. .block {
  977. width: 100%;
  978. display: flex;
  979. flex-direction: column;
  980. justify-content: center;
  981. align-items: center;
  982. height: 80rpx;
  983. text {
  984. margin-top: 16rpx;
  985. font-size: 28rpx;
  986. color: #606266;
  987. }
  988. }
  989. }
  990. .cancel {
  991. width: 100%;
  992. height: 3rem;
  993. display: flex;
  994. justify-content: center;
  995. align-items: center;
  996. border-top: 1rpx solid #E4E7ED;
  997. }
  998. }
  999. </style>