6 Commits 443e401d3f ... b716f3cea0

Author SHA1 Message Date
  xiebeibei b716f3cea0 fix:附加数据功能编辑提示文字显示 3 years ago
  xiebeibei c1f9e06f3e fix:附加数据功能编辑修改下拉框提示文字 3 years ago
  xiebeibei 2358c123e8 fix:附加数据功能编辑弹窗样式修改 3 years ago
  xiebeibei 7c20bbe22a fix:附加数据功能接口联调+阿里云服务部署调试 3 years ago
  xiebeibei 883a60c009 fix:附加数据功能接口联调 3 years ago
  xiebeibei 4e5363843d 测试联调 3 years ago

+ 1 - 1
package.json

@@ -6,7 +6,7 @@
         "host": "60.205.177.43",
         "path": "/root/apps/web/wandaBmGuide",
         "user": "root",
-        "password": "persagy_2021Persagy%#$=",
+        "password": "persagy_2021Persagy%#$",
         "local": "wandaBmGuide"
     },
     "scripts": {

+ 4 - 4
src/api/equipmentList.js

@@ -89,12 +89,12 @@ export function previewExecl({ getParams }) {
 
 
 // 设备设施附加数据-查看数据是否填写完整
-export function addDataCheckComplete({ data }) {
-    return httputils.fetchJson(`/data/addData/checkComplete`, data)
+export function addDataCheckComplete({ data, postParams }) {
+    return httputils.fetchJson(`/data/addData/checkComplete`, data ,postParams)
 }
 // 设备设施附加数据-消防系统数据预览/数据回显
-export function addDataPreviewFireControl({ data }) {
-    return httputils.fetchJson(`/data/addData/previewFireControl`, data)
+export function addDataPreviewFireControl({ data, postParams }) {
+    return httputils.fetchJson(`/data/addData/previewFireControl`, data, postParams)
 }
 // 设备设施附加数据-弱电系统数据预览/回显
 export function addDataPreviewWeakCurrent({ data, postParams }) {

+ 243 - 103
src/views/equipment/addDataDialog.vue

@@ -48,15 +48,18 @@
                     <span class="bg"></span>
                     <span>编辑附加数据</span>
                 </div>
-                <div class="dialog-right-table"  v-if="systemName=='弱电系统'">
+                <div class="dialog-right-table" ref="dialogRightTable"  v-if="systemName=='弱电系统'">
                     <a-table :columns="examplesTableHeaderREdit" :data-source="addDataTableData" bordered :pagination="false" :scroll="{ y: height }" >
                     </a-table>
                     <i @click="addFun" class="el-icon-circle-plus-outline" style="color:#2AA4FF;font-size: 16px;position: absolute;margin-top: -5px;margin-left: -5px;cursor: pointer; "></i>
                 </div>
-                <div class="dialog-right-table" v-if="systemName=='消防系统'">
+                <div class="dialog-right-table" ref="dialogRightTable" v-if="systemName=='消防系统'">
                     <a-table :columns="examplesTableHeaderEdit" :data-source="addDataTableData" bordered :pagination="false" :scroll="{ y: height }" >
                    <span slot="fireZone" slot-scope="text,record,index">
-                       <a-input v-model="text" placeholder="请输入" type="normal" @change="getFireZoneFun(text,index)" :maxLength="15"/>
+                     <el-tooltip  popper-class="tooltip-class" effect="dark" :manual="true" :content="text" placement="top" :disabled="record.tooltipDisableFize" :value="!record.tooltipDisableFize">
+                             <a-input v-model="text" placeholder="请输入" type="normal" @change="getFireZoneFun(text,index)" :maxLength="15" @focus="focusTooltip(record,'fireZone','tooltipDisableFize',index)" @blur="blurToopTip('tooltipDisableFize',index)"/>
+                        </el-tooltip>
+<!--                        <a-input v-else v-model="text" placeholder="请输入" type="normal" @change="getFireZoneFun(text,index)" :maxLength="15" @focus="focusTooltip('tooltipDisableFize',index)" @blur="blurToopTip('tooltipDisableFize',index)"/>-->
                    </span>
                    <span slot="isFm" slot-scope="text,record,index">
                       <Select width="60" v-model="text" :isReadOnly="true" @change="isFmFun(text,index)" :hideClear='true' :selectdata="isFmData" :placeholder="'请选择'"/>
@@ -99,16 +102,6 @@
 <script>
     import addDataTable from "./addDataTable";
     import {addDataSaveWeakCurrent,addDataSaveFireControl} from "@/api/equipmentList.js";
-    const renderContent = (value, row, index) => {
-        const obj = {
-            children: value,
-            attrs: {},
-        };
-        if (index === 2) {
-            obj.attrs.colSpan = 0;
-        }
-        return obj;
-    };
     export default {
         name: "addDataDialog",
         components:{addDataTable},
@@ -132,22 +125,54 @@
                     {dataIndex: 'isFm', align: 'center', title: '是否属于非工程  物业管理范围', width: 100, scopedSlots: { customRender: 'isFm' },},
                     {dataIndex: 'hostNum', title: '主机编号', align: 'center', customRender: (text, row, index) => {
                             var self = this;
-                            var child = self.$createElement("a-input", {
-                                domProps: {
-                                },
+                            var child = self.$createElement("el-tooltip", {
                                 attrs:{
-                                    value: text,
-                                    placeholder:'请输入',
-                                    maxLength:15
-                                },
-                                on:{
-                                    change(event){
-                                        if(row.isFm=='1') {
-                                            self.$set(self.addDataTableData[index], 'hostNum', event.target.value);
+                                    placement:"top",
+                                    content:text,
+                                    manual:true,
+                                    disabled:row.tooltipDisablHost,
+                                    value:!row.tooltipDisablHost,
+                                    popperClass:'tooltip-class'
+                                }
+                            },[
+                                self.$createElement("a-input", {
+                                    attrs:{
+                                        value: text,
+                                        placeholder:'请输入',
+                                        maxLength:15,
+
+                                    },
+                                    on:{
+                                        change(event){
+                                            if(row.isFm=='1') {
+                                                self.$set(self.addDataTableData[index], 'hostNum', event.target.value);
+                                                if(event.target.value){
+                                                    self.$set( self.addDataTableData[index],'tooltipDisablHost',false)
+                                                }else{
+                                                    self.$set( self.addDataTableData[index],'tooltipDisablHost',true)
+                                                }
+                                            }
+                                        },
+                                        focus(){
+                                            self.addDataTableData.map(item=>{
+                                                item['tooltipDisablHost'] = true
+                                            })
+                                            if(row['hostNum']){
+                                                self.$set( self.addDataTableData[index],'tooltipDisablHost',false)
+                                                console.log(self.addDataTableData[index]);
+                                            }else{
+                                                self.$set( self.addDataTableData[index],'tooltipDisablHost',true)
+                                            }
+
+                                            self.$forceUpdate()
+                                        },
+                                        blur(){
+                                            self.$set( self.addDataTableData[index],'tooltipDisablHost',true);
+                                            self.$forceUpdate()
                                         }
                                     }
-                                }
-                            });
+                                })
+                            ]);
                             let  manageScopeData = [
                                 {id:'写字楼管理范围', name: '写字楼管理范围'},
                                 {id:'合作方管理范围', name: '合作方管理范围'},
@@ -160,12 +185,11 @@
                                 attrs:{
                                     value:row.manageScope,
                                     selectdata:manageScopeData,
-                                    hideClear:true
+                                    hideClear:true,
+                                    placeholder:'请选择管理范围'
                                 },
                                 on:{
                                     change(event){
-                                        console.log(event);
-                                        console.log(self.addDataTableData[index]);
                                         self.$set(self.addDataTableData[index],'manageScope',event.id);
                                     }
                                 }
@@ -181,23 +205,53 @@
                         }},
                     {dataIndex: 'loopNum', title: '回路编号', align: 'center', customRender: (text, row, index) => {
                             var self = this;
-                            var child = self.$createElement("a-input", {
-                                domProps: {
-
-                                },
+                            var child = self.$createElement("el-tooltip", {
                                 attrs:{
-                                    value: text,
-                                    placeholder:'请输入',
-                                    maxLength:15
-                                },
-                                on:{
-                                    change(event){
-                                        if(row.isFm=='yes') {
-                                            self.$set(self.examplesTableData2[index], 'loopNum', event.target.value);
+                                    placement:"top",
+                                    content:text,
+                                    manual:true,
+                                    disabled:row.tooltipDisablLoop,
+                                    value:!row.tooltipDisablLoop,
+                                    popperClass:'tooltip-class'
+                                }
+                            },[
+                                self.$createElement("a-input", {
+                                    attrs:{
+                                        value: text,
+                                        placeholder:'请输入',
+                                        maxLength:15,
+
+                                    },
+                                    on:{
+                                        change(event){
+                                            if(row.isFm=='1') {
+                                                self.$set(self.addDataTableData[index], 'loopNum', event.target.value);
+                                                if(event.target.value){
+                                                    self.$set( self.addDataTableData[index],'tooltipDisablLoop',false)
+                                                }else{
+                                                    self.$set( self.addDataTableData[index],'tooltipDisablLoop',true)
+                                                }
+                                            }
+                                        },
+                                        focus(){
+                                            self.addDataTableData.map(item=>{
+                                                item['tooltipDisablLoop'] = true
+                                            })
+                                            if(row['loopNum']){
+                                                self.$set( self.addDataTableData[index],'tooltipDisablLoop',false)
+                                            }else{
+                                                self.$set( self.addDataTableData[index],'tooltipDisablLoop',true)
+                                            }
+
+                                            self.$forceUpdate()
+                                        },
+                                        blur(){
+                                            self.$set( self.addDataTableData[index],'tooltipDisablLoop',true);
+                                            self.$forceUpdate()
                                         }
                                     }
-                                }
-                            });
+                                })
+                            ]);
                             const obj = {
                                 children: row.isFm=='1'?child:text,
                                 attrs: {},
@@ -325,7 +379,7 @@
                             }
                             return obj;
                         },},
-                    {dataIndex: 'fireHydrantCount', title: '消火栓数量', align: 'center', customRender: (text, row, index) => {
+                    {dataIndex: 'fireHydrantCount', title: '消火栓数量', align: 'center',width:87, customRender: (text, row, index) => {
                             var self = this;
                             var child = self.$createElement("a-input", {
                                 attrs:{
@@ -479,19 +533,53 @@
                     {
                         dataIndex: 'fireZone', title: '分区', align: 'center',  customRender: (text, row, index) => {
 
-                            var self = this
-                            var child = self.$createElement("a-input", {
+                            var self = this;
+                            var child = self.$createElement("el-tooltip", {
                                 attrs:{
-                                    value: text,
-                                    maxLength:15,
-                                    placeholder:'请输入',
+                                    placement:"top",
+                                    content:text,
+                                    manual:true,
+                                    disabled:row.tooltipDisableFize,
+                                    value:!row.tooltipDisableFize,
+                                    popperClass:'tooltip-class'
                                 },
-                                on:{
-                                    input(event){
-                                        self.$set( self.addDataTableData[index],'fireZone',event.target.value)
+                            },[
+                                self.$createElement("a-input", {
+                                    attrs:{
+                                        value: text,
+                                        placeholder:'请输入',
+                                        maxLength:15,
+
+                                    },
+                                    on:{
+                                        change(event){
+                                            self.$set(self.addDataTableData[index], 'fireZone', event.target.value);
+                                            if(event.target.value){
+                                                self.$set( self.addDataTableData[index],'tooltipDisableFize',false)
+                                            }else{
+                                                self.$set( self.addDataTableData[index],'tooltipDisableFize',true)
+                                            }
+                                        },
+                                        focus(){
+                                            self.addDataTableData.map(item=>{
+                                                item['tooltipDisableFize'] = true
+                                            })
+                                            if(row['fireZone']){
+                                                self.$set( self.addDataTableData[index],'tooltipDisableFize',false)
+                                                console.log(self.addDataTableData[index]);
+                                            }else{
+                                                self.$set( self.addDataTableData[index],'tooltipDisableFize',true)
+                                            }
+
+                                            self.$forceUpdate()
+                                        },
+                                        blur(){
+                                            self.$set( self.addDataTableData[index],'tooltipDisableFize',true);
+                                            self.$forceUpdate()
+                                        }
                                     }
-                                }
-                            });
+                                })
+                            ]);
                             var obj = {
                                 children: child,
                                 attrs: {},
@@ -567,6 +655,7 @@
             if(this.systemName=='弱电系统') {
                 this.addDataTableData.map((item,index) => {
                     item.errorMsg = true;
+                    item.tooltipDisableFize = true;
                     item.key = ''+ new Date().getTime()+index;
                 })
             }
@@ -578,22 +667,42 @@
                     item.errorMsg3 = true;
                     item.errorMsg4 = true;
                     item.errorMsg5 = true;
+                    item.tooltipDisableFize = true;
+                    item.tooltipDisablHost = true;
+                    item.tooltipDisablLoop = true;
                 })
             }
              this.projectId=this.$parent.plazaId;
              this.systemCode=this.$parent.smsxt;
              this.floor= this.$parent.floorInfo.gname;
             this.$nextTick(()=>{
-                this.height = document.getElementsByClassName('dialog-right-table')[0].clientHeight-62;
+                this.height =window.innerHeight-205;
                 window.addEventListener('resize',()=>{
-                    this.height = document.getElementsByClassName('dialog-right-table')[0].clientHeight-62;
+                    this.height = window.innerHeight-205;
                 })
            })
         },
         methods:{
+            focusTooltip(record,nameBase,name,index){
+                this.addDataTableData.map(item=>{
+                    item[name] = true
+                })
+                if(record[nameBase]){
+                    this.$set( this.addDataTableData[index],name,false)
+                }else{
+                    this.$set( this.addDataTableData[index],name,true)
+                }
+
+                this.$forceUpdate()
+            },
+            blurToopTip(text,index){
+                this.$set( this.addDataTableData[index],text,true);
+                this.$forceUpdate()
+            },
+
             //键盘事件
             keydown(e){
-                if(e.key=='-'||e.key=='+'||e.key=='e'){
+                if(e.key=='-'||e.key=='+'||e.key=='e'||e.key=='.'){
                     e.preventDefault()
                 }
             },
@@ -614,7 +723,12 @@
             },
             //防火分区
             getFireZoneFun(text,index){
-                this.$set( this.addDataTableData[index],'fireZone',text)
+                this.$set( this.addDataTableData[index],'fireZone',text);
+                if(text){
+                    this.$set( this.addDataTableData[index],'tooltipDisableFize',false)
+                }else{
+                    this.$set( this.addDataTableData[index],'tooltipDisableFize',true)
+                }
             },
             //是否属于非工程 物业管理范围
             isFmFun(text,index){
@@ -644,32 +758,35 @@
             deleteFun(index){
                 if(this.systemName=='弱电系统'){
                     if( this.addDataTableData.length==4){
-                        console.log(1);
                         this.addDataTableData.splice(index,4)
                         let arr =   [
                             {
                                 fireZone: '',
                                 system: '监控系统',
                                 monitorCount: '',
-                                errorMsg:true
+                                errorMsg:true,
+                                tooltipDisableFize: true
                             },
                             {
                                 fireZone: '',
                                 system: 'BA系统',
                                 baCount: '',
-                                errorMsg:true
+                                errorMsg:true,
+                                tooltipDisableFize: true
                             },
                             {
                                 fireZone: '',
                                 system: 'DDC',
                                 ddcCount: '',
-                                errorMsg:true
+                                errorMsg:true,
+                                tooltipDisableFize: true
                             },
                             {
                                 fireZone: '',
                                 system: '门禁系统',
                                 accessCount: '',
-                                errorMsg:true
+                                errorMsg:true,
+                                tooltipDisableFize: true
                             },
                         ];
                         this.addDataTableData.push(...arr);
@@ -677,10 +794,7 @@
                     }else{
                         this.addDataTableData.splice(index,4)
                     }
-
-                    console.log(this.addDataTableData);
-
-                }
+                                    }
                 if(this.systemName=='消防系统'){
 
                    if( this.addDataTableData.length==1){
@@ -701,6 +815,9 @@
                            errorMsg3:true,
                            errorMsg4:true,
                            errorMsg5:true,
+                           tooltipDisableFize : true,
+                           tooltipDisablHost : true,
+                           tooltipDisablLoop : true,
                        };
                        this.addDataTableData.push(obj)
                    }else{
@@ -717,32 +834,35 @@
                             fireZone: '',
                             system: '监控系统',
                             monitorCount: '',
-                            errorMsg:true
+                            errorMsg:true,
+                            tooltipDisableFize: true
                         },
                         {
                             key :''+new Date().getTime()+2,
                             fireZone: '',
                             system: 'BA系统',
                             baCount: '',
-                            errorMsg:true
+                            errorMsg:true,
+                            tooltipDisableFize: true
                         },
                         {
                             key :''+new Date().getTime()+3,
                             fireZone: '',
                             system: 'DDC',
                             ddcCount: '',
-                            errorMsg:true
+                            errorMsg:true,
+                            tooltipDisableFize: true
                         },
                         {
                             key :''+new Date().getTime()+4,
                             fireZone: '',
                             system: '门禁系统',
                             accessCount: '',
-                            errorMsg:true
+                            errorMsg:true,
+                            tooltipDisableFize: true
                         },
                     ];
                     this.addDataTableData.push(...arr);
-                    // console.log( this.addDataTableData);
                 }
                 if(this.systemName=='消防系统'){
                     let obj =  {
@@ -762,6 +882,9 @@
                         errorMsg3:true,
                         errorMsg4:true,
                         errorMsg5:true,
+                       tooltipDisableFize : true,
+                       tooltipDisablHost : true,
+                       tooltipDisablLoop : true,
                     };
                     this.addDataTableData.push(obj)
                 }
@@ -771,6 +894,12 @@
             },
             //消防系统数据处理成保存提交的格式
             checkDataFunX(){
+                let postParams = {
+                    projectId:  this.projectId,
+                    systemCode: this.systemCode,
+                    floor: this.floor,
+                    data:[]
+                }
                 let data = [];
                 this.addDataTableData.length && this.addDataTableData.map(item=>{
                     let obj = {
@@ -798,21 +927,32 @@
                     }
 
                 })
-                console.log(data);
-                // params.data = data
-                // addDataSaveFireControl({params}).then(res=>{
-
-                // })
-                this.$message({
-                    message: '保存成功',
-                    type: 'success',
+                postParams.data = data
+                addDataSaveFireControl({postParams}).then(res=>{
+                   if(res.data.result=='success'){
+                       this.$message({
+                           message: '保存成功',
+                           type: 'success',
+                       })
+                       this.handelCancel();
+                   }else{
+                       this.$message({
+                           message: '保存失败',
+                           type: 'error',
+                       })
+                   }
                 })
-                this.handelCancel();
+
             },
             //弱电系统数据处理成保存提交的格式
             checkDataFunR(){
+                let postParams = {
+                    projectId:  this.projectId,
+                    systemCode: this.systemCode,
+                    floor: this.floor,
+                    data:[]
+                }
                 let data = [];
-                console.log(this.addDataTableData);
                 this.addDataTableData.length &&  this.addDataTableData.map((item,index)=>{
                     let obj = {
                         fireZone:'',      //分区
@@ -829,28 +969,25 @@
                         obj.accessCount = this.addDataTableData[index+3].accessCount;
                         data.push(obj)
                     }
-
-
                 })
-                console.log(data);
-                // params.data = data
-                // addDataSaveWeakCurrent({params}).then(res=>{
-
-                // })
-                this.$message({
-                    message: '保存成功',
-                    type: 'success',
+                postParams.data = data
+                addDataSaveWeakCurrent({postParams}).then(res=>{
+                    if(res.data.result=='success'){
+                        this.$message({
+                            message: '保存成功',
+                            type: 'success',
+                        })
+                        this.handelCancel();
+                    }else{
+                        this.$message({
+                            message: '保存失败',
+                            type: 'error',
+                        })
+                    }
                 })
-                this.handelCancel();
             },
             //保存
             handelSave(){
-                // let params = {
-                //     projectId:  this.projectId,
-                //     systemCode: this.systemCode,
-                //     floor: this.floor,
-                //     data:[]
-                // }
                 let flag = false;
                 if(this.systemName=='弱电系统'){
                     this.addDataTableData.length &&  this.addDataTableData.map(item=>{
@@ -866,7 +1003,6 @@
                         this.visibleDisabled = true;
                         this.checkDataFunR();
                     }
-
                 }
                 if(this.systemName=='消防系统'){
 
@@ -881,7 +1017,6 @@
                             flag = true;
                         }
                     });
-                    console.log(flag);
                     if(flag){
                         this.visibleDisabled = false;
                         return ;
@@ -889,8 +1024,6 @@
                         this.visibleDisabled = true;
                         this.checkDataFunX();
                     }
-                    console.log(this.addDataTableData);
-
                 }
             },
             //核实
@@ -1051,3 +1184,10 @@
         }
     }
 </style>
+<style lang="less">
+     .tooltip-class{
+        width: 200px!important;
+        text-align: center!important;
+         font-size:12px!important;
+    }
+</style>

+ 29 - 17
src/views/equipment/addDataTable.vue

@@ -8,10 +8,10 @@
                                 return {
                                   background:'#E5EEF6'
                                 }
-                              }"   :span-method="objectSpanMethod">
+                              }"   :span-method="objectSpanMethod" :tooltip-effect="'dark'">
             <el-table-column
                     prop="fireZone"
-                    label="分区">
+                    label="分区" show-overflow-tooltip>
             </el-table-column>
             <el-table-column
                     prop="system"
@@ -34,15 +34,15 @@
                    :show-summary="!examplesBoo"
                    style="width: 100%;" :header-cell-style="()=>{return { background:'#E5EEF6'  } }" :cell-style="({row, column, rowIndex, columnIndex})=>{
                         return { background:examplesBoo&&rowIndex==2&&columnIndex==1?'#EFF0F1':'#fff'  }
-                     }"   :span-method="objectSpanMethod">
+                     }"   :span-method="objectSpanMethod" :tooltip-effect="'dark'">
             <el-table-column
                     prop="fireZone"
-                    label="防火分区"
+                    label="防火分区" show-overflow-tooltip
             >
             </el-table-column>
             <el-table-column
                     prop="hostNum"
-                    label="主机编号">
+                    label="主机编号" show-overflow-tooltip>
                 <template slot-scope="scope">
                     <div v-if="scope.row.isFm==0">{{scope.row.manageScope}}</div>
                     <span v-if="scope.row.isFm==1">{{scope.row.hostNum}}</span>
@@ -50,7 +50,7 @@
             </el-table-column>
             <el-table-column
                     prop="loopNum"
-                    label="回路编号">
+                    label="回路编号" show-overflow-tooltip>
             </el-table-column>
             <el-table-column
                     prop="smokeCount"
@@ -160,7 +160,6 @@
                     }
                 }
                 if(this.systemName=='消防系统'){
-                    console.log(row, column, rowIndex, columnIndex);
                     if (row.isFm == 0) {
                         if (columnIndex === 1) {
                             return {
@@ -172,29 +171,29 @@
                 }
                 this.$nextTick(() => {
                     if(this.systemName=='弱电系统'){
-                        var lastLine = document.getElementsByClassName("el-table__footer")[0]
+                        let lastLine = document.getElementsByClassName("el-table__footer")[0]
                             .children[1];
                         lastLine.innerHTML = ''
                         for(let i=0;i<4;i++){
                             var newnode = document.createElement("tr");
                             if(i==0){
-                                newnode.innerHTML = "<td class='cell' style='font-size: 12px!important;background: #E5EEF6!important;'>合计</td>" +
-                                    "<td class='cell cellbg'>监控系统</td>" + `<td class='cell'>${this.totalCount.monitorTotalCount}</td>`;
+                                newnode.innerHTML = "<td class='cell' style='font-size: 12px!important;background: #E5EEF6!important;font-weight: 500!important;'>合计</td>" +
+                                    "<td class='cell cellbg'>监控系统</td>" + `<td class='cell'>${this.totalCount.monitorTotalCount||''}</td>`;
                             }
                             if(i==1){
                                 newnode.innerHTML =
                                     "<td  class='cell cellbg'>BA系统</td>" +
-                                    `<td  class='cell'>${this.totalCount.baTotalCount}</td>`;
+                                    `<td  class='cell'>${this.totalCount.baTotalCount||''}</td>`;
                             }
                             if(i==2){
                                 newnode.innerHTML =
                                     "<td class='cell cellbg'>DDC</td>" +
-                                    `<td  class='cell'>${this.totalCount.ddcTotalCount}</td>`;
+                                    `<td  class='cell'>${this.totalCount.ddcTotalCount||''}</td>`;
                             }
                             if(i==3){
                                 newnode.innerHTML =
                                     "<td  class='cell cellbg'>门禁系统</td>" +
-                                    `<td class='cell'>${this.totalCount.accessTotalCount}</td>`;
+                                    `<td class='cell'>${this.totalCount.accessTotalCount||''}</td>`;
                             }
 
                             lastLine.appendChild(newnode);
@@ -203,10 +202,21 @@
                         tds[0].rowSpan = 4;
                     }
                     if(this.systemName=='消防系统'){
-                        let tds = document.querySelectorAll(".el-table__footer-wrapper tr>td");
-                        tds[0].colSpan = 3;
-                        tds[1].style.display = "none";
-                        tds[2].style.display = "none";
+                        var lastLine = document.getElementsByClassName("el-table__footer")[0]
+                            .children[1];
+                        lastLine.innerHTML = '';
+                        let newnode = document.createElement("tr");
+                        newnode.innerHTML = "<td class='cell' colSpan='3' style='font-size: 12px!important;background: #E5EEF6!important;font-weight: 500!important;'>合计</td>" +
+                            `<td class='cell cellbg'>${this.totalCount.smokeTotalCount||''}</td>`
+                            + `<td class='cell'>${this.totalCount.warmTotalCount||''}</td>`
+                            + `<td class='cell'>${this.totalCount.handNewTotalCount||''}</td>`
+                            + `<td class='cell'>${this.totalCount.fireHydrantTotalCount||''}</td>`
+                            + `<td class='cell'>${this.totalCount.moduleTotalCount||''}</td>`;
+                        lastLine.appendChild(newnode);
+                        // let tds = document.querySelectorAll(".el-table__footer-wrapper tr>td");
+                        // tds[0].colSpan = 3;
+                        // tds[1].style.display = "none";
+                        // tds[2].style.display = "none";
                     }
                 });
             },
@@ -217,6 +227,8 @@
 <style scoped lang="less">
     /deep/ .el-table{
         .cell{
+            height: 30px!important;
+            line-height:30px!important;
             color: #000000!important;
             text-align: center!important;
         }

+ 118 - 114
src/views/equipment/index.vue

@@ -52,7 +52,7 @@
               :loadName="loadName"
               :type="'system'"
             ></floorMap>
-            <div class="legend-boxs">
+            <div class="legend-boxs" ref="legendBoxs">
               <Legend
                 :key="keyLd"
                 :systemName="systemName"
@@ -99,8 +99,10 @@
                     v-show="showView === 3"
                     class="add-img-container"
                     ref="addImgContainer"
-                    :style="`bottom: ${bottomOffset}px;`"
+
+                    :style="`top: ${bottomOffset}px;bottom:unset`"
                   >
+                      <!--                    :style="`bottom: ${bottomOffset}px;`"-->
                     <!-- <div class="add-img" ref="addImg">
                       <img :src="fqPic[0].url" alt />
                     </div> -->
@@ -203,6 +205,13 @@ export default {
       //附加数据弹窗取消
       handelCancel(data){
           this.addDataVisible = data;
+          this.addDataCheckCompleteFun();
+          if(this.systemName =='消防系统'){
+              this.addDataPreviewFireControlFun();
+          }
+          if(this.systemName =='弱电系统'){
+              this.addDataPreviewWeakCurrentFun();
+          }
       },
     showToolTip() {
       this.showExeclTooltip = true;
@@ -418,7 +427,6 @@ export default {
     },
     //附加数据图片查看 showView为3展示状态
     additionalColl() {
-        console.log('this.floorInfo',this.floorInfo);
         // // 走预览接口
       // this.previewExl();
       // 调整样式
@@ -427,9 +435,10 @@ export default {
         this.$nextTick(() => {
           let p = this.$refs.additionalBox.offsetTop;
           let d = this.$refs.addImgContainer.offsetHeight;
+          let lb= this.$refs.legendBoxs.offsetHeight;
           let bottomOffset = p + 44 - d;
-          if (bottomOffset >= 0) {
-            this.bottomOffset = this.visibleTooltip?0:-100;
+            if (bottomOffset >= 0) {
+            this.bottomOffset = this.systemName =='消防系统'?-lb+44:-lb-1+44;
           } else {
             this.bottomOffset = bottomOffset;
           }
@@ -501,71 +510,57 @@ export default {
     },
     //  查看数据是否填写完整
       addDataCheckCompleteFun() {
-          let params = {
+          let postParams = {
               projectId: this.plazaId,
               systemCode: this.smsxt,
               floor: this.floorInfo.gname,
           }
-          addDataCheckComplete({params}).then(res=>{
-          // let res = {
-          //     "result": "success",                       //状态信息 success:调用成功  fail:调用失败
-          //     "data": {
-          //         "isComplate": false,                       //是否完整, true: 完整  false :不完整
-          //         "desc": "数据填写不完整,请检查并完善"         // 描述信息
-          //     }
-          // }
-          if (res.result == 'success') {
-              if (!res.data.isComplate) {
+          addDataCheckComplete({postParams}).then(res=>{
+              if (res.data.result == 'success') {
+                  if (res.data.data.isComplete=='true') {
                   this.visibleTooltip = false;
               } else {
                   this.visibleTooltip = true;
               }
-          }else{
-              this.$message({
-                  message: res.message,
-                  type: 'error'
-              })
           }
-          console.log(res);
           })
     },
       // 消防系统数据预览/数据回显
     addDataPreviewFireControlFun(){
-        let params = {
+        let postParams = {
             projectId: this.plazaId,
             systemCode: this.smsxt,
             floor: this.floorInfo.gname,
-            getTotal:'0'
+            getTotal:'1'
         }
-        // addDataPreviewFireControl({params}).then(res=>{
-        let res = {
-            "result": "success",                       //状态信息 success:调用成功  fail:调用失败
-            "data":{
-                "infoList":[{
-                    "fireZone":"C1-C1-C1-C1-9",      //防火分区
-                    "isFm": "1",            //是否属于工程物业管理范围,0:否,1:是
-                    "hostNum":"2",          //主机编号
-                       //烟感数量
-                    "warmCount":"999999",       //温感数量
-                    "handNewCount":"13",    //手报数量
+        addDataPreviewFireControl({postParams}).then(res=>{
+            this.tableData= [];
+          if(res.data.result=='success'){
+              if(res.data.data&&res.data.data.infoList.length){
+                  this.tableData = res.data.data.infoList;
+              }else{
+                  let obj =  {
+                      key :''+new Date().getTime(),
+                      fireZone:"",      //防火分区
+                      isFm: "1",            //是否属于工程物业管理范围,0:否,1:是
+                      hostNum:"",          //主机编号
+                      loopNum:"",          //回路编号
+                      smokeCount:"",      //烟感数量
+                      warmCount:"",       //温感数量
+                      handNewCount:"",    //手报数量
+                      fireHydrantCount:"",  //消火栓数量
+                      moduleCount:"",       //模块数量
+                      manageScope:'',
+                      errorMsg1:true,
+                      errorMsg2:true,
+                      errorMsg3:true,
+                      errorMsg4:true,
+                      errorMsg5:true,
+                  };
+                  this.tableData.push(obj)
+              }
+              this.totalCount =  res.data.data && res.data.data.totalCount ? res.data.data.totalCount :{};
 
-                    "moduleCount":"999999"       //模块数量
-                },{
-                    "fireZone":"C1-10",      //防火分区
-                    "isFm": "0",            //是否属于工程物业管理范围,0:否,1:是
-                    "manageScope":"合作方管理范围"   //管理范围
-                } ],
-                "totalCount":{          //总数量,当传入的参数getTotal的值为1时有该数据
-                    "smokeTotalCount":"20",      //烟感总数量
-                    "warmTotalCount":"12",       //温感总数量
-                    "handNewTotalCount":"13",    //手报总数量
-                    "fireHydrantTotalCount":"15",  //消火栓总数量
-                    "moduleTotalCount":"33"       //模块总数量
-                }
-            }
-        };
-          if(res.result=='success'){
-              this.tableData = res.data.infoList;
           }else{
               this.$message({
                   message: res.message,
@@ -573,76 +568,86 @@ export default {
               })
           }
 
-        // })
+        })
       },
       //弱电系统数据预览/回显
       addDataPreviewWeakCurrentFun(){
-          let params = {
+          let postParams = {
               projectId: this.plazaId,
               systemCode: this.smsxt,
               floor: this.floorInfo.gname,
               getTotal:'1'
           }
-          // addDataPreviewWeakCurrent({params}).then(res=>{
-         let res =  {
-              "result": "success",                       //状态信息 success:调用成功  fail:调用失败
-              "data":{
-              "infoList":[{
-                  "fireZone":"C区",      //分区
-                  "monitorCount":"2",   //监控系统数量
-                  "baCount":"3",        //BA系统数量
-                  "ddcCount":"4",       //DDC数量
-                  "accessCount":"20"    //门禁系统数量
-              },{
-                  "fireZone":"C区",      //分区
-                  "monitorCount":"2",   //监控系统数量
-                  "baCount":"5",        //BA系统数量
-                  "ddcCount":"4",       //DDC数量
-                  "accessCount":"20"    //门禁系统数量
-              } ],
-                  "totalCount":{            //总数量,当传入的参数getTotal的值为1时有该数据
-                  "monitorTotalCount":"2",   //监控系统总数量
-                      "baTotalCount":"3",        //BA系统总数量
-                      "ddcTotalCount":"4",       //DDC总数量
-                      "accessTotalCount":"20"    //门禁系统总数量
-              }
-          }
-          }
+          addDataPreviewWeakCurrent({postParams}).then(res=>{
           this.tableData =[];
-          if(res.result=='success'){
+          if(res.data.result=='success'){
+               if(res.data.data && res.data.data.infoList.length){
+                   res.data.data.infoList.length && res.data.data.infoList.map(item=>{
+                       let arr =   [
+                           {
+                               fireZone: '',
+                               system: '监控系统',
+                               monitorCount: '',
+                           },
+                           {
+                               fireZone: '',
+                               system: 'BA系统',
+                               baCount: '',
+                           },
+                           {
+                               fireZone: '',
+                               system: 'DDC',
+                               ddcCount: '',
+                           },
+                           {
+                               fireZone: '',
+                               system: '门禁系统',
+                               accessCount: '',
+                           },
+                       ];
+                       arr[0].fireZone = item.fireZone;
+                       arr[0].monitorCount = item.monitorCount;
+                       arr[1].baCount = item.baCount;
+                       arr[2].ddcCount = item.ddcCount;
+                       arr[3].accessCount = item.accessCount;
+                       this.tableData.push(...arr);
+                   })
+               }else{
+                   let arr =   [
+                       {
+                           key :''+new Date().getTime()+1,
+                           fireZone: '',
+                           system: '监控系统',
+                           monitorCount: '',
+                           errorMsg:true
+                       },
+                       {
+                           key :''+new Date().getTime()+2,
+                           fireZone: '',
+                           system: 'BA系统',
+                           baCount: '',
+                           errorMsg:true
+                       },
+                       {
+                           key :''+new Date().getTime()+3,
+                           fireZone: '',
+                           system: 'DDC',
+                           ddcCount: '',
+                           errorMsg:true
+                       },
+                       {
+                           key :''+new Date().getTime()+4,
+                           fireZone: '',
+                           system: '门禁系统',
+                           accessCount: '',
+                           errorMsg:true
+                       },
+                   ];
+                   this.tableData.push(...arr);
+               }
+
+              this.totalCount =  res.data.data && res.data.data.totalCount ? res.data.data.totalCount :{};
 
-              res.data.infoList.length && res.data.infoList.map(item=>{
-                  let arr =   [
-                      {
-                          fireZone: '',
-                          system: '监控系统',
-                          monitorCount: '',
-                      },
-                      {
-                          fireZone: '',
-                          system: 'BA系统',
-                          baCount: '',
-                      },
-                      {
-                          fireZone: '',
-                          system: 'DDC',
-                          ddcCount: '',
-                      },
-                      {
-                          fireZone: '',
-                          system: '门禁系统',
-                          accessCount: '',
-                      },
-                  ];
-                   arr[0].fireZone = item.fireZone;
-                   arr[0].monitorCount = item.monitorCount;
-                   arr[1].baCount = item.baCount;
-                   arr[2].ddcCount = item.ddcCount;
-                   arr[3].accessCount = item.accessCount;
-                  this.tableData.push(...arr);
-              })
-              console.log(this.tableData);
-              this.totalCount = res.data.totalCount
 
           }else{
               this.$message({
@@ -651,7 +656,7 @@ export default {
               })
           }
 
-          // })
+          })
       },
   },
   created() {
@@ -674,7 +679,6 @@ export default {
      */
     // this.$refs.floorMap.init(this.floorInfo.gname)
     if (this.$route.query.smsxt) {
-      console.log(this.$route.query.smsxt);
       this.smsxt = this.$route.query.smsxt;
       this.smsxtQuery();
       this.system.forEach((el) => {