guoxiaohuan 4 years ago
parent
commit
ed4ccb5ee0

+ 1 - 0
src/components/Legend/src/legend.vue

@@ -28,6 +28,7 @@
                         v-if='editTable.length>0'
                         :loading='loading1'
                         ref='editLen'
+                        :floorInfo='type=="0"?floorInfo:""'
                         :editTable='editTable'
                         @saveNum='saveNum'
                         :tableHeigth='tableHeigth'

+ 0 - 113
src/components/edit.vue

@@ -1,113 +0,0 @@
-<!-- 楼层功能右下侧hove的时候出现编辑平面图-->
-<template>
-    <div class='edit_map'>
-        <el-tooltip class='item' effect='dark' content='编辑平面图' placement='left'>
-            <span class='edit-icon'>
-                <i class='el-icon-edit'></i>
-                <span v-if='len>0'></span>
-            </span>
-        </el-tooltip>
-        <div class='hover-div'>
-            <span class='icon1' @click='legendClik'>
-                <a-icon type='form' />
-            </span>
-            <el-tooltip class='item' effect='dark' content='编辑图例' placement='left'>
-                <span class='icon2' @click='dump'>
-                    <a-icon type='form' />
-                </span>
-            </el-tooltip>
-        </div>
-        <remarks ref='EditdMarks'></remarks>
-    </div>
-</template>
-<script>
-import Remarks from './legendremarks'
-export default {
-    data() {
-        return {
-            len: 2,
-            text: '1.主要设备房包括:制冷机房、生活水泵房、消防泵房2.图例后的数字,代表此位置的数量'
-        }
-    },
-    methods: {
-        dump() {},
-        legendClik() {
-            this.$refs.EditdMarks.showModal()
-        }
-    },
-    components: {
-        Remarks
-    },
-    mounted() {}
-}
-</script>
-<style lang="less" scoped>
-.edit_map {
-    position: fixed;
-    bottom: 28px;
-    right: 28px;
-    z-index: 2;
-    .edit-icon {
-        width: 48px;
-        height: 48px;
-        background: linear-gradient(180deg, rgba(54, 156, 247, 1) 0%, rgba(2, 91, 170, 1) 100%);
-        box-shadow: 0px 2px 8px 0px rgba(31, 36, 41, 0.2);
-        border-radius: 50%;
-        text-align: center;
-        line-height: 48px;
-        display: inline-block;
-        cursor: pointer;
-        position: relative;
-        i {
-            color: #ffffff;
-            font-size: 20px;
-        }
-        span {
-            position: absolute;
-            right: 4px;
-            top: 2px;
-            width: 10px;
-            height: 10px;
-            display: inline-block;
-            background: #f54a45;
-            border-radius: 50%;
-        }
-    }
-    .hover-div {
-        position: absolute;
-        bottom: 58px;
-        right: 28px;
-        .icon1 {
-            width: 40px;
-            height: 40px;
-            background: rgba(255, 255, 255, 1);
-            box-shadow: 0px 2px 4px 0px rgba(31, 36, 41, 0.06);
-            border: 1px solid rgba(31, 36, 41, 0.2);
-            font-size: 16px;
-            display: inline-block;
-            color: #646c73;
-            border-radius: 50%;
-            text-align: center;
-            line-height: 40px;
-            cursor: pointer;
-        }
-        .icon2 {
-            width: 40px;
-            height: 40px;
-            background: rgba(255, 255, 255, 1);
-            box-shadow: 0px 2px 4px 0px rgba(31, 36, 41, 0.06);
-            border: 1px solid rgba(31, 36, 41, 0.2);
-            font-size: 16px;
-            display: inline-block;
-            color: #646c73;
-            border-radius: 50%;
-            text-align: center;
-            line-height: 40px;
-            margin-top: 15px;
-            cursor: pointer;
-        }
-    }
-}
-</style>
-<style lang="less">
-</style>

+ 19 - 21
src/components/editLengend.vue

@@ -124,18 +124,18 @@
 import { updateStatis } from '@/api/public.js'
 import { mapGetters } from 'vuex'
 export default {
-    props: ['editTable', 'loading', 'tableHeigth'],
+    props: ['editTable', 'loading', 'tableHeigth', 'floorInfo'],
     data() {
         return {
             value: false,
             tbData1: [],
             tbData2: [],
             tbData3: [],
-            editNum: []
+            editNum: [],
         }
     },
     computed: {
-        ...mapGetters(['plazaId'])
+        ...mapGetters(['plazaId']),
     },
     methods: {
         handleSelectionChange(val) {
@@ -147,7 +147,7 @@ export default {
                 this.$confirm('图例中的数据发生变化, 是否需要保存?', {
                     confirmButtonText: '保存',
                     cancelButtonText: '放弃修改',
-                    type: 'warning'
+                    type: 'warning',
                 })
                     .then(() => {
                         this.$emit('saveNum', this.editNum)
@@ -155,7 +155,7 @@ export default {
                     .catch(() => {
                         this.$message({
                             type: 'info',
-                            message: '已放弃修改'
+                            message: '已放弃修改',
                         })
                         this.editNum = []
                         this.$emit('saveNum', this.editNum)
@@ -173,44 +173,44 @@ export default {
         queryEdit(val) {
             let arr = []
             if (val.length > 0) {
-                val.forEach(e => {
+                val.forEach((e) => {
                     let obj = {
                         BuildingId: '1',
                         Num: e.Num == '' ? null : Number(e.Num),
                         GraphElementId: e.GraphElementId,
-                        FloorId: this.$cookie.get('floorMapId'),
+                        FloorId: this.floorInfo.gname ? this.floorInfo.gname : this.$cookie.get('floorMapId'),
                         ProjectId: e.ProjectId,
-                        CategoryId: e.GraphCategoryId
+                        CategoryId: e.GraphCategoryId,
                     }
                     arr.push(obj)
                 })
             }
             let params = {
                 postParams: {
-                    Content: arr
-                }
+                    Content: arr,
+                },
             }
 
             updateStatis(params)
-                .then(res => {
+                .then((res) => {
                     if (res.Result == 'success') {
                         this.$message({
                             message: '操作成功',
-                            type: 'success'
+                            type: 'success',
                         })
                         this.$emit('changeSwitch', true)
                         this.$store.commit('SETSHOWVIEW', 1)
                     } else {
                         this.$message({
                             message: '操作失败',
-                            type: 'error'
+                            type: 'error',
                         })
                     }
                 })
-                .catch(err => {
+                .catch((err) => {
                     this.$message({
                         message: err,
-                        type: 'error'
+                        type: 'error',
                     })
                 })
         },
@@ -230,7 +230,7 @@ export default {
         // 修改隐藏为0的项目的开关
         changeSwitch(val) {
             this.$emit('handleSwich2', val)
-        }
+        },
         // init() {
         // this.tbData1 = []
         // this.tbData2 = []
@@ -256,7 +256,6 @@ export default {
         // }
         // },
     },
-    mounted() {},
     watch: {
         editTable: {
             handler() {
@@ -264,7 +263,6 @@ export default {
                     let tabHeight = document.getElementById('lenged_tab').offsetHeight
                     let dom = document.getElementsByClassName('legend-tab2')[0]
                     let dom2 = document.getElementsByClassName('legend-table2')[0]
-                    console.log('tabHeight', tabHeight)
                     if (!dom) {
                         return
                     }
@@ -273,9 +271,9 @@ export default {
                 })
             },
             deep: true,
-            immediate: true
-        }
-    }
+            immediate: true,
+        },
+    },
 }
 </script>
 <style lang="less" scoped>

+ 3 - 6
src/components/legendremarks.vue

@@ -5,7 +5,7 @@
 */
 <template>
     <div class='editModel' v-if='visible'>
-        <a-modal v-model='visible' :title='title' :closable='false' :maskClosable='false' :width='648' :footer='null'>
+        <el-dialog append-to-body :visible.sync='visible' :title='title' :width='width' :showClose='false'>
             <div class='edit-x' @click='handlCancel'>X</div>
             <div class='edit_container' style='width:600px;height:156px'>
                 <quill-editor
@@ -22,7 +22,7 @@
                 <span @click='handlCancel'>取消</span>
                 <span @click='handleOk'>保存</span>
             </div>
-        </a-modal>
+        </el-dialog>
     </div>
 </template>
 <script>
@@ -34,6 +34,7 @@ export default {
     name: 'EditdMarks',
     data() {
         return {
+            width: '648px',
             valLen: 0, //输入字数限制
             remarksTexts: '', //展示的备注
             text1: '主要设备房包括:冷源机房,热源机房,开闭站,配变电所(室),发电机房,消防水泵房,消防高位水箱间,生活水泵房,慧云机房,垃圾房',
@@ -77,12 +78,8 @@ export default {
         },
         // val为传过来的备注
         showModal() {
-            // this.$emit('queryMarks')
-            // this.$emit('')
-            // return
             this.query()
             this.visible = true
-            // this.remarksTexts = this.remarksText
         },
         query() {
             if (this.remarksText) {

+ 0 - 98
src/components/marksEnduit.vue

@@ -1,98 +0,0 @@
-<template>
-    <div class='editor'>
-        <div ref='toolbar' class='toolbar'></div>
-        <div ref='editor' class='text'></div>
-        <span class='limitNum'>
-            <span>{{num}}</span>/200
-        </span>
-    </div>
-</template>
-
-<script>
-import E from 'wangeditor'
-export default {
-    name: 'editoritem',
-    data() {
-        return {
-            editor: null,
-            info_: null,
-            spanInfo: 0,
-            num: ''
-        }
-    },
-    model: {
-        prop: 'value',
-        event: 'change'
-    },
-    props: {
-        value: {
-            type: String,
-            default: ''
-        },
-        isClear: {
-            type: Boolean,
-            default: false
-        }
-    },
-    watch: {
-        isClear(val) {
-            if (val) {
-                this.editor.txt.clear()
-                this.info_ = null
-            }
-        },
-        value: function(value, e) {
-            if (value !== this.editor.txt.html()) {
-                this.editor.txt.html(this.value)
-            }
-        }
-    },
-    mounted() {
-        this.seteditor()
-        this.editor.txt.html(this.value)
-        this.num = this.value.replace(/<[^>]+>/g, '').length
-    },
-    methods: {
-        seteditor() {
-            this.editor = new E(this.$refs.toolbar, this.$refs.editor)
-            this.editor.customConfig.menus = ['bold', 'italic', 'foreColor']
-            this.editor.customConfig.onchangeTimeout = 100
-            this.editor.customConfig.onchange = html => {
-                this.info_ = html
-                this.num = this.info_.replace(/<[^>]+>/g, '').length
-                this.$emit('change', this.info_)
-            }
-            this.editor.customConfig.onfocus = html => {
-                this.info_ = html
-                this.$emit('change', this.info_)
-            }
-            this.editor.customConfig.onblur = html => {
-                this.info_ = html
-                this.$emit('change', this.info_)
-            }
-            this.editor.create()
-        }
-    }
-}
-</script>
-
-<style lang="less" scoped>
-.editor {
-    width: 100%;
-    height: 300px;
-    .toolbar {
-        border: 1px solid #ccc;
-    }
-    .text {
-        border: 1px solid #ccc;
-        height: 292px;
-    }
-    .limitNum {
-        display: flex;
-        justify-content: flex-end;
-        align-items: center;
-        margin-right: 12px;
-        margin-top: -25px;
-    }
-}
-</style>

+ 0 - 16
src/components/viewLengend.vue

@@ -108,26 +108,10 @@ export default {
     },
     computed: {
         ...mapGetters(['scpzTable', 'legendTable', 'remarksText']),
-        // tableHeight() {
-        //     if (window.screen.height > 1000) {
-        //         return 500
-        //     } else {
-        //         return 334
-        //     }
-        // },
-        // initText() {
-        // if (this.defaultComment) {
-        //     return this.defaultComment
-        // } else {
-        //     return this.remarksText
-        // }
-        // }
     },
-    mounted() {},
     updated() {
         this.setSelected()
     },
-    created() {},
 }
 </script>
 <style lang="less" scoped>

+ 2 - 6
src/views/equipment/fenbuPic.vue

@@ -24,10 +24,7 @@ export default {
     data() {
         return {
             show: false,
-            floorInfo: {
-                gname: 'f1',
-                code: 'F1',
-            },
+            floorInfo: {},
             loadName: '',
             type: '',
             floors: [],
@@ -91,8 +88,7 @@ export default {
                     })
                 }
                 this.floorInfo = this.floors[0]
-                // this.init()
-                console.log(this.floors)
+                console.log(this.floorInfo)
             })
         },
         init() {

+ 1 - 2
src/views/equipment/index.vue

@@ -76,7 +76,6 @@
 import floorList from '@/components/floorList.vue'
 import floorMap from '@/components/floorMap/index.vue'
 import eqDialog from './eqDialog'
-import editList from '@/components/edit.vue'
 import { system } from '@/utils/plugins/components.js'
 import { queryPic, getPvUv } from '@/api/public.js'
 import { mapGetters } from 'vuex'
@@ -104,7 +103,7 @@ export default {
             ShowDialog: false, //是否显示弹窗
         }
     },
-    components: { floorList, eqDialog, floorMap, editList },
+    components: { floorList, eqDialog, floorMap },
     watch: {
         // 监听currentFloor变化,重新渲染楼层组件,解决 数据与视图不照应的问题
         /* '$store.state.currentFloor': {

+ 0 - 5
src/views/overview/index.vue

@@ -201,8 +201,6 @@ export default {
                 }
             })
             data.map((item) => {
-                console.log(item)
-                // return
                 if (item.lxr) {
                     let lxr = item.lxr.split(',').join('\n\r')
                     item.lxr = lxr
@@ -269,7 +267,6 @@ export default {
             let params = {
                 getParams: {
                     plazaId: plazaId,
-                    // plazaId: '1000303'//这个id有3条数据
                 },
             }
             queryFact(params).then((res) => {
@@ -295,7 +292,6 @@ export default {
                         this.rowspan(5, 'lxdh')
                         this.rowspan(1, 'type')
                     }
-                    console.log(this.constructions)
                     this.shuzihuayijiao = res.shuzihuayijiao ? res.shuzihuayijiao : ''
                     if (res.plazaName) {
                         this.$store.commit('SETPLAZENAME', res.plazaName)
@@ -345,7 +341,6 @@ export default {
     watch: {
         '$store.state.plazaId': {
             handler(val, nel) {
-                console.log('val', val, nel)
                 this.query()
             },
             immediate: true,

+ 0 - 1
src/views/overview/picModal.vue

@@ -34,7 +34,6 @@ export default {
             this.dialogVisible = true
             this.rotationImg = params
             this.picType = type
-            console.log('params',params)
             if (this.rotationImg.length > 0) {
                 let img = new Image()
                 img.src = this.rotationImg[0].url

+ 0 - 0
src/views/overview/viewRotation.vue