statistics.vue 29 KB

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