Bladeren bron

记录事项

zhulizhen 4 jaren geleden
bovenliggende
commit
e486785bd7

+ 1 - 0
src/components/floorMap/index.vue

@@ -86,6 +86,7 @@ export default {
             }
         },
         clearGraphy() {
+            console.log(new FloorView('canvas'))
             if (this.view) {
                 this.view.scene = null
                 return

+ 22 - 0
src/utils/helper.js

@@ -0,0 +1,22 @@
+/**
+ * 深度优先遍历算法, 遍历tree的每一项
+ * @param {Object} {tree, path: 父节点的path, init: 是否是初始化}
+ * @param {Callback}} cb 回调函数,参数为 node
+ */
+export function depthFirstEach({ tree, parent = null }, cb) {
+    if (!Array.isArray(tree)) {
+        console.warn('The tree in the first argument to function depthFirstEach must be an array');
+        return;
+    }
+    if (!tree || tree.length === 0) return;
+    for (let node of tree) {
+        const hasChildren = node.children && node.children.length > 0;
+        if (cb) {
+            const res = cb(node);
+            if (res === 'break') return;
+        }
+        if (hasChildren) {
+            depthFirstEach({ tree: node.children }, cb);
+        }
+    }
+}

+ 53 - 2
src/views/equipment/eqDialog.vue

@@ -51,7 +51,7 @@
                         <!-- 专维 -->
                         <zw-table v-else-if='value.id.slice(2,4)=="ZW"' :smsxt='smsxt' :major='dialogInfo.id'></zw-table>
                         <!-- 其他 -->
-                        <other-table v-else-if='value.id.slice(2,4)=="QT"' :smsxt='smsxt' :major='dialogInfo.id'></other-table>
+                        <other-table v-else-if='value.id.slice(2,4)=="QT"' ref='qtList' :smsxt='smsxt' :major='dialogInfo.id'></other-table>
                     </el-tab-pane>
                 </el-tabs>
             </div>
@@ -117,7 +117,7 @@ export default {
         },
         //点击tab函数
         handleClick(tab) {
-            console.log(tab.index)
+            console.log(tab)
             if (this.param) {
                 this.param = tab.name
             } else if (this.smsxt) {
@@ -131,6 +131,9 @@ export default {
             if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL') {
                 this.initImage(this.typecode)
             }
+            if (tab.label == '其他事项') {
+                this.$refs.qtList.getList()
+            }
         },
         tabClick(value) {
             console.log(value, '-----.')
@@ -250,5 +253,53 @@ export default {
         color: #025baa;
         border-color: #025baa;
     }
+    //动画
+    .el-dialog__wrapper {
+        transition-duration: 0.3s;
+    }
+    .dialog-fade-enter-active {
+        animation: none !important;
+    }
+    .dialog-fade-leave-active {
+        transition-duration: 0.15s !important;
+        animation: none !important;
+    }
+
+    .dialog-fade-enter-active .el-dialog,
+    .dialog-fade-leave-active .el-dialog {
+        animation-fill-mode: forwards;
+    }
+
+    .dialog-fade-enter-active .el-dialog {
+        animation-duration: 0.3s;
+        animation-name: anim-open;
+        animation-timing-function: cubic-bezier(0.6, 0, 0.4, 1);
+    }
+
+    .dialog-fade-leave-active .el-dialog {
+        animation-duration: 0.3s;
+        animation-name: anim-close;
+    }
+
+    @keyframes anim-open {
+        0% {
+            opacity: 0;
+            transform: scale3d(0, 0, 1);
+        }
+        100% {
+            opacity: 1;
+            transform: scale3d(1, 1, 1);
+        }
+    }
+
+    @keyframes anim-close {
+        0% {
+            opacity: 1;
+        }
+        100% {
+            opacity: 0;
+            transform: scale3d(0.5, 0.5, 1);
+        }
+    }
 }
 </style>

+ 2 - 0
src/views/equipment/table/djspTable.vue

@@ -8,6 +8,7 @@
                 @change='getList'
                 prefix-icon='el-icon-search'
                 v-model='keyword'
+                clearable
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
@@ -16,6 +17,7 @@
                 @change='getList'
                 prefix-icon='el-icon-search'
                 v-model='keyword'
+                clearable
                 style='width:192px;margin-right:12px'
             ></el-input>
             <Select @change='getList' v-model='floor' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>

+ 3 - 1
src/views/equipment/table/eqDetaileDialog.vue

@@ -10,6 +10,7 @@
                 size='small'
                 prefix-icon='el-icon-search'
                 v-model='sbjc'
+                clearable
                 @blur='queryTableList'
             ></el-input>
             <Select v-model='sbglgs' width='180' tipPlace='top' caption='管理归属' size='small' :selectdata='sbglgsOption' @change='queryTableList'></Select>
@@ -27,6 +28,7 @@
                 placeholder='搜索品牌、型号'
                 style='width:192px;margin-right:12px'
                 size='small'
+                clearable
                 prefix-icon='el-icon-search'
                 v-model='brand'
                 @blur='queryTableList'
@@ -41,7 +43,7 @@
                 :selectdata='floorSelect'
                 @change='queryTableList'
             ></Select>
-            <el-input placeholder='搜索安装位置' style='width:192px;margin-right:12px' size='small' prefix-icon='el-icon-search' v-model='wzjc'></el-input>
+            <el-input placeholder='搜索安装位置' clearable style='width:192px;margin-right:12px' size='small' prefix-icon='el-icon-search' v-model='wzjc'></el-input>
             <!-- 多余的筛选 -->
             <input-dialog :type='1' @confirm='confirm'></input-dialog>
         </div>

+ 11 - 1
src/views/equipment/table/eqListTable.vue

@@ -8,18 +8,28 @@
                 @blur='getList'
                 prefix-icon='el-icon-search'
                 v-model='sbjc'
+                clearable
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
                 placeholder='搜索品牌型号'
                 size='small'
                 @blur='getList'
+                clearable
                 prefix-icon='el-icon-search'
                 v-model='keyword'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <Select @change='getList' v-model='floor' style='margin-right:12px;' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
-            <el-input placeholder='搜索生产厂商' size='small' @blur='getList' prefix-icon='el-icon-search' v-model='manufacturer' style='width:192px;'></el-input>
+            <el-input
+                placeholder='搜索生产厂商'
+                clearable
+                size='small'
+                @blur='getList'
+                prefix-icon='el-icon-search'
+                v-model='manufacturer'
+                style='width:192px;'
+            ></el-input>
         </div>
         <el-table :data='tableData' style='width: 100%' :border='true' @row-click='rowHandle'>
             <el-table-column type='index' label='序号' width='80'></el-table-column>

+ 11 - 3
src/views/equipment/table/inputDIalog.vue

@@ -20,19 +20,27 @@
                     placeholder='搜索生产厂商'
                     style='width:192px;margin-right:12px'
                     size='small'
+                    clearable
                     prefix-icon='el-icon-search'
                     v-model='inputForm.manufacturer'
                 ></el-input>
                 <p style='margin:16px 0 8px 0'>服务商</p>
-                <el-input placeholder='搜索服务商' style='width:192px;margin-right:12px' size='small' prefix-icon='el-icon-search' v-model='inputForm.fws'></el-input>
+                <el-input
+                    placeholder='搜索服务商'
+                    clearable
+                    style='width:192px;margin-right:12px'
+                    size='small'
+                    prefix-icon='el-icon-search'
+                    v-model='inputForm.fws'
+                ></el-input>
             </el-form>
             <el-form style=' padding: 20px 24px;' v-if='type==2'>
                 <p style='margin:0 0 8px 0'>任务编号</p>
-                <el-input placeholder='搜索任务编号' size='small' prefix-icon='el-icon-search' v-model='inputForm.gzglid' style='width:192px;'></el-input>
+                <el-input placeholder='搜索任务编号' clearable size='small' prefix-icon='el-icon-search' v-model='inputForm.gzglid' style='width:192px;'></el-input>
             </el-form>
             <el-form style=' padding: 20px 24px;' v-if='type==3'>
                 <p style='margin:0 0 8px 0'>工单编号</p>
-                <el-input placeholder='搜索工单编号' size='small' prefix-icon='el-icon-search' v-model='inputForm.wonum' style='width:192px;'></el-input>
+                <el-input placeholder='搜索工单编号' clearable size='small' prefix-icon='el-icon-search' v-model='inputForm.wonum' style='width:192px;'></el-input>
             </el-form>
             <el-form style=' padding: 20px 24px;' v-if='type==4'>
                 <p style='margin:0 0 8px 0'>验收结果</p>

+ 1 - 0
src/views/equipment/table/lookPageTable.vue

@@ -6,6 +6,7 @@
                 placeholder='搜索生产厂商'
                 size='small'
                 @change='getList'
+                clearable
                 prefix-icon='el-icon-search'
                 v-model='keyword'
                 style='width:192px;margin-right:12px'

+ 3 - 2
src/views/equipment/table/otherTable.vue

@@ -8,6 +8,7 @@
                 size='small'
                 prefix-icon='el-icon-search'
                 v-model='keyword'
+                clearable
                 @blur='getList'
             ></el-input>
 
@@ -148,7 +149,7 @@ export default {
             let postParams = [
                 {
                     columnName: { handleresults: 'handleresults' },
-                    tableName: 'v_glsms_qtsx' //视图名称
+                    tableName: 'glsms_qtsx' //视图名称
                 }
             ]
             let major
@@ -177,7 +178,7 @@ export default {
             }
             querySelect({ data, postParams }).then(res => {
                 console.log(res)
-                let handleresults = res.data.data.v_glsms_zw.handleresults
+                let handleresults = res.data.data.glsms_qtsx.handleresults
                 this.handleOption = []
                 handleresults.forEach(el => {
                     this.handleOption.push({

+ 55 - 40
src/views/equipment/table/recordDialog.vue

@@ -1,14 +1,20 @@
 <template>
     <!-- 记录事项 -->
     <div class='detail-dialog'>
-        <el-dialog :title='`${major}${tabName}记录事项`' :visible.sync='visible'>
-            <div class='bottom-table'>
-                <el-table :data='tableData' style='width: 100%'>
-                    <el-table-column label='位置' prop width='100'>
-                        <template slot-scope='{row}'>{{row.locfldes || '--'}}</template>
+        <el-dialog :title='`${major}${tabName}记录事项`' :visible.sync='visible' style='height:900px;overflow-y:scroll;'>
+            <div class='bottom-table' style='height:520px'>
+                <el-table :data='tableData' height='500' :border='true' style='width: 100%;margin-bottom:12px;' :span-method='objectSpanMethod'>
+                    <el-table-column label='位置' prop width='140' show-overflow-tooltip resizable>
+                        <template slot-scope='{row}'>{{row.smswz || '--'}}</template>
+                    </el-table-column>
+                    <el-table-column prop='system' label='设备' width='200' show-overflow-tooltip resizable>
+                        <template slot-scope='{row}'>{{row.smsasset || '--'}}</template>
+                    </el-table-column>
+                    <el-table-column prop='matter' label='记录事项' show-overflow-tooltip resizable>
+                        <template slot-scope='{row}'>
+                            <p class='p-style' v-for='(item,index) in row.children' :key='item.sn'>{{index+1}}) {{item.matter}}</p>
+                        </template>
                     </el-table-column>
-                    <el-table-column prop='system' label='设备' width='100'></el-table-column>
-                    <el-table-column prop='matter' label='记录事项'></el-table-column>
                 </el-table>
             </div>
         </el-dialog>
@@ -16,6 +22,7 @@
 </template>
 <script>
 import { queryRecord } from '@/api/equipmentList.js'
+
 export default {
     data() {
         return {
@@ -37,46 +44,57 @@ export default {
                 this.tabName = '其他'
             }
             if (major.slice(0, 2) == 'GD') {
-                this.major = '供电'
+                this.major = '供电系统'
             } else if (major.slice(0, 2) == 'XF') {
-                this.major = '消防'
+                this.major = '消防系统'
             } else if (major.slice(0, 2) == 'GPS') {
-                this.major = '给排水'
+                this.major = '给排水系统'
             } else if (major.slice(0, 2) == 'DT') {
-                this.major = '电梯'
+                this.major = '电梯系统'
             } else if (major.slice(0, 2) == 'RQ') {
-                this.major = '燃气'
+                this.major = '燃气系统'
             } else if (major.slice(0, 2) == 'RD') {
-                this.major = '弱电'
+                this.major = '弱电系统'
             } else if (major.slice(0, 2) == 'NT') {
-                this.major = '暖通'
+                this.major = '暖通系统'
             } else if (major.slice(0, 2) == 'TJ') {
-                this.major = '土建'
+                this.major = '土建系统'
             }
             this.visible = true
             this.getRecordList(this.major)
         },
-        objectSpanMethod({ row, column, rowIndex, columnIndex }) {},
+        objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+            if (columnIndex === 0) {
+                if (row.col0Count > 0) {
+                    return {
+                        rowspan: row.col0Count,
+                        colspan: 1
+                    }
+                }
+                return {
+                    rowspan: 0,
+                    colspan: 0
+                }
+            }
+        },
         getRecordList(major) {
             let getParams = {
-                // major: major,
+                system: major,
                 plazaId: this.$store.state.plazaId
             }
             queryRecord({ getParams }).then(res => {
-                console.log('设备设施记录事项', res)
-                let data = res.data || []
-                for (let i in data) {
-                    console.log(data[i])
-                    console.log(data[i][0].wxwbsxline)
-                    for (let j in data[i][0].wxwbsxline) {
+                res.data.forEach(i => {
+                    i.children.forEach((j, index) => {
                         this.tableData.push({
-                            locfldes: i,
-                            system: data[i][0].wxwbsxline[j].system,
-                            matter: data[i][0].wxwbsxline[j].matter
+                            smswz: i.smswz,
+                            smsasset: j.smsasset,
+                            col0Count: index === 0 ? i.children.length : 0,
+                            children: j.children
                         })
-                    }
-                }
+                    })
+                })
             })
+            console.log(this.tabName)
         }
     },
     mounted() {}
@@ -84,18 +102,15 @@ export default {
 </script>
 <style lang="less" scoped>
 .detail-dialog {
-    .bottom {
-        padding: 0 30px 14px 30px;
-        p {
-            font-size: 14px;
-            font-family: PingFangSC-Regular, PingFang SC;
-            font-weight: 400;
-            color: rgba(96, 106, 120, 1);
-            line-height: 22px;
-        }
-        .bottom-table {
-            margin-top: 12px;
-        }
+}
+</style>
+<style lang="less" scoped>
+.detail-dialog {
+    .el-dialog__wrapper {
+        overflow: hidden !important;
+    }
+    .el-dialog {
+        overflow-y: scroll !important;
     }
 }
 </style>

+ 11 - 1
src/views/equipment/table/standTable.vue

@@ -8,18 +8,28 @@
                 @blur='getList'
                 prefix-icon='el-icon-search'
                 v-model='sbjc'
+                clearable
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
                 placeholder='搜索品牌型号'
                 size='small'
+                clearable
                 @blur='getList'
                 prefix-icon='el-icon-search'
                 v-model='keyword'
                 style='width:192px;margin-right:12px'
             ></el-input>
             <Select @change='getList' v-model='floor' style='margin-right:12px;' width='120' tipPlace='top' caption='楼层 :' :selectdata='floorSelect'></Select>
-            <el-input placeholder='搜索生产厂商' size='small' @blur='getList' prefix-icon='el-icon-search' v-model='manufacturer' style='width:192px;'></el-input>
+            <el-input
+                clearable
+                placeholder='搜索生产厂商'
+                size='small'
+                @blur='getList'
+                prefix-icon='el-icon-search'
+                v-model='manufacturer'
+                style='width:192px;'
+            ></el-input>
         </div>
         <el-table :data='tableData' :border='true' style='width: 100%' @row-click='rowHandle'>
             <el-table-column type='index' label='序号' width='80'></el-table-column>

+ 0 - 71
src/views/equipment/table/tjBuildTable.vue

@@ -1,71 +0,0 @@
-<!-- 建筑立面图 -->
-<template>
-    <div class='build-list'>
-        <el-table :data='tableData' style='width: 100%' @row-click='innerVisible = true'>
-            <el-table-column type='index' label='序号' width='80'></el-table-column>
-            <el-table-column prop='xm' label='项目' width='160'>
-                <template slot-scope='{row}'>{{row.xm || '--'}}</template>
-            </el-table-column>
-            <el-table-column prop='unit' label='单位'>
-                <template slot-scope='{row}'>{{row.unit || '--'}}</template>
-            </el-table-column>
-            <el-table-column prop='shopsnum' label='图例'>
-                <template slot-scope='{row}'>{{row.shopsnum || '--'}}</template>
-            </el-table-column>
-        </el-table>
-        <div>
-            <img src alt />
-        </div>
-    </div>
-</template>
-<script>
-import { queryEquipmentList } from '@/api/equipmentList.js'
-import { mapGetters } from 'vuex'
-export default {
-    components: { Select, EqDetail },
-    data() {
-        return {
-            tableData: []
-        }
-    },
-    computed: {
-        ...mapGetters(['floorSelect'])
-    },
-    methods: {
-        getList() {
-            let postParams = {
-                tab_code: this.param
-            }
-            let data = {
-                plazaId: this.$store.state.plazaId,
-                major: this.major
-            }
-            queryEquipmentList({ data, postParams }).then(res => {
-                console.log(res)
-                this.tableData = res.data.data
-                this.total = res.data.count
-            })
-        }
-    },
-    mounted() {}
-}
-</script>
-<style lang="less" scoped>
-.build-list {
-    .eq-list-top {
-        display: flex;
-        margin-bottom: 12px;
-    }
-    td {
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-    }
-    .foot {
-        height: 32px;
-        display: flex;
-        justify-content: flex-end;
-        margin-top: 28px;
-    }
-}
-</style>

+ 10 - 2
src/views/equipment/table/tjTable.vue

@@ -2,8 +2,16 @@
     <!-- 土建清单 -->
     <div class='tj-list'>
         <div class='eq-list-top'>
-            <el-input placeholder='搜索类别' size='small' @blur='getList' prefix-icon='el-icon-search' v-model='lb' style='width:192px;margin-right:12px'></el-input>
-            <el-input placeholder='搜索品牌' size='small' @blur='getList' prefix-icon='el-icon-search' v-model='brand' style='width:192px'></el-input>
+            <el-input
+                clearable
+                placeholder='搜索类别'
+                size='small'
+                @blur='getList'
+                prefix-icon='el-icon-search'
+                v-model='lb'
+                style='width:192px;margin-right:12px'
+            ></el-input>
+            <el-input clearable placeholder='搜索品牌' size='small' @blur='getList' prefix-icon='el-icon-search' v-model='brand' style='width:192px'></el-input>
         </div>
         <el-table :data='tableData' style='width: 100%'>
             <el-table-column type='index' label='序号' width='80'></el-table-column>

+ 3 - 0
src/views/equipment/table/wbTable.vue

@@ -8,12 +8,14 @@
                 @blur='getList'
                 prefix-icon='el-icon-search'
                 v-model='sbjc'
+                clearable
                 style='width:192px;margin-right:12px'
             ></el-input>
             <el-input
                 placeholder='搜索重要事项记录描述'
                 size='small'
                 @blur='getList'
+                clearable
                 prefix-icon='el-icon-search'
                 v-model='matters'
                 style='width:192px;margin-right:12px'
@@ -204,6 +206,7 @@ export default {
             }
             queryWbsms(getParams).then(res => {
                 this.tableData = res.data || []
+                console.log(this.tableData)
                 this.total = res.count
             })
         }

+ 2 - 0
src/views/equipment/table/wxTable.vue

@@ -6,6 +6,7 @@
                 placeholder='搜索设备名称编号'
                 size='small'
                 @blur='getList'
+                clearable
                 prefix-icon='el-icon-search'
                 v-model='sbjc'
                 style='width:192px;margin-right:12px'
@@ -13,6 +14,7 @@
             <el-input
                 placeholder='搜索重要事项记录描述'
                 size='small'
+                clearable
                 @blur='getList'
                 prefix-icon='el-icon-search'
                 v-model='matters'

+ 1 - 0
src/views/equipment/table/zwTable.vue

@@ -28,6 +28,7 @@
                 size='small'
                 style='width:192px;margin-right:12px'
                 v-model='ssfasm'
+                clearable
                 @blur='getList'
             ></el-input>
             <!-- 当前阶段 -->