index.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. <!--
  2. *@description: 可视化进度
  3. *@author: yh Fu
  4. *@date: 2023-12-25 13:27:19
  5. *@version: V1.0.5
  6. -->
  7. <template>
  8. <div class="progresVisualContainer">
  9. <el-radio-group v-model="currentMenu" style="margin-bottom: 20px;" @input="toModule">
  10. <el-radio-button label="0">用料统计</el-radio-button>
  11. <el-radio-button label="1">进度统计</el-radio-button>
  12. <el-radio-button label="2">可视化统计</el-radio-button>
  13. <el-radio-button label="3">可视化进度</el-radio-button>
  14. </el-radio-group>
  15. <div class="topContain">
  16. <el-form :model="searchParam" ref="searchForm" class="searchForm">
  17. <el-form-item label="行政区" prop="district">
  18. <el-select v-model="info.district" placeholder="请选择行政区" clearable
  19. @change="searchParam.areaId = undefined;getAreaList(info.district)"
  20. @clear="searchParam.areaId = undefined;areaList=[];
  21. searchParam.buildingId = undefined;buildingList=[];
  22. searchParam.unitId = undefined;unitList=[]">
  23. <el-option
  24. v-for="dict in dict.type.district"
  25. :key="dict.value"
  26. :label="dict.label"
  27. :value="dict.value"
  28. />
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item label="小区名称" prop="areaId">
  32. <el-select v-model="searchParam.areaId" filterable clearable placeholder="请选择小区"
  33. @change="searchParam.buildingId = undefined;getBuildingList1(searchParam.areaId)"
  34. @clear="searchParam.buildingId = undefined;buildingList=[];
  35. searchParam.unitId = undefined;unitList=[]">
  36. <el-option
  37. v-for="item in areaList"
  38. :key="item.id"
  39. :label="item.name"
  40. :value="item.id">
  41. </el-option>
  42. </el-select>
  43. </el-form-item>
  44. <el-form-item label="楼宇名称" prop="buildingId">
  45. <el-select v-model="searchParam.buildingId" filterable clearable placeholder="请选择楼宇"
  46. @change="searchParam.unitId = undefined;getUnitList1(searchParam.buildingId)"
  47. @clear="searchParam.unitId = undefined;unitList=[]"
  48. >
  49. <el-option
  50. v-for="item in buildingList"
  51. :key="item.id"
  52. :label="item.name"
  53. :value="item.id">
  54. </el-option>
  55. </el-select>
  56. </el-form-item>
  57. <el-form-item label="单元" prop="unitId">
  58. <el-select v-model="searchParam.unitId" placeholder="请选择单元" filterable clearable>
  59. <el-option
  60. v-for="obj in unitList"
  61. :key="obj.id"
  62. :label="obj.name"
  63. :value="obj.id"
  64. ></el-option>
  65. </el-select>
  66. </el-form-item>
  67. <el-form-item label="工程周期" prop="enginCycle">
  68. <el-select
  69. :disabled="title == '添加用料' "
  70. v-model="searchParam.enginCycle"
  71. placeholder="请填写工程周期"
  72. >
  73. <el-option
  74. v-for="e in dict.type.engin_cycle"
  75. :key="e.value"
  76. :label="e.label"
  77. :value="e.value"
  78. ></el-option>
  79. </el-select>
  80. </el-form-item>
  81. </el-form>
  82. <!-- <div style="width: 100%;height: 100%;">
  83. <el-select
  84. v-model="currentCommunity"
  85. placeholder="请选择行政区"
  86. class="projectSelect"
  87. popper-class="projectDropDown"
  88. :popper-append-to-body="false"
  89. >
  90. <el-option
  91. v-for="e in communityOptions"
  92. :key="e.value"
  93. :label="e.label"
  94. :value="e.value">
  95. </el-option>
  96. </el-select>
  97. <el-select
  98. v-model="currentCommunity"
  99. placeholder="请选择小区"
  100. class="projectSelect"
  101. popper-class="projectDropDown"
  102. :popper-append-to-body="false"
  103. >
  104. <el-option
  105. v-for="e in communityOptions"
  106. :key="e.value"
  107. :label="e.label"
  108. :value="e.value">
  109. </el-option>
  110. </el-select>
  111. <el-select
  112. v-model="currentType"
  113. placeholder="请选择工程类型"
  114. class="projectSelect"
  115. popper-class="projectDropDown"
  116. :popper-append-to-body="false"
  117. >
  118. <el-option
  119. v-for="e in typeOptions"
  120. :key="e.value"
  121. :label="e.label"
  122. :value="e.value">
  123. </el-option>
  124. </el-select>
  125. <el-date-picker
  126. v-model="currentDate"
  127. class="projectSelect"
  128. popper-class="projectDropDown"
  129. :popper-append-to-body="false"
  130. type="date"
  131. placeholder="选择日期">
  132. </el-date-picker>
  133. </div> -->
  134. <el-button class="searchBtn" @click="searchCompletionInfo">查询</el-button>
  135. <el-button class="searchBtn">导出</el-button>
  136. <div class="unitStatus">
  137. <div
  138. v-for="(e,idx) in unitStatusOption"
  139. :key="idx"
  140. :style="`background-color:${e.color};width: 22%;height: 35px;position: absolute;right:${idx*130}px;box-shadow:0 5px 5px 0 #CDCDCD`"
  141. >
  142. <div
  143. style="position: relative;left: 107%;width: 116%;top: 20%;"
  144. >
  145. {{ e.label }}
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. <!-- 房间集合 -->
  151. <!-- 楼栋 or 单元 -->
  152. <div style="min-width: 1618px;display: flex;overflow: hidden;overflow-x: scroll;">
  153. <div
  154. v-for="(e,idx) in roomsInfo"
  155. :key="idx"
  156. class="buildingContain"
  157. >
  158. <h2 style="text-align: center;">{{ e.unitName + '单元' }}</h2>
  159. <!-- 楼层 -->
  160. <div
  161. v-for="(v,vdx) in e.roomStatusVoList"
  162. :key="vdx"
  163. class="unitFloor"
  164. >
  165. {{ v.notstart || '' }}
  166. <!-- 房间 -->
  167. <div
  168. v-for="(k,kdx) in v"
  169. :key="kdx"
  170. class="room"
  171. @click="toDetail(k)"
  172. :style="`background-color:${k.roomStatus == '未开工' ? '#999999' : k.roomStatus == '未完工' ? '#FFFF66' : '#009900'}`"
  173. >
  174. {{ k.roomName || '' }}
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. <ConstructionDetails
  180. ref="ConstructionDetails"
  181. :currentCollapses="currentCollapses"
  182. :type="nodeDetailType"
  183. :status="status"
  184. enginType="民用工程"
  185. />
  186. </div>
  187. </template>
  188. <script>
  189. import ConstructionDetails from '@/components/ConstructionDetails'
  190. import {getAreaList} from "@/api/zdsz/area";
  191. import {getBuildingList} from "@/api/zdsz/building";
  192. import {getUnits} from "@/api/zdsz/unit";
  193. import {getDicts} from "@/api/system/dict/data";
  194. import { getObtainRoomcCompletionInformationList ,viewQueryProcessSource} from "@/api/zdsz/enginee"
  195. export default {
  196. name:'ProgreVisual',
  197. components:{
  198. ConstructionDetails
  199. },
  200. dicts:['district','engin_cycle','new_built'],
  201. data(){
  202. return {
  203. currentMenu:3, // 0:用料管理 1:进度统计 2:可视化进度
  204. currentCollapses:[],
  205. status:'',
  206. typeOptions:[
  207. {
  208. value: '0',
  209. label: '市政工程'
  210. },
  211. {
  212. value: '1',
  213. label: '工业工程'
  214. },
  215. {
  216. value: '2',
  217. label: '民用工程'
  218. },
  219. {
  220. value: '3',
  221. label: '危险作业'
  222. },
  223. {
  224. value: '4',
  225. label: '顶管工程'
  226. },
  227. {
  228. value: '5',
  229. label: '基建工程'
  230. }
  231. ],
  232. communityOptions:[
  233. {
  234. value: '0',
  235. label: '领秀世家'
  236. },
  237. {
  238. value: '1',
  239. label: '上东府里'
  240. },
  241. {
  242. value: '2',
  243. label: '清华园'
  244. },
  245. {
  246. value: '3',
  247. label: '万科蓝山'
  248. },
  249. {
  250. value: '4',
  251. label: '龙腾香格里'
  252. },
  253. ],
  254. unitStatusOption:[
  255. {
  256. label:'竣工',
  257. color:'#009900'
  258. },
  259. {
  260. label:'未完工',
  261. color:'#FFFF66'
  262. },
  263. {
  264. label:'未开工',
  265. color:'#999999'
  266. },
  267. ],
  268. currentType:null,
  269. currentCommunity:null,
  270. areaList:[],
  271. buildingList:[],
  272. unitList:[],
  273. info:{
  274. district: undefined,
  275. },
  276. searchParam:{
  277. enginCycle:null,
  278. areaId: null,
  279. buildingId: null,
  280. unitId: null,
  281. },
  282. roomsInfo:[],
  283. updateParams:{},
  284. currentRoomId:null,
  285. currentEnginType:null,
  286. currentEnginClassification:'indoor_engin',
  287. }
  288. },
  289. methods:{
  290. toDetail(e){
  291. this.currentRoomId = e.roomId
  292. let dictValue
  293. // 拼接字典
  294. this.dict.type[e.enginCycle].forEach(v => {
  295. if(v.label.includes('室内')){
  296. this.currentEnginType = e.enginCycle
  297. dictValue = e.enginCycle + '_' + v.value
  298. }
  299. })
  300. // 加工字典
  301. getDicts(dictValue).then(res => {
  302. let dict = []
  303. for (let i = 0; i < res.data.length; i++) {
  304. dict.push({
  305. "label": res.data[i].dictLabel,
  306. "value": res.data[i].dictValue,
  307. })
  308. }
  309. console.log(dict)
  310. this.$refs.ConstructionDetails.open(dict)
  311. })
  312. this.status = 'read-only'
  313. },
  314. viewNodeSource(e) {
  315. let params = {
  316. type:e,
  317. houseId:this.currentRoomId,
  318. enginClassification:this.currentEnginClassification,
  319. enginType:this.currentEnginType
  320. }
  321. viewQueryProcessSource(params).then(res => {
  322. console.log('______',res)
  323. try {
  324. this.updateParams = res.data
  325. this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
  326. } catch (error) {
  327. this.currentCollapses = [];
  328. }
  329. console.log('折叠面板info',this.currentCollapses)
  330. })
  331. this.$forceUpdate()
  332. },
  333. // 查询进度
  334. searchCompletionInfo(){
  335. getObtainRoomcCompletionInformationList(this.searchParam).then(res => {
  336. let info = []
  337. info = res.data
  338. info.forEach(e => {
  339. e.roomStatusVoList = e.roomStatusVoList.reverse()
  340. })
  341. this.roomsInfo = info
  342. })
  343. },
  344. getAreaList(district) {
  345. if (district === undefined || district == null || district === '')
  346. return
  347. console.log(getAreaList)
  348. getAreaList({district: district}).then(res => this.areaList = res.data)
  349. },
  350. getBuildingList1(areaId) {
  351. if (areaId === undefined || areaId == null || areaId === '')
  352. return
  353. getBuildingList({areaId: areaId}).then(res => this.buildingList = res.data)
  354. },
  355. getUnitList1(buildingId) {
  356. if (buildingId === undefined || buildingId == null || buildingId === '')
  357. return
  358. getUnits(_, buildingId).then(res => this.unitList = res.data)
  359. },
  360. toModule(){
  361. console.log(this.$router)
  362. const currentPage = this.currentMenu == 0 ? 'material_statistics' : this.currentMenu == 1 ? 'progres_statistics' :this.currentMenu == 2 ? 'echarts_statistics': 'progres_visual'
  363. this.$router.push({
  364. path:`/${currentPage}`
  365. })
  366. }
  367. }
  368. }
  369. </script>
  370. <style lang="scss" scoped>
  371. .progresVisualContainer{
  372. width: 100%;
  373. height: 100%;
  374. padding: 1%;
  375. .topContain{
  376. display: flex;
  377. justify-content: space-between;
  378. width: 60%;
  379. .searchBtn{
  380. height: 100%;
  381. width: 11%;
  382. background-color: #1890FF;
  383. color: #fff;
  384. }
  385. ::v-deep .projectSelect{
  386. width: 20% !important;
  387. .el-input__inner{
  388. background-color: #1890FF;
  389. color: #fff;
  390. }
  391. }
  392. .projectDropDown{
  393. background-color: #1890FF;
  394. .el-select-dropdown__item{
  395. background-color: #1890FF;
  396. color: #fff;
  397. }
  398. ::v-deep .el-select-dropdown__list {
  399. padding-top: 0 !important;
  400. padding-bottom: 0;
  401. }
  402. }
  403. .projectDropDown >ul{
  404. padding-top: 0 ;
  405. padding-bottom: 0;
  406. }
  407. .unitStatus{
  408. width: 13%;
  409. display: flex;
  410. position: absolute;
  411. right: 7%;
  412. height: 5%;
  413. }
  414. }
  415. }
  416. .buildingContain{
  417. height: 100%;
  418. .unitFloor{
  419. display: flex;
  420. justify-content: space-around;
  421. border: 1px solid #000;
  422. .room{
  423. flex: 1;
  424. width: 50px;
  425. height: 25px;
  426. text-align: center;
  427. line-height: 25px;
  428. cursor: pointer;
  429. box-shadow: inset 0px 0px 10px rgba(0,0,0,.6);
  430. }
  431. }
  432. .unitFloor >div:not(:nth-child(1)){
  433. margin-left: 2%;
  434. }
  435. }
  436. .buildingContain:not(:nth-child(1)){
  437. margin-left: 5%;
  438. }
  439. .buildingContain .unitFloor:not(:nth-child(1)){
  440. margin-top: 2%;
  441. }
  442. ::v-deep .searchForm{
  443. display: flex;
  444. .el-form-item{
  445. width: 205px;
  446. }
  447. .el-select{
  448. width: 135px;
  449. }
  450. }
  451. </style>