付宇航 hace 1 año
padre
commit
ecfa6a2d07

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

@@ -8,6 +8,15 @@ export function getAreaList({district}) {
     })
 }
 
+// 获取字典
+export function getDictType({dictType}) {
+    return request({
+        url: `/system/dict/data/type/${dictType}`,
+        method: 'get',
+    })
+}
+
+
 // 查询楼栋集合
 export function getBuildingList({areaId}) {
     return request({
@@ -50,6 +59,15 @@ export function getEngineeList({type, enginType ='',}) {
     })
 }
 
+// 查看市政工程历史
+export function viewEngineeringIndustrySource({id ,type}) {
+    return request({
+      url: `/zdsz/engineeringIndustry/${id}/${type}`,
+      method: 'get',
+    })
+}
+
+
 // 查询顶管列表(顶管 )
 export function getPipeJackingList({enginName = null}) {
     return request({
@@ -121,6 +139,15 @@ export function putEngineeringPipeJacking(data) {
     })
 }
 
+// 查看顶管工程历史
+export function detailEngineeringPipeJacking({id ,type}) {
+    return request({
+      url: `/zdsz/engineeringPipeJacking/${id}/${type}`,
+      method: 'get',
+    })
+}
+
+
 // 查询民用工程列表
 export function getEngineeringCivil() {
     return request({
@@ -200,6 +227,15 @@ export function putEngineeringInfrastructure(data) {
     })
 }
 
+// 历史基建工程
+export function viewEngineeringInfrastructureSource({id,type}) {
+    return request({
+      url: `/zdsz/engineeringInfrastructure/${id}/${type}`,
+      method: 'get',
+    })
+}
+
+
 // 查询基建工程列表
 export function getEngineeringInfrastructure({enginName = ''}) {
     return request({

+ 68 - 85
src/components/ConstructionDetails/index.vue

@@ -1,8 +1,8 @@
 
  <!-- 
-    *@description: 房间详情
+    *@description: 工程历史详情
     *@author: yh Fu
-    *@date: 2023-12-27 11:04:23
+    *@date: 2024-1-8 10:04:23
     *@version: V1.0.5 
 -->
 
@@ -13,95 +13,59 @@
         width="60%"
         append-to-body
         custom-class="ConstructionDetailsDialog">
-        <el-tabs v-model="activeName" type="card" @tab-click="handleClick" class="projectTabs">
-            <el-tab-pane label="拆旧管" name="0">
-                <el-collapse v-model="activeNames" class="rmOldPie">
-                    <el-collapse-item  name="1">
+        <el-tabs v-model="activeName" type="card" @tab-click="viewSource" class="projectTabs">
+            <el-tab-pane 
+                :label="e.label" 
+                :name="e.value"
+                v-for="(e,idx) in currentDicts"
+                :key="idx"
+                >
+                <el-collapse 
+                    class="rmOldPie"
+                    v-for="(e,idx) in currentCollapses"
+                    :key="idx"
+                    >
+                    <el-collapse-item  :name="idx">
                         <template slot="title">
                             <div style="display: flex;width: 100%;height: 100%;">
                                 <div style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
                                 </div>
-                                <h2 style="margin-left: 1%;font-weight: 700;">2023-12-25</h2>
+                                <h2 style="margin-left: 1%;font-weight: 700;">{{ e.updateTime }}</h2>
                             </div>
-                            
                         </template>
-                        <div>与现实生活一致:与现实生活的流程、逻辑保持一致,遵循用户习惯的语言和概念;</div>
-                        <div>在界面中一致:所有的元素和结构需保持一致,比如:设计样式、图标和文本、元素的位置等。</div>
-                    </el-collapse-item>
-                    <el-collapse-item name="2">
-                        <template slot="title">
-                            <div style="display: flex;width: 100%;height: 100%;">
-                                <div style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
-                                </div>
-                                <h2 style="margin-left: 1%;font-weight: 700;">2023-11-30</h2>
-                            </div>
-                        </template>
-                        <div>控制反馈:通过界面样式和交互动效让用户可以清晰的感知自己的操作;</div>
-                        <div>页面反馈:操作后,通过页面元素的变化清晰地展现当前状态。</div>
-                    </el-collapse-item>
-                    <el-collapse-item name="3">
-                        <template slot="title">
-                            <div style="display: flex;width: 100%;height: 100%;">
-                                <div style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
-                                </div>
-                                <h2 style="margin-left: 1%;font-weight: 700;">2023-11-27</h2>
-                            </div>
-                        </template>
-                        <div>简化流程:设计简洁直观的操作流程;</div>
-                        <div>清晰明确:语言表达清晰且表意明确,让用户快速理解进而作出决策;</div>
-                        <div>帮助用户识别:界面简单直白,让用户快速识别而非回忆,减少用户记忆负担。</div>
-                    </el-collapse-item>
-                    <el-collapse-item name="4">
-                        <template slot="title">
-                            <div style="display: flex;width: 100%;height: 100%;">
-                                <div style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
-                                </div>
-                                <h2 style="margin-left: 1%;font-weight: 700;">2023-11-20</h2>
-                            </div>
-                        </template>
-                        <div>用户决策:根据场景可给予用户操作建议或安全提示,但不能代替用户进行决策;</div>
-                        <div>结果可控:用户可以自由的进行操作,包括撤销、回退和终止当前操作等。</div>
-                    </el-collapse-item>
-                    <el-collapse-item name="5">
-                        <template slot="title">
-                            <div style="display: flex;width: 100%;height: 100%;">
-                                <div style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
-                                </div>
-                                <h2 style="margin-left: 1%;font-weight: 700;">2023-11-15</h2>
-                            </div>
-                        </template>
-                        <div>用户决策:根据场景可给予用户操作建议或安全提示,但不能代替用户进行决策;</div>
-                        <div>结果可控:用户可以自由的进行操作,包括撤销、回退和终止当前操作等。</div>
-                    </el-collapse-item>
-                    <el-collapse-item name="6">
-                        <template slot="title">
-                            <div style="display: flex;width: 100%;height: 100%;">
-                                <div style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
-                                </div>
-                                <h2 style="margin-left: 1%;font-weight: 700;">2023-11-7</h2>
-                            </div>
-                        </template>
-                        <div>用户决策:根据场景可给予用户操作建议或安全提示,但不能代替用户进行决策;</div>
-                        <div>结果可控:用户可以自由的进行操作,包括撤销、回退和终止当前操作等。</div>
-                    </el-collapse-item>
-                    <el-collapse-item name="7">
-                        <template slot="title">
-                            <div style="display: flex;width: 100%;height: 100%;">
-                                <div style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
-                                </div>
-                                <h2 style="margin-left: 1%;font-weight: 700;">2023-11-1</h2>
-                            </div>
-                        </template>
-                        <div>用户决策:根据场景可给予用户操作建议或安全提示,但不能代替用户进行决策;</div>
-                        <div>结果可控:用户可以自由的进行操作,包括撤销、回退和终止当前操作等。</div>
+                        <!--  人员信息 -->
+                        <div>
+                            负责人:{{ e.headName || '未知'}} &nbsp;&nbsp;
+                            施工人:{{ e.constructUser || '未知'}} &nbsp;&nbsp;
+                            负责人电话:{{ e.headPhone || '未知'}} &nbsp;&nbsp;
+                            施工人电话:{{ e.constructPhone || '未知'}}
+                        </div>
+                        <hr>
+                        <!--  用料明细 -->
+                        <div 
+                            v-for="(i,idx) in e.zEngineeringMaterialBo"
+                            :key="idx"
+                        >
+                            品牌:{{ i.brand || '未知'}}
+                            材质:{{ i.corrosionLevel || '未知'}}
+                            上门类型:{{ i.visitType || '未知'}}
+                        </div>
+                        <hr>
+                        <!-- 照片墙 -->
+                        <!-- <div style="width: 100%;height: 100%;">
+                            <img :src=require(v) v-for="v in e.zEngiineeringPhotoBoList" :key="v">
+
+                        </div> -->
+                        <ObsImageUpload 
+                          ref="obsImageUpload" 
+                          :limit="9999" 
+                          :fileType="['png', 'jpg', 'jpeg']"
+                          disabled
+                          :value="e.zEngiineeringPhotoBoList"
+                          ></ObsImageUpload>
                     </el-collapse-item>
                 </el-collapse>
-
             </el-tab-pane>
-            <el-tab-pane label="立杠" name="1">立杠</el-tab-pane>
-            <el-tab-pane label="挂表" name="2">挂表</el-tab-pane>
-            <el-tab-pane label="表后管" name="3">表后管</el-tab-pane>
-            <el-tab-pane label="管和阀" name="4">管和阀</el-tab-pane>
             <el-button class="check" @click="checkWorking">审核</el-button>
         </el-tabs>
     </el-dialog>
@@ -110,16 +74,29 @@
 <script>
 export default {
     name:'ConstructionDetails',
+    props:['currentCollapses'],
     data(){
         return {
-            dialogVisible:true,
-            activeNames: ['0']
+            currentDicts:[],              // 当前类型工程节点项
+            dialogVisible:false,
+            activeNames: ['0'],
         }
     },
     methods:{
+        // 查看单节点历史
+        viewSource(e){
+            console.log(this.$parent)
+            this.$parent.viewNodeSource(e.name)
+        },
         // 单项审核
         checkWorking(){
 
+        },  
+        // 查看历史
+        open(dicts){
+            console.log(dicts)
+            this.dialogVisible = true
+            this.currentDicts = dicts
         }
     }
 }
@@ -133,6 +110,10 @@ export default {
         height: 94%;
     }
 }
+
+::v-deep .el-upload--picture-card{
+    display: none;
+}
 .ConstructionDetailsDialog{
     position: absolute;
     .projectTabs{
@@ -145,9 +126,11 @@ export default {
         }
         ::v-deep .el-tabs__nav{
             border: none;
+            overflow: hidden;
+            overflow-x: scroll;
         }
         ::v-deep .el-tabs__item{
-            width: 47%;
+            // width: 47%;
             border: 1px solid #797979;
             border-radius: 5px;
         }

+ 96 - 5
src/components/EngineeNode/index.vue

@@ -11,7 +11,7 @@
   <div style="width: 100%; height: 100%;">
     <el-dialog :visible="nodeDetailVisible" :rules="nodeRules" title="节点信息" append-to-body customClass="appendElNodeDialog" width="70% !important"> 
       <!-- 节点选项卡 -->
-      <el-tabs type="border-card" class="engineNodeTypes">
+      <el-tabs type="border-card" class="engineNodeTypes" @tab-click="nodeHasChanged">
         <el-tab-pane label="基本信息"></el-tab-pane>
         <el-tab-pane 
           :label="e"
@@ -22,7 +22,7 @@
       </el-tabs>
       <!-- 节点表单 -->
         <el-form ref="nodeForm" :model="zEngineeringInfoBo" :rules="nodeRules" label-width="200px">
-            <el-form-item label="节点类型" prop="type">
+            <!-- <el-form-item label="节点类型" prop="type">
              <el-select v-model="nodeType" placeholder="请选择节点类型">
                   <el-option
                     v-for="e in dict.type.engineering_infrastructure"
@@ -31,7 +31,41 @@
                     :value="e.value"
                     ></el-option>
               </el-select>
-            </el-form-item>
+            </el-form-item> -->
+            <!-- <el-form-item label="工程类型" prop="enginType">
+              <el-select 
+                  v-model="currentEnginType" 
+                  placeholder="请选择工程类型"
+                  @change="enginTypeHasChanged"
+                  >
+                <el-option
+                  v-for="e in enginTypeOption"
+                  :key="e.value"
+                  :label="e.label"
+                  :value="e.value"
+                ></el-option>
+              </el-select>
+            </el-form-item> -->
+            <el-form-item label="工程类型">
+                <el-cascader
+                    v-model="value"
+                    :options="options"
+                    @change="currentEnginTypeChange">
+                </el-cascader>
+              </el-form-item>
+              <!-- <el-form-item label="工程节点">
+                <el-select 
+                    v-model="enginClassification" 
+                    placeholder="请选择工程节点"
+                    >
+                  <el-option
+                    v-for="e in enginClassificationOption"
+                    :key="e.value"
+                    :label="e.label"
+                    :value="e.value"
+                  ></el-option>
+                </el-select>
+              </el-form-item> -->
             <el-form-item label="施工地址" prop="constructAddre">
             <el-input v-model="zEngineeringInfoBo.constructAddre" placeholder="请填写施工地址"></el-input>
             </el-form-item>
@@ -171,7 +205,17 @@ import {
 } from "@/api/zdsz/enginee"
 export default {
     name:'EngineeNode',
-    dicts:['pass_check','is_repair','engin_type','self_closing_valve_type','visit_type','corrosion_level','brand','engineering_infrastructure'],
+    dicts:['pass_check',
+           'is_repair',
+           'engin_type',
+           'self_closing_valve_type',
+           'visit_type',
+           'corrosion_level',
+           'brand',
+           'engineering_infrastructure',
+           'old_renovation',
+           'new_built'
+          ],
     data(){
         return {
             nodeType:null,              // 节点类型
@@ -233,6 +277,32 @@ export default {
                 label:'不合格'
               }
             ],
+            currentEnginType:'',        // 当前所选工程类型
+            enginTypeOption:[
+              {
+                value:'old_renovation',
+                label:'旧改'
+              },
+              {
+                value:'new_built',
+                label:'新建'
+              }
+            ],
+            options:[
+              {
+                value:'old_renovation',
+                label:'旧改',
+                children:[],
+              },
+              {
+                value:'new_built',
+                label:'新增',
+                children:[]
+              }
+            ],
+            enginClassification:'',
+            enginClassificationOption:[],
+
             currentType:null ,          // 民用工程 0 ,市政工程 1,工业工程 2 ,顶管工程 3,危险作业工程 4,基建工程 5
             drawer: false,
             direction: 'rtl',
@@ -245,9 +315,30 @@ export default {
             },
             currentNode:[],
             nodeList:[],
+            currentPickedNode:{} ,        // 当前所选中的节点界面
           }
     },
+    created(){
+      this.options[0].children = this.dict.type.old_renovation
+      this.options[1].children = this.dict.type.new_built
+    },
     methods:{
+        nodeHasChanged(el){
+          this.$nodeForm.validate(e => {
+            if(e){
+              // 通过校验
+              this.currentPickedNode
+            }else{
+              this.$message.error('请完善当前节点信息!');
+            }
+          })
+
+          return 
+          // 拿到当前所选择的节点info
+          const nodeItem = this.dict.type.engineering_infrastructure.find(e => e.label == this.currentNode[el.index -1])
+          this.currentPickedNode = nodeItem
+          console.log(nodeItem)
+        },
         // 当前所选节点发生改变 
         currentNodeHasChanged(e){
         },
@@ -379,7 +470,7 @@ export default {
                 // }
             // });
         },
-        open(queryParams,type){
+        open(queryParams,type = null,nodeList = []){
             this.nodeList = []  // 节点初始化
             // 初始化工程节点
             this.dict.type.engineering_infrastructure.forEach(e => {

+ 27 - 2
src/views/zdsz/engineeringCivil/index.vue

@@ -308,6 +308,7 @@
         putEngineeringCivil,                       // 民用工程修改
         viewEngineeringCivil,                      // 民用工程查看详情
         deleteEngineeringCivil,                    // 删除民用工程
+        getDictType
       } from "@/api/zdsz/enginee"
       import EngineePipe from "@/components/EngineePipe"
       
@@ -325,7 +326,9 @@
                "new_built_indoor_engin",
                "new_built_courtyard_engin",
                "new_built_overhead",
-               "engin_cycle"
+               "engin_cycle",
+               "old_renovation",
+               "new_built"
             ],
         components:{
           EngineePipe,
@@ -611,12 +614,34 @@
         ],
         enginClassificationOption:[],          // 工程节点集合
         currentType:null,
+        old_renovation:[],
+        nodesItems:[]
           };
         },
         created() {
           this.getList();
           // this.getAreas();
         },
+        mounted(){
+          getDictType({dictType:'old_renovation'}).then(res => {
+            this.old_renovation = res.data
+            this.old_renovation.forEach(e => {
+              this.nodesItems.push({
+                value:'new_built_' + e.dictValue,
+                label:'新建' + e.dictLabel,
+                enginType:'old_renovation',
+                enginClassification:e.dictValue
+              })
+              this.nodesItems.push({
+                enginType:'new_built',
+                value:'old_renovation_' + e.dictValue,
+                label:'旧改' + e.dictLabel,
+                enginClassification:e.dictValue
+              })
+            })
+            console.log('民用工程所有三级节点集合',this.nodesItems)
+          })
+        },
         methods: {
         closeToSucceed(){
           this.open = false;
@@ -684,7 +709,7 @@
             this.queryParams.zEngineeringNodeBo.type = this.enginClassification
             this.queryParams.enginClassification = result
             console.log(this.queryParams)
-            this.$refs.childNode.open(this.queryParams,0)
+            this.$refs.childNode.open(this.queryParams,0,)
             return
             this.$refs['form'].validate(e => {
               if(e){

+ 8 - 1
src/views/zdsz/engineeringIndustry/index.vue

@@ -87,6 +87,12 @@
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
               <template slot-scope="scope">
                 <el-button
+                  type="text"
+                  icon="el-icon-edit"
+                  size="mini"
+                  @click="viewSource(scope.row)"
+                >历史</el-button>
+                <el-button
                   size="mini"
                   type="text"
                   icon="el-icon-edit"
@@ -271,7 +277,8 @@
         addEngineeEngineeIndustry,                         // 新增工程
         putEngineeEngineeIndustry,                         // 查询工程详情
         EditEngineeEngineeIndustry,                        // 修改工程
-        DelEngineeEngineeIndustry                          // 删除工程
+        DelEngineeEngineeIndustry,                         // 删除工程
+        viewEngineeringIndustrySource
       } from "@/api/zdsz/engineeringIndustry"
       import EngineePipe from "@/components/EngineePipe"
       import {addEnginee} from "@/api/zdsz/enginee";

+ 40 - 3
src/views/zdsz/engineeringInfrastructure/index.vue

@@ -75,6 +75,12 @@
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
+            type="text"
+            icon="el-icon-edit"
+            size="mini"
+            @click="viewSource(scope.row)"
+          >历史</el-button>
+          <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
@@ -158,11 +164,18 @@
       ref="childNode"
       @closeToSucceed="closeToSucceed"
       />
+
+    <!-- 查看历史 -->
+    <ConstructionDetails 
+      ref="ConstructionDetails"
+      :currentCollapses="currentCollapses"
+      />
   </div>
 </template>
 
 <script>
-import { listComprehensive, getComprehensive, delComprehensive, addComprehensive, updateComprehensive } from "@/api/zdsz/comprehensive";
+import { listComprehensive, getComprehensive, delComprehensive, addComprehensive, updateComprehensive} from "@/api/zdsz/comprehensive";
+import { viewEngineeringInfrastructureSource } from "@/api/zdsz/enginee"
 import {getBuildings} from "@/api/zdsz/building";
 import {getUnits} from "@/api/zdsz/unit";
 import {getAreas} from "@/api/zdsz/area";
@@ -180,6 +193,7 @@ import {
   deleteEngineeringInfrastructure,                    // 删除民用工程
 } from "@/api/zdsz/enginee"
 import EngineePipe from "@/components/EngineePipe"
+import ConstructionDetails from "@/components/ConstructionDetails" 
 
 export default {
   name: "openrepair",
@@ -195,11 +209,13 @@ export default {
          "new_built_indoor_engin",
          "new_built_courtyard_engin",
          "new_built_overhead",
-         "engin_cycle"
+         "engin_cycle",
+         "engineering_infrastructure"
       ],
   components:{
     EngineePipe,
-    EngineeNode
+    EngineeNode,
+    ConstructionDetails
   },
   data() {
       var validatePass = (rule, value, callback) => {
@@ -214,6 +230,7 @@ export default {
           }
       };
     return {
+      currentCollapses:[],
       searchParams:{
         enginName:''
       },
@@ -490,6 +507,26 @@ export default {
     // this.getAreas();
   },
   methods: {
+  // 查看历史
+  viewSource(e){
+    console.log(e)
+    this.currentId = e.id
+    this.$refs.ConstructionDetails.open(this.dict.type.engineering_infrastructure)
+  },
+  viewNodeSource(e){
+    viewEngineeringInfrastructureSource({
+      id:this.currentId,
+      type:e
+    }).then(res => {
+      console.log(res)
+      try {
+        this.currentCollapses = res.data.zengineeringNodeBoList[0].zEngineeringInfoBoList
+      } catch (error) {
+        this.currentCollapses = [];
+      }
+      console.log('折叠面板info',this.currentCollapses)
+    })
+  },
   closeToSucceed(){
     this.open = false;
     this.getList()

+ 38 - 3
src/views/zdsz/engineeringPipeJacking/index.vue

@@ -55,6 +55,12 @@
             <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
               <template slot-scope="scope">
+                  <el-button
+                    type="text"
+                    icon="el-icon-edit"
+                    size="mini"
+                    @click="viewSource(scope.row)"
+                  >历史</el-button>
                 <el-button
                   size="mini"
                   type="text"
@@ -228,26 +234,36 @@
 
           <!-- 顶管工程修改 -->
           <EngineePipe ref="enginPipe"/>
+
+          <!-- 查看历史 -->
+          <ConstructionDetails 
+            ref="ConstructionDetails"
+            :currentCollapses="currentCollapses"
+            />
         </div>
       </template>
 
       <script>
-      import EngineePipe from "@/components/EngineePipe"
+      import EngineePipe from "@/components/EngineePipe"   
+      import ConstructionDetails from "@/components/ConstructionDetails"             // 查看历史
       import {
         addEnginee,                                // 新增工程
         getPipeJackingList,                        // 顶管工程列表
         viewEngineeringPipeJacking,                // 顶管工程查看详情
         deleteEngineeringPipeJacking,              // 删除工程查看详情
+        detailEngineeringPipeJacking,              // 历史
       } from "@/api/zdsz/enginee"
 
       export default {
         name: "openrepair",
         components:{
-          EngineePipe
+          EngineePipe,
+          ConstructionDetails
         },
-        dicts:['pass_check','is_repair','engin_type','self_closing_valve_type','visit_type'],
+        dicts:['pass_check','is_repair','engin_type','self_closing_valve_type','visit_type','pipe_jack'],
         data() {
           return {
+            currentCollapses:[],  // 当前节点历史数据
             // 按钮loading
             buttonLoading: false,
             // 遮罩层
@@ -423,6 +439,25 @@
           this.getList();
         },
         methods: {
+          // 查看历史
+          viewSource(e){
+            this.currentId = e.id
+            this.$refs.ConstructionDetails.open(this.dict.type.pipe_jack)
+          },
+          viewNodeSource(e){
+            console.log(e)
+            detailEngineeringPipeJacking({
+              id:this.currentId,
+              type:e
+            }).then(res => {
+              try {
+                this.currentCollapses = res.data.zengineeringNodeBoList[0].zEngineeringInfoBoList
+              } catch (error) {
+                this.currentCollapses = [];
+              }
+              console.log(this.currentCollapses)
+            })
+          },
           nodeCancel(){
             this.nodeDetailVisible = false
           },