Parcourir la source

Merge branch 'master' of http://39.106.8.246:3003/web/ibms

chuwu il y a 5 ans
Parent
commit
2bc78c6e7e

+ 2 - 1
config/dev.env.js

@@ -3,5 +3,6 @@ const merge = require('webpack-merge')
 const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
-    NODE_ENV: '"development"'
+    NODE_ENV: '"development"',
+    BASE_URL: '"http://39.96.187.128"', //线上iframe地址
 })

+ 2 - 1
config/prod.env.js

@@ -1,4 +1,5 @@
 'use strict'
 module.exports = {
-    NODE_ENV: '"production"'
+    NODE_ENV: '"production"',
+    BASE_URL: '"http://39.96.187.128"', //线上iframe地址
 }

+ 2 - 2
src/framework/style/layout.scss

@@ -202,7 +202,7 @@ body {
         background: #fff;
         margin-top: 10px;
     }
-    > .data-table-pagination {
+    >.data-table-pagination {
         margin-top: 10px;
         flex-grow: 0;
         flex-shrink: 0;
@@ -254,7 +254,7 @@ body {
                     .cell {
                         line-height: 20px;
                     } 
-                    &.ttt{
+                    &.btn{
                         padding: 2px 0;
                     }                   
                 }

+ 61 - 0
src/views/data_admin/buildAssets/Frame.vue

@@ -0,0 +1,61 @@
+<template>
+    <el-dialog :title='title' :visible.sync='dialogVisible' width='500px'>
+        <iframe
+            v-if='flag'
+            id='google_ads_frame2'
+            name='google_ads_frame2'
+            frameborder='0'
+            :src='iframeSrc'
+            marginwidth='0'
+            marginheight='0'
+            vspace='0'
+            hspace='0'
+            allowtransparency='true'
+            scrolling='no'
+            allowfullscreen='true'
+        ></iframe>
+    </el-dialog>
+</template>
+
+<script>
+export default {
+    name: 'saga-dialog',
+    data() {
+        return {
+            dialogVisible: false,
+            flag: true
+        }
+    },
+    props: {
+        iframeSrc: {
+            default: ''
+        },
+        title: {
+            default: '详情'
+        }
+    },
+    methods: {
+        show() {
+            this.dialogVisible = true
+        },
+        refresh() {
+            this.flag = this.flag ? false : true
+            this.$nextTick(() => {
+                this.flag = this.flag ? false : true
+            })
+        }
+    },
+    watch: {
+        iframeSrc() {
+            this.refresh()
+        }
+    }
+}
+</script>
+
+<style scoped lang='less'>
+#google_ads_frame2 {
+    height: 350px;
+    width: 100%;
+}
+</style>

+ 128 - 23
src/views/data_admin/buildAssets/NoMap.vue

@@ -1,55 +1,160 @@
 <template>
-    <div class='box1' style='display: flex;flex-direction: column;flex-grow: 1;flex-shrink: 1;'>
-        <el-table :data='tableData' style='width: 100%' border class='data-table'>
-                <el-table-column header-align='center' align='center' prop='c' label='建筑'></el-table-column>、
-                <el-table-column header-align='center' align='center' prop='d' label='楼层'></el-table-column>
-                <el-table-column header-align='center' align='center' prop='f' label='点位标签名称'></el-table-column>
-                <el-table-column header-align='center' align='center' prop='g' label='设备族'></el-table-column>
-                <el-table-column header-align='center' align='center' prop='h' label='本地名称'></el-table-column>
-                <el-table-column header-align='center' align='center' prop='i' label='操作'>
-                    <template slot-scope='scope'>
-                        <el-button type='primary' plain size='mini' @click='look(scope.row)'>查看</el-button>
-                        <el-button type='danger' plain size='mini' @click='create(scope.row)'>创建资产</el-button>
-                    </template>
-                </el-table-column>
+    <div class="page-table-template" style='display: flex;flex-direction: column;flex-grow: 1;flex-shrink: 1;'>
+        <el-table  :data='tableData' style='width: 100%' border class='data-table' v-loading='loading'>
+            <el-table-column header-align='center' align='center' prop='BuildName' label='建筑'></el-table-column>、
+            <el-table-column header-align='center' align='center' prop='floorName' label='楼层'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='PointName' label='点位标签名称'>
+                <template slot-scope='scope'>
+                    <span>{{scope.row.PointName || '--'}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column header-align='center' align='center' prop='FamilyName' label='设备族'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FmId' label='本地编码' width='250'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FmName' label='本地名称'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='PointName' label='操作' width='300'>
+                <template slot-scope='scope'>
+                    <el-button type='primary' plain size='mini' @click='look(scope.row)'>&nbsp;&nbsp;&nbsp;查看&nbsp;&nbsp;&nbsp;</el-button>
+                     <el-button type='primary' plain size='mini' @click='add(scope.row)'>添加岗位</el-button>
+                    <el-button type='danger' plain size='mini' @click='del(scope.row)'>&nbsp;&nbsp;&nbsp;删除&nbsp;&nbsp;&nbsp;</el-button>
+                </template>
+            </el-table-column>
         </el-table>
-        <base-pagination :currentPages='pageNum' :total='total' @pageChanged='pageChanged'></base-pagination>
+        <base-pagination class='data-table-pagination' :currentPages='pageNum' :total='total' @pageChanged='pageChanged'></base-pagination>
+        <!-- component -->
+        <saga-dialog ref='dialog' :iframeSrc='iframeSrc'></saga-dialog>
+        <saga-station ref='station' :options='options' :itemObj='itemObj' @refresh='refresh'></saga-station>
     </div>
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
+import SagaDialog from './Frame'
+import SagaStation from './Station'
+//api
+import {
+    getErrAssets, //获取异常资产type不同不同tab
+    delErrAssets
+} from '@/api/scan/request'
 export default {
     name: 'nomap',
     data() {
         return {
+            loading: false,
             tableData: [],
             total: 0,
             pageNum: 1,
             pageSize: 10,
+            iframeSrc: '',
+            options: [],
+            itemObj:{}
         }
     },
     props: {
-        buildVlaue: {}
+        buildVlaue: {
+            default: ''
+        },
+        floorsObj: {
+            default: {}
+        },
+        allFamilyObj: {
+            default: {}
+        }
+    },
+    components: {
+        SagaDialog,
+        SagaStation
+    },
+    computed: {
+        ...mapGetters('peojMess', ['projectId', 'userId', 'secret'])
     },
     methods: {
-        pageChanged() {
-
+        look(row) {
+            this.iframeSrc =
+                process.env.BASE_URL +
+                ':8889/#/details?perjectId=' +
+                this.projectId +
+                '&secret=' +
+                this.secret +
+                '&FmId=' +
+                row.FmId +
+                '&type=1&code=' +
+                row.Family
+            this.$refs['dialog'].show()
         },
-        look() {
-
+        add(row) {
+            this.options = this.allFamilyObj[row.Family].content
+            this.itemObj = row
+            this.$refs['station'].show()
         },
-        create() {
-
+        del(row) {
+            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            })
+                .then(() => {
+                    let param = {
+                        ProjId: this.projectId,
+                        UserId: this.userId
+                    }
+                    let paramList = [row.FmId]
+                    delErrAssets(param, paramList).then(result => {
+                        if (result.data.Result == 'success') {
+                            this.getAsset()
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                        }
+                    })
+                })
+                .catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    })
+                })
+        },
+        refresh() {
+            this.getAsset()
+        },
+        pageChanged(page, size) {
+            this.pageNum = page
+            this.pageSize = size
+            this.getAsset()
+        },
+        getAsset() {
+            this.loading = true
+            let param = {
+                BuildId: this.buildVlaue || undefined,
+                PageNum: this.pageNum,
+                PageSize: this.pageSize,
+                Type: 3,
+                ProjId: this.projectId,
+                UserId: this.userId
+            }
+            getErrAssets(param).then(res => {
+                if (res.data.Result == 'success') {
+                    this.loading = false
+                    let list = res.data.FmList
+                    list.forEach((ele, index) => {
+                        ele.floorName = this.floorsObj[ele.FloorId] || '--'
+                    })
+                    this.tableData = list
+                    this.total = res.data.Count
+                    console.log("nomap")
+                    console.log(this.tableData)
+                }
+            })
         }
     },
     watch: {
         buildVlaue() {
-            console.log('****')
+            this.getAsset()
         }
     }
 }
 </script>
 
 <style scoped lang='less'>
-
 </style>

+ 83 - 13
src/views/data_admin/buildAssets/Nofind.vue

@@ -1,49 +1,114 @@
 <template>
-    <div class='box1' style='display: flex;flex-direction: column;flex-grow: 1;flex-shrink: 1;'>
-        <el-table :data='tableData' style='width: 100%' border class='data-table'>
+    <div class="page-table-template" style='display: flex;flex-direction: column;flex-grow: 1;flex-shrink: 1;'>
+        <el-table :data='tableData' style='width: 100%' border class='data-table' v-loading='loading'>
             <el-table-column header-align='center' align='center' prop='BuildName' label='建筑'></el-table-column>、
-            <el-table-column header-align='center' align='center' prop='d' label='楼层'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='f' label='点位标签名称'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='floorName' label='楼层'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='PointName' label='点位标签名称'>
+                <template slot-scope='scope'>
+                    <span>{{scope.row.PointName || '--'}}</span>
+                </template>
+            </el-table-column>
             <el-table-column header-align='center' align='center' prop='FamilyName' label='设备族'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='FmId' label='本地编码'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FmId' label='本地编码' width='250'></el-table-column>
             <el-table-column header-align='center' align='center' prop='FmName' label='本地名称'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='PointName' label='操作' width='150'>
+                <template slot-scope='scope'>
+                    <el-button type='primary' plain size='mini' @click='look(scope.row)'>查看</el-button>
+                    <el-button type='danger' plain size='mini' @click='del(scope.row)'>删除</el-button>
+                </template>
+            </el-table-column>
         </el-table>
-        <base-pagination :currentPages='pageNum' :total='total' @pageChanged='pageChanged'></base-pagination>
+        <base-pagination class='data-table-pagination' :currentPages='pageNum' :total='total' @pageChanged='pageChanged'></base-pagination>
+        <saga-dialog ref='dialog' :iframeSrc='iframeSrc'></saga-dialog>
     </div>
 </template>
 
 <script>
 import { mapGetters } from 'vuex'
+import SagaDialog from './Frame'
 //api
 import {
     getErrAssets, //获取异常资产type不同不同tab
+    delErrAssets
 } from '@/api/scan/request'
 export default {
     name: 'nofind',
     data() {
         return {
+            loading: false,
             tableData: [],
             total: 0,
             pageNum: 1,
-            pageSize: 10
+            pageSize: 10,
+            iframeSrc: ''
         }
     },
     props: {
-        buildVlaue: {}
+        buildVlaue: {
+            default: ''
+        },
+        floorsObj: {
+            default: {}
+        }
+    },
+    components: {
+        SagaDialog
     },
     computed: {
-        ...mapGetters('peojMess', ['projectId', 'userId'])
+        ...mapGetters('peojMess', ['projectId', 'userId', 'secret'])
     },
     methods: {
+        look(row) {
+            this.iframeSrc =
+                process.env.BASE_URL +
+                ':8889/#/details?perjectId=' +
+                this.projectId +
+                '&secret=' +
+                this.secret +
+                '&FmId=' +
+                row.FmId +
+                '&type=1&code=' +
+                row.Family
+            this.$refs['dialog'].show()
+        },
+        del(row) {
+            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            })
+                .then(() => {
+                    let param = {
+                        ProjId: this.projectId,
+                        UserId: this.userId
+                    }
+                    let paramList = [row.FmId]
+                    delErrAssets(param, paramList).then(result => {
+                        if (result.data.Result == 'success') {
+                            this.getAsset()
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                        }
+                    })
+                })
+                .catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    })
+                })
+        },
         pageChanged(page, size) {
-            console.log(page, size)
             this.pageNum = page
             this.pageSize = size
             this.getAsset()
         },
         getAsset() {
+            this.loading = true
             let param = {
-                BuildId: this.buildVlaue,
+                BuildId: this.buildVlaue || undefined,
                 PageNum: this.pageNum,
                 PageSize: this.pageSize,
                 Type: 1,
@@ -52,8 +117,13 @@ export default {
             }
             getErrAssets(param).then(res => {
                 if (res.data.Result == 'success') {
-                    console.log(res.data.FmList)
-                    this.tableData = res.data.FmList
+                    this.loading = false
+                    let list = res.data.FmList
+                    list.forEach((ele, index) => {
+                        ele.floorName = this.floorsObj[ele.FloorId] || '--'
+                    })
+                    this.tableData = list
+                     this.total = res.data.Count
                 }
             })
         }

+ 113 - 14
src/views/data_admin/buildAssets/Nopaint.vue

@@ -1,37 +1,136 @@
 <template>
-    <div class='box1' style='display: flex;flex-direction: column;flex-grow: 1;flex-shrink: 1;'>
-        <el-table :data='tableData' style='width: 100%' border class='data-table'>
-            <el-table-column header-align='center' align='center' prop='c' label='建筑'></el-table-column>、
-            <el-table-column header-align='center' align='center' prop='d' label='楼层'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='f' label='点位标签名称'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='g' label='设备族'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='h' label='本地编码' show-overflow-tooltip></el-table-column>
-            <el-table-column header-align='center' align='center' prop='i' label='本地名称'></el-table-column>
+    <div class="page-table-template" style='display: flex;flex-direction: column;flex-grow: 1;flex-shrink: 1;'>
+        <el-table  :data='tableData' style='width: 100%' border class='data-table' v-loading='loading'>
+            <el-table-column header-align='center' align='center' prop='BuildName' label='建筑'></el-table-column>、
+            <el-table-column header-align='center' align='center' prop='floorName' label='楼层'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='PointName' label='点位标签名称'>
+                <template slot-scope='scope'>
+                    <span>{{scope.row.PointName || '--'}}</span>
+                </template>
+            </el-table-column>
+            <el-table-column header-align='center' align='center' prop='FamilyName' label='设备族'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FmId' label='本地编码' width='250'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FmName' label='本地名称'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='PointName' label='操作' width='150'>
+                <template slot-scope='scope'>
+                    <el-button type='primary' plain size='mini' @click='look(scope.row)'>查看</el-button>
+                    <el-button type='danger' plain size='mini' @click='del(scope.row)'>删除</el-button>
+                </template>
+            </el-table-column>
         </el-table>
-        <base-pagination :currentPages='pageNum' :total='total' @pageChanged='pageChanged'></base-pagination>
+        <base-pagination class='data-table-pagination' :currentPages='pageNum' :total='total' @pageChanged='pageChanged'></base-pagination>
+        <saga-dialog ref='dialog' :iframeSrc='iframeSrc'></saga-dialog>
     </div>
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
+import SagaDialog from './Frame'
+//api
+import {
+    getErrAssets, //获取异常资产type不同不同tab
+    delErrAssets
+} from '@/api/scan/request'
 export default {
-    name: 'nopaint',
+    name: 'nofind',
     data() {
         return {
+            loading: false,
             tableData: [],
             total: 0,
             pageNum: 1,
-            pageSize: 10
+            pageSize: 10,
+            iframeSrc: ''
         }
     },
     props: {
-        buildVlaue: {}
+        buildVlaue: {
+            default: ''
+        },
+        floorsObj: {
+            default: {}
+        }
+    },
+    components: {
+        SagaDialog
+    },
+    computed: {
+        ...mapGetters('peojMess', ['projectId', 'userId', 'secret'])
     },
     methods: {
-        pageChanged() {}
+        look(row) {
+            this.iframeSrc =
+                process.env.BASE_URL +
+                ':8889/#/details?perjectId=' +
+                this.projectId +
+                '&secret=' +
+                this.secret +
+                '&FmId=' +
+                row.FmId +
+                '&type=1&code=' +
+                row.Family
+            this.$refs['dialog'].show()
+        },
+        del(row) {
+            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            })
+                .then(() => {
+                    let param = {
+                        ProjId: this.projectId,
+                        UserId: this.userId
+                    }
+                    let paramList = [row.FmId]
+                    delErrAssets(param, paramList).then(result => {
+                        if (result.data.Result == 'success') {
+                            this.getAsset()
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                        }
+                    })
+                })
+                .catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    })
+                })
+        },
+        pageChanged(page, size) {
+            this.pageNum = page
+            this.pageSize = size
+            this.getAsset()
+        },
+        getAsset() {
+            this.loading = true
+            let param = {
+                BuildId: this.buildVlaue || undefined,
+                PageNum: this.pageNum,
+                PageSize: this.pageSize,
+                Type: 2,
+                ProjId: this.projectId,
+                UserId: this.userId
+            }
+            getErrAssets(param).then(res => {
+                if (res.data.Result == 'success') {
+                    this.loading = false
+                    let list = res.data.FmList
+                    list.forEach((ele, index) => {
+                        ele.floorName = this.floorsObj[ele.FloorId] || '--'
+                    })
+                    this.tableData = list
+                     this.total = res.data.Count
+                }
+            })
+        }
     },
     watch: {
         buildVlaue() {
-            console.log('****')
+            this.getAsset()
         }
     }
 }

+ 171 - 16
src/views/data_admin/buildAssets/Noverify.vue

@@ -1,43 +1,198 @@
 <template>
-    <div class='box1' style='display: flex;flex-direction: column;flex-grow: 1;flex-shrink: 1;'>
-        <el-table :data='tableData' style='width: 100%' border class='data-table'>
-            <el-table-column header-align='center' align='center' prop='c' label='建筑'></el-table-column>、
-            <el-table-column header-align='center' align='center' prop='d' label='楼层'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='f' label='点位标签名称'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='g' label='设备族'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='h' label='本地编码'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='i' label='本地名称'></el-table-column>
-            <el-table-column header-align='center' align='center' prop='i' label='操作'>
+    <div class="page-table-template" style='display: flex;flex-direction: column;flex-grow: 1;flex-shrink: 1;'>
+        <el-table :data='tableData' style='width: 100%' border class='data-table' v-loading='loading'>
+            <el-table-column header-align='center' align='center' prop='BuildName' label='建筑'></el-table-column>、
+            <el-table-column header-align='center' align='center' prop='floorName' label='楼层'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FamilyName' label='设备族'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FmId' label='本地编码' width='250'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FmName' label='本地名称'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FmName' label='所在元空间'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='FmName' label='对应设备类'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='bimXY' label='BIM模型中坐标'></el-table-column>
+            <el-table-column header-align='center' align='center' prop='PointName' label='操作' width='220'>
                 <template slot-scope='scope'>
+                    <el-button type='primary' plain size='mini' @click='look(scope.row)'>查看</el-button>
+                    <el-button type='primary' plain size='mini' @click='post(scope.row)'>岗位</el-button>
                     <el-button type='danger' plain size='mini' @click='del(scope.row)'>删除</el-button>
                 </template>
             </el-table-column>
         </el-table>
-        <base-pagination :currentPages='pageNum' :total='total' @pageChanged='pageChanged'></base-pagination>
+        <base-pagination class='data-table-pagination' :currentPages='pageNum' :total='total' @pageChanged='pageChanged'></base-pagination>
+        <saga-dialog ref='dialog' :iframeSrc='iframeSrc'></saga-dialog>
     </div>
 </template>
 
 <script>
+import { mapGetters } from 'vuex'
+import SagaDialog from './Frame'
+//api
+import {
+    getErrAssets, //获取异常资产type不同不同tab
+    delErrAssets,
+    getSpaceId
+} from '@/api/scan/request'
 export default {
     name: 'noverify',
     data() {
         return {
+            loading: false,
             tableData: [],
             total: 0,
             pageNum: 1,
-            pageSize: 10
+            pageSize: 10,
+            iframeSrc: ''
         }
     },
     props: {
-        buildVlaue: {}
+        buildVlaue: {
+            default: ''
+        },
+        floorsObj: {
+            default: {}
+        }
+    },
+    components: {
+        SagaDialog
+    },
+    computed: {
+        ...mapGetters('peojMess', ['projectId', 'userId', 'secret'])
     },
     methods: {
-        pageChanged() {},
-        del() {},
+        look(row) {
+            this.iframeSrc =
+                process.env.BASE_URL +
+                ':8889/#/details?perjectId=' +
+                this.projectId +
+                '&secret=' +
+                this.secret +
+                '&FmId=' +
+                row.FmId +
+                '&type=1&code=' +
+                row.Family
+            this.$refs['dialog'].show()
+        },
+        post(row) {
+            this.iframeSrc =
+                process.env.BASE_URL +
+                ':8889/#/details?perjectId=' +
+                this.projectId +
+                '&secret=' +
+                this.secret +
+                '&FmId=' +
+                row.FmId +
+                '&type=1&code=' +
+                row.Family
+            this.$refs['dialog'].show()
+        },
+        del(row) {
+            this.$confirm('此操作将永久删除, 是否继续?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            })
+                .then(() => {
+                    let param = {
+                        ProjId: this.projectId,
+                        UserId: this.userId
+                    }
+                    let paramList = [row.FmId]
+                    delErrAssets(param, paramList).then(result => {
+                        if (result.data.Result == 'success') {
+                            this.getAsset()
+                            this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            })
+                        }
+                    })
+                })
+                .catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    })
+                })
+        },
+        pageChanged(page, size) {
+            this.pageNum = page
+            this.pageSize = size
+            this.getAsset()
+        },
+        getAsset() {
+            this.loading = true
+            let param = {
+                BuildId: this.buildVlaue || undefined,
+                PageNum: this.pageNum,
+                PageSize: this.pageSize,
+                Type: 4,
+                ProjId: this.projectId,
+                UserId: this.userId,
+                CodeType: 1
+            }
+            getErrAssets(param).then(res => {
+                                    // this.tableData = list
+                if (res.data.Result == 'success') {
+                    this.loading = false
+                    let list = res.data.FmList
+                    list.forEach((ele, index) => {
+                        ele.floorName = this.floorsObj[ele.FloorId] || '--'
+                        ele.bimXY = (ele.X || '空') + ',' + (ele.Y || '空')
+                    })
+                    this.total = res.data.Count
+                    this.tableData = list
+                    // this.getSpaceId()
+                }
+            })
+        },
+        getSpaceId() {
+            let param = {},
+                idArr = [],
+                i = 0,
+                dataArr = this.tableData
+            for (; i < dataArr.length; i++) {
+                if (dataArr[i].EquipmentId) {
+                    idArr.push({
+                        from_id: dataArr[i].EquipmentId,
+                        graph_id: 'GtEquipinSpace001',
+                        rel_type: '1'
+                    })
+                }
+            }
+            param = {
+                perjectId: this.projectId,
+                secret: this.secret,
+                list: idArr
+            }
+            getSpaceId(param).then(res => {
+                let data = res.data,
+                    spaceArr = [],
+                    j = 0
+                if (data.Result == 'success') {
+                    for (; j < data.Content.length; j++) {     
+                        console.log('space**********')                   
+                        console.log(data.Content)
+                        // if (data.Content[j].Count != 0) {
+                        //     spaceArr.push({
+                        //         id: data.Content[j].Content[0].to_id
+                        //     })
+                        //     dataArr.map(item => {
+                        //         if (item.EquipmentId == data.Content[j].Content[0].from_id) {
+                        //             item.spaceId = data.Content[j].Content[0].to_id
+                        //         }
+                        //         return item
+                        //     })
+                        // }
+                    }
+                    console.log(dataArr, 'dataArr')
+                    // this.getSpaceName(spaceArr)
+                } else {
+                }
+            })
+        }
     },
     watch: {
-        buildVlaue(val) {
-            console.log('****')
+        buildVlaue() {
+            this.getAsset()
         }
     }
 }

+ 123 - 0
src/views/data_admin/buildAssets/Station.vue

@@ -0,0 +1,123 @@
+<template>
+    <el-dialog title='添加岗位' :visible.sync='dialogVisible' width='500px'>
+        <div class='add-box'>
+            <el-select v-model='value' placeholder='资产设备族对应的设备类' clearable>
+                <el-option v-for='item in options' :key='item.code' :label='item.name' :value='item.code'></el-option>
+            </el-select>
+        </div>
+        <span slot='footer' class='dialog-footer'>
+            <el-button type='primary' @click='save'>保存</el-button>
+        </span>
+    </el-dialog>
+</template>
+
+<script>
+import {
+    createPost, //新建岗位
+    upDateTableMain, //关联资产
+    createComponent //新建岗位(部件)
+} from '@/api/scan/request'
+import { mapGetters } from 'vuex'
+export default {
+    name: 'saga-station',
+    data() {
+        return {
+            dialogVisible: false,
+            value: ''
+        }
+    },
+    computed: {
+        ...mapGetters('peojMess', ['projectId', 'secret', 'userId'])
+    },
+    props: {
+        options: {
+            default: []
+        },
+        itemObj: {
+            default: {}
+        }
+    },
+    methods: {
+        show() {
+            this.dialogVisible = true
+        },
+        save() {
+            if (this.value) {
+                let param = {
+                    BuildId: this.itemObj.BuildId,
+                    category: this.value,
+                    secret: this.secret,
+                    perjectId: this.projectId,
+                    BIMID: this.itemObj.FloorId,
+                    BIMLocation: (this.itemObj.X || 0) + ',' + (this.itemObj.Y || 0) + ',' + (this.itemObj.Z || 0)
+                }
+                if (param.category.length == 6) {
+                    createComponent(param).then(res => {
+                        if (res.data.Result == 'success') {
+                            this.upDateTableMain(res.data.id)
+                        } else {
+                            this.$message({
+                                message: res.data.ResultMsg,
+                                type: 'warning'
+                            })
+                        }
+                    })
+                } else {
+                    createPost(param).then(res => {
+                        if (res.data.Result == 'success') {
+                            this.upDateTableMain(res.data.id)
+                        } else {
+                            this.$message({
+                                message: res.data.ResultMsg,
+                                type: 'warning'
+                            })
+                        }
+                    })
+                }
+            } else {
+                this.$message({
+                    message: '请选择设备类后再进行关联',
+                    type: 'warning'
+                })
+            }
+        },
+        //关联资产
+        upDateTableMain(id) {
+            let param = {
+                    ProjId: this.projectId,
+                    UserId: this.userId
+                },
+                paramList = {}
+            paramList.EquipmentId = id
+            paramList.FmId = this.itemObj.FmId
+            paramList.Family = this.itemObj.Family
+            upDateTableMain(param, [paramList]).then(res => {
+                if (res.data.Result == 'success') {
+                    this.$message({
+                        message: '保存成功',
+                        type: 'success'
+                    })
+                    this.dialogVisible = false
+                    this.$emit('refresh')
+                } else {
+                    this.$message.error('请求失败')
+                }
+            })
+        }
+    },
+    watch: {
+        options: {
+            deep: true,
+            handler(val) {
+                this.value = ''
+            }
+        }
+    }
+}
+</script>
+
+<style scoped lang='less'>
+.add-box {
+    height: 100px;
+}
+</style>

+ 44 - 10
src/views/data_admin/buildAssets/index.vue

@@ -15,16 +15,16 @@
         </div>
         <el-tabs v-model='activeName' @tab-click='handleClick'>
             <el-tab-pane label='现场无法找到的资产' name='first'>
-                <saga-nofind :buildVlaue='buildVlaue'></saga-nofind>
+                <saga-nofind :buildVlaue='buildVlaue' :floorsObj='floorsObj'></saga-nofind>
             </el-tab-pane>
             <el-tab-pane label='未画入模型的资产' name='second'>
-                <saga-nopaint :buildVlaue='buildVlaue'></saga-nopaint>
+                <saga-nopaint :buildVlaue='buildVlaue' :floorsObj='floorsObj'></saga-nopaint>
             </el-tab-pane>
             <el-tab-pane label='无对应岗位的资产' name='third'>
-                <saga-nomap :buildVlaue='buildVlaue'></saga-nomap>
+                <saga-nomap :buildVlaue='buildVlaue' :floorsObj='floorsObj' :allFamilyObj='allFamilyObj'></saga-nomap>
             </el-tab-pane>
             <el-tab-pane label='未扫楼验证的资产' name='fourth'>
-                <saga-verify :buildVlaue='buildVlaue'></saga-verify>
+                <saga-verify :buildVlaue='buildVlaue' :floorsObj='floorsObj'></saga-verify>
             </el-tab-pane>
         </el-tabs>
     </div>
@@ -38,7 +38,9 @@ import SagaVerify from './Noverify'
 import { mapGetters } from 'vuex'
 //api
 import {
-    getBuildSelect //根据项目ID获得建筑列表
+    getBuildSelect, //根据项目ID获得建筑列表
+    getAllbusiness,
+    getAllFamily
 } from '@/api/scan/request'
 export default {
     name: 'build-assets',
@@ -46,11 +48,13 @@ export default {
         return {
             activeName: 'first',
             buildVlaue: '',
-            options: []
+            options: [],
+            floorsObj: {},
+            allFamilyObj: {}, 
         }
     },
     computed: {
-        ...mapGetters('peojMess', ['projectId', 'userId'])
+        ...mapGetters('peojMess', ['projectId', 'userId', 'secret'])
     },
     components: {
         SagaNofind,
@@ -68,15 +72,45 @@ export default {
             }
             getBuildSelect(param).then(res => {
                 if (res.data.Result == 'success') {
-                    console.log(res.data.BuildList)
                     let data = res.data.BuildList
                     this.options = data
                     this.buildVlaue = data.length ? data[0].BuildId : ''
                 }
             })
         },
-        init() {
-            this.getBuilding()
+        //获取所有楼层
+        getFloors() {
+            let param = {
+                ProjId: this.projectId,
+                secret: this.secret,
+                id: this.projectId,
+                type: ['Fl']
+            }
+            getAllbusiness(param).then(res => {
+                if (res.data.Result == 'success') {
+                    res.data.Content.forEach(item => {                        
+                        this.floorsObj[item.infos.FloorID] = item.infos.FloorLocalName
+                    })
+
+                }
+            })
+        },
+        //获取设备组
+        getAllFamily() {
+            getAllFamily().then(result => {
+                    if (result.data.Result == "success") {
+                        console.log(result.data.Content)
+                        let list = result.data.Content;
+                        list.forEach(ele => {
+                            this.allFamilyObj[ele.code] = ele
+                        })                        
+                    }
+                });
+        },
+        async init() {
+            await this.getAllFamily();
+            await this.getFloors();
+            await this.getBuilding()
         }
     },
     created() {

+ 5 - 1
src/views/data_admin/buildLog/index.vue

@@ -44,7 +44,7 @@
                 <el-table-column prop='UserId' label='对象id' header-align='center' align='center'></el-table-column>
                 <el-table-column label='操作说明' width='350' header-align='center'>
                     <template slot-scope='scope'>
-                        <div class='ellipsis' :title='scope.row.Note'>{{scope.row.Note}}</div>
+                        <div class='ellipsis btn' :title='scope.row.Note'>{{scope.row.Note}}</div>
                     </template>
                 </el-table-column>
             </el-table>
@@ -235,4 +235,8 @@ export default {
     text-overflow: ellipsis;
     white-space: nowrap;
 }
+.btn {
+    height: 28px;
+    line-height: 28px;
+}
 </style>

+ 1 - 1
src/views/data_admin/buildUser/index.vue

@@ -26,7 +26,7 @@
                 <el-table-column prop='UserName' label='姓名' width='100' header-align='center' align='center'></el-table-column>
                 <el-table-column prop='Phone' label='联系电话/登录名' width='120' header-align='center' align='center'></el-table-column>
                 <el-table-column prop='Note' label='备注' header-align='center'></el-table-column>
-                <el-table-column label='操作' width='150' header-align='center'>
+                <el-table-column label='操作' width='150' header-align='center' class="btn">
                     <template slot-scope='scope'>
                         <el-button type='primary' plain size='mini' @click='editUser(scope.row)'>编辑</el-button>
                         <el-button type='danger' plain size='mini' @click='del(scope.row)'>删除</el-button>