Browse Source

查看房间历史
界面完善

付宇航 1 year ago
parent
commit
80fb8fd933

+ 9 - 0
src/api/zdsz/enginee.js

@@ -228,6 +228,15 @@ export function viewEngineeringCivilSource({id,type}) {
     })
 }
 
+// 查看房间历史
+export function viewQueryProcessSource(data) {
+    return request({
+      url: '/zdsz/engineeringCivil/queryProcess',
+      method: 'post',
+      data
+    })
+}
+
 // 查询民用工程详情
 export function viewEngineeringCivil(id) {
     return request({

+ 1 - 1
src/components/ConstructionDetails/index.vue

@@ -176,7 +176,7 @@
         </el-collapse>
       </el-tab-pane>
       <button class="check" @click="checkWorking" v-if="currentStatus == 'check' && reviewStatus " style="width: 80px;border: none;">审核</button>
-      <button class="check" @click="updateNodeOption" style="width: 94px;border: none;cursor: pointer;" v-if="currentStatus != 'check'">修改</button>
+      <button class="check" @click="updateNodeOption" style="width: 94px;border: none;cursor: pointer;" v-if="currentStatus != 'check' && status != 'read-only'  ">修改</button>
     </el-tabs>
     </el-dialog>
     <!-- 审核 -->

+ 64 - 11
src/views/zdsz/enginee/material/progres_visual/index.vue

@@ -151,12 +151,13 @@
         </div>
         <!-- 房间集合 -->
           <!-- 楼栋 or 单元 -->
-          <div style="width: 1618px;display: flex;padding-left: 3%;justify-content: space-around;">
+          <div style="min-width: 1618px;display: flex;overflow: hidden;overflow-x: scroll;">
             <div 
                 v-for="(e,idx) in roomsInfo"
                 :key="idx"
                 class="buildingContain"
             > 
+                <h2 style="text-align: center;">{{ e.unitName + '单元' }}</h2>
                 <!-- 楼层 -->
                 <div
                     v-for="(v,vdx) in e.roomStatusVoList"
@@ -170,14 +171,20 @@
                         :key="kdx"
                         class="room"
                         @click="toDetail(k)"
-                        :style="`background-color:${k.roomStatus == '未开工' ? '#999999' : k.roomStatus == '进行中' ? '#FFFF66' : '#009900'}`"
+                        :style="`background-color:${k.roomStatus == '未开工' ? '#999999' : k.roomStatus == '未完工' ? '#FFFF66' : '#009900'}`"
                     >
                         {{ k.roomName || '' }}
                     </div>
                 </div>
             </div>
           </div>
-        <!-- <ConstructionDetails/> -->
+          <ConstructionDetails
+            ref="ConstructionDetails"
+            :currentCollapses="currentCollapses"
+            :type="nodeDetailType"
+            :status="status"
+            enginType="民用工程"
+          />
     </div>
 </template>
 
@@ -186,16 +193,19 @@ import ConstructionDetails from '@/components/ConstructionDetails'
 import {getAreaList} from "@/api/zdsz/area";
 import {getBuildingList} from "@/api/zdsz/building";
 import {getUnits} from "@/api/zdsz/unit";
-import { getObtainRoomcCompletionInformationList } from "@/api/zdsz/enginee"
+import {getDicts} from "@/api/system/dict/data";
+import { getObtainRoomcCompletionInformationList ,viewQueryProcessSource} from "@/api/zdsz/enginee"
 export default {
     name:'ProgreVisual',
     components:{
         ConstructionDetails
     },
-    dicts:['district','engin_cycle'],
+    dicts:['district','engin_cycle','new_built'],
     data(){
         return {
             currentMenu:3,   // 0:用料管理 1:进度统计 2:可视化进度
+            currentCollapses:[],
+            status:'',
             typeOptions:[
                 {
                     value: '0',
@@ -250,11 +260,11 @@ export default {
                     color:'#009900'
                 },
                 {
-                    label:'进行中',
+                    label:'未完工',
                     color:'#FFFF66'
                 },
                 {
-                    label:'未开',
+                    label:'未开',
                     color:'#999999'
                 },
             ],
@@ -272,12 +282,51 @@ export default {
                 buildingId: null,
                 unitId: null,
             },
-            roomsInfo:[]
+            roomsInfo:[],
+            updateParams:{},
+            currentRoomId:null,
         }
     },
     methods:{
         toDetail(e){
-            console.log(e)
+            this.currentRoomId = e.roomId
+            let dictValue 
+            // 拼接字典
+            this.dict.type[e.enginCycle].forEach(v => {
+                if(v.label.includes('室内')){
+                    dictValue = e.enginCycle + '_' + v.value
+                }
+            })
+            // 加工字典
+            getDicts(dictValue).then(res => {
+                let dict = []
+                for (let i = 0; i < res.data.length; i++) {
+                    dict.push({
+                        "label": res.data[i].dictLabel,
+                        "value": res.data[i].dictValue,
+                    })
+                }
+                console.log(dict)
+                this.$refs.ConstructionDetails.open(dict)
+            })
+            this.status = 'read-only'
+        },
+        viewNodeSource(e) {
+            let params = {
+                type:e,
+                houseId:this.currentRoomId,
+            }
+            viewQueryProcessSource(params).then(res => {
+                console.log('______',res)
+                try {
+                this.updateParams = res.data
+                this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+                } catch (error) {
+                this.currentCollapses = [];
+                }
+                console.log('折叠面板info',this.currentCollapses)
+            })
+            this.$forceUpdate()
         },
         // 查询进度
         searchCompletionInfo(){
@@ -365,16 +414,18 @@ export default {
 }
 .buildingContain{
     height: 100%;
-    border: 1px solid #000;
     .unitFloor{
         display: flex;
         justify-content: space-around;
+        border: 1px solid #000;
         .room{
+            flex: 1;
             width: 50px;
             height: 25px;
             text-align: center;
             line-height: 25px;
             cursor: pointer;
+            box-shadow: inset 0px 0px 10px rgba(0,0,0,.6);
         }
     }
 
@@ -382,7 +433,9 @@ export default {
         margin-left: 2%;
     }
 }
-
+.buildingContain:not(:nth-child(1)){
+    margin-left: 5%;
+}
 .buildingContain .unitFloor:not(:nth-child(1)){
     margin-top: 2%;
 }