Forráskód Böngészése

更换接口,添加扫楼报告,解决模型列表不显示设备问题

shaun-sheep 4 éve
szülő
commit
bb48ead0a8

+ 41 - 0
src/api/scan/request.js

@@ -1869,6 +1869,42 @@ export function groupCreRelaZoneAndISp(param, success) {
   let url = `${baseUrl}/datacenter/si-in-sp-base/link-list?type=${param.type}`;
   http.postJson(url, param.data, success)
 }
+// <<<<<<< HEAD
+//扫楼作业-扫楼日志查看
+export function queryUserLog(param, success) {
+    let url = `${baseUrl}/scanbuilding-2/user-log/query`;
+    http.postJson(url, param, success)
+}
+
+//扫楼作业-信息点整理-查询点位标签
+export function queryLocationPoint(param, success) {
+    let url = `${baseUrl}/datacenter/location-point/query`;
+    http.postJson(url, param, success)
+}
+
+//扫楼作业-信息点整理-更新点位标签
+// export function updateLocationPoint(param, success) {
+//     let url = `${baseUrl}/datacenter/location-point/update`;
+//     http.postJson(url, param, success)
+// }
+
+//扫楼作业-位置标签-删除图片
+// export function deleteLocationImg(param, success) {
+//     let url = `${baseUrl}/datacenter/location-point/delete-image`;
+//     http.postJson(url, param, success)
+// }
+
+//扫楼作业-信息点整理-资产族及个数
+export function queryPropertyTypeCount(param, success) {
+    let url = `${baseUrl}/equip-component/property/property-family`;
+    http.getJson(url, param, success)
+}
+//扫楼作业-信息点整理-位置标签及对应资产数量
+export function queryPropertyPoint(param, success) {
+    let url = `${baseUrl}/equip-component/point/point-property`;
+    http.getJson(url, param, success)
+}
+// =======
 //关系-----业务空间所属建筑楼层修改
 export function updateRelateInSpAndBuild(param, success) {
   let url = `${baseUrl}/datacenter/update-relationship/update-sp`;
@@ -2047,3 +2083,8 @@ export function objectDeleteBuild(param, success) {
   http.postJson(url, param, success)
 }
 
+// 查询记录
+export function problemQuery(param, success) {
+let url = `${baseUrl}/datacenter/problems/query`
+  http.postJson(url, param, success)
+}

+ 1 - 1
src/components/data_admin/buildTask/detail/deviceDetail.vue

@@ -45,7 +45,7 @@
           <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
             <div class="img-item" @click="dialogVisible = true" v-for="item in panoramaList"
                  :key="item.Key">
-              4 <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`"
+              <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`"
                      style="width:100%;" :alt="item.Name">
             </div>
           </el-form-item>

+ 11 - 1
src/components/data_admin/buildTask/dialog/modelTaskDialog.vue

@@ -17,7 +17,17 @@
         </el-table-column>
         <el-table-column prop="FolderName" label="所属模型文件夹" width="110" show-overflow-tooltip></el-table-column>
         <el-table-column prop="FileName" label="模型文件名" width="80" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="EquipLocalName" label="设备本地名称" show-overflow-tooltip width="100"></el-table-column>
+        <el-table-column label="设备本地名称" show-overflow-tooltip width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.EquipLocalName}}
+              <el-badge v-if="scope.row.Component&&scope.row.Component.length?true:false"
+                        :value="scope.row.Component&&scope.row.Component.length?scope.row.Component.length:0"
+                        class="item" type="warning">
+              </el-badge>
+            </div>
+          </template>
+        </el-table-column>
         <el-table-column prop="EquipLocalID" label="设备本地编码" show-overflow-tooltip width="100"></el-table-column>
         <el-table-column prop="EquipCategory.EquipName" label="设备类" show-overflow-tooltip width="120"></el-table-column>
         <el-table-column prop="BIMID" label="BIM Id" show-overflow-tooltip width="80"></el-table-column>

+ 6 - 1
src/framework/layout/layout-store.js

@@ -25,6 +25,7 @@ export default {
       secret: "", //项目密码
       userId: "", //用户id
       rowEdit: false,//表格数据变化
+      errorReport:[],//扫楼错误报告
     },
     getters: {
       sidebarClosed: state => state.sidebarClosed,
@@ -65,6 +66,7 @@ export default {
     },
     mutations: {
       setRowEdit: (state, val) => (state.rowEdit = val),
+      setErrorReport:(state,val) => (state.errorReport = val),
       setSidebarClosed: (state, val) => (state.sidebarClosed = val),
       setSidebarSelected: (state, val) => {
         state.sidebarSelected = val
@@ -101,6 +103,9 @@ export default {
     setRowEdit(contentx, value) {
       contentx.commit('setRowEdit', value)
     },
+    setErrorReport(contentx,value) {
+      contentx.commit('setErrorReport',value)
+    },
     loadUserInfo({state}) {
       console.log(state)
       return new Promise((resolve, reject) => {
@@ -150,4 +155,4 @@ export default {
       }
     }
   }
-}
+}

+ 7 - 0
src/router/system.js

@@ -37,6 +37,7 @@ import addDeviceTask from '@/views/data_admin/buildTask/addTask/addDeviceTask'
 import addAssetsTask from '@/views/data_admin/buildTask/addTask/addAssetsTask'
 import addModelTask from '@/views/data_admin/buildTask/addTask/addModelTask'
 import buildAssets from '@/views/data_admin/buildAssets'
+import report from '@/views/data_admin/buildAssets/report'
 import buildLog from '@/views/data_admin/buildLog'
 import buildData from '@/views/data_admin/buildData/index-2.vue'
 import buildGraphy from '@/views/data_admin/buildGraphy'
@@ -314,6 +315,12 @@ export default [{
                 component: buildAssets,
                 meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' }, { label: '扫楼报告' }] }
             },
+          {
+                path: 'report',
+                name: 'report',
+                component: report,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' },{ label: '扫楼报告', path: '/floor/abnormalprop' }, { label: '报告', path: '/floor/report' }] }
+            },
             {
                 path: 'log',
                 name: 'buildLog',

+ 132 - 76
src/views/data_admin/buildAssets/index.vue

@@ -3,14 +3,21 @@
     <el-row style="padding:0 10px;margin-bottom:10px;">
       <div style="float:left;">
         <label>选择时间范围 : </label>
-        <el-date-picker v-model="value" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
+        <el-date-picker
+          v-model="value"
+          type="daterange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          @change="handleTime">
         </el-date-picker>
       </div>
       <div style="float:left;margin-left:10px;">
         <label>发现问题:</label>
-        <span>无</span>
+        <span>{{total}}</span>
       </div>
-      <el-button style="float:right;" :disabled="true">查看收集到的问题</el-button>
+      <el-button style="float:right;" :disabled="total?false:true" @click="handleIssue">查看收集到的问题</el-button>
     </el-row>
     <div style="background:#fff;display:flex;align-items:center;border: 1px solid #e4e4e4;justify-content:center;height:100%;">
       <div class="center">
@@ -45,88 +52,137 @@
                 <saga-verify :buildVlaue='buildVlaue' :floorsObj='floorsObj' :allEquipObj='allEquipObj'></saga-verify>
             </el-tab-pane>
         </el-tabs> -->
+
+    <!--    <assets-list :buildingData="options" :buildingId="buildValue" :active="activeName" ref="assetlist"></assets-list>-->
   </div>
 </template>
 
 <script>
-import SagaNofind from './Nofind'
-import SagaNopaint from './Nopaint'
-import SagaVerify from './Noverify'
-import { mapGetters } from 'vuex'
-//api
-import {
-  getBuildSelect, //根据项目ID获得建筑列表
-  getAllbusiness,
-  getAllFamily
-} from '@/api/scan/request'
-export default {
-  name: 'build-assets',
-  data() {
-    return {
-      activeName: 'first',
-      buildVlaue: '',
-      options: [],
-      floorsObj: {},
-      allFamilyObj: {},
-      allEquipObj: {},
-      value: '',//
-    }
-  },
-  computed: {
-    ...mapGetters('layout', ['projectId', 'userId', 'secret'])
-  },
-  components: {
-    SagaNofind,
-    SagaNopaint,
-    SagaVerify
-  },
-  methods: {
-    handleClick() { },
-    //获取建筑列表
-    getBuilding() {
-      let param = {
-        ProjId: this.projectId,
-        UserId: this.userId
+  import SagaNofind from './Nofind'
+  import SagaNopaint from './Nopaint'
+  import SagaVerify from './Noverify'
+  // import assetsList from './assetsList'
+  import {mapActions, mapGetters, mapState} from 'vuex'
+  //api
+  import {buildingQuery, getAllbusiness, getEquipBelongs, problemQuery} from '@/api/scan/request'
+
+  export default {
+    name: 'build-assets',
+    data() {
+      return {
+        activeName: 'first',
+        buildVlaue: '',
+        options: [],
+        floorsObj: {},
+        allFamilyObj: {},
+        allEquipObj: {},
+        value: '',//
+        tabList: [
+          {label: '现场无法找到的资产', name: "first"},
+          {label: '未画入模型的资产', name: "second"},
+          {label: '无对应岗位的资产', name: "third"},
+          {label: '未扫楼验证的资产', name: "fourth"}
+        ],
+        total: 0,
       }
-      getBuildSelect(param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = res.data.BuildList
-          this.options = data
-          this.buildVlaue = data.length ? data[0].BuildId : ''
-        }
-      })
     },
-    //获取所有楼层
-    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
-          })
+    computed: {
+      ...mapGetters('layout', ['projectId', 'userId', 'secret']),
+      ...mapState('layout', ['errorReport'])
 
-        }
-      })
     },
-    //获取设备组
-    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
-          })
-          this.allEquipObj = {}
-          this.getEquip(list)
-        }
-      });
+    components: {
+      SagaNofind,
+      SagaNopaint,
+      SagaVerify,
     },
+    methods: {
+      ...mapActions('layout', ['setErrorReport']),
+      handleTime(val) {
+        console.log(val)
+        let param = {
+          Filters: `createTime > '${val[0]}';createTime < '${val[1]}'`,
+          PageNumber: 1,
+          PageSize: 50
+        }
+        problemQuery(param, res => {
+          this.total = res.Total
+          debugger
+          this.setErrorReport(res.Content)
+        })
+
+      },
+
+      handleIssue() {
+        this.$router.push({
+          path: 'report'
+        })
+      },
+      //获取建筑列表
+      getBuilding() {
+        buildingQuery({}, res => {
+          this.options = res.Content
+          this.buildValue = res.Content ? res.Content[0].BuildID : ''
+        })
+        // let param = {
+        //   ProjId: this.projectId,
+        //   UserId: this.userId
+        // }
+        // getBuildSelect(param).then(res => {
+        //   if (res.data.Result == 'success') {
+        //     let data = res.data.BuildList
+        //     this.options = data
+        //     this.buildVlaue = data.length ? data[0].BuildId : ''
+        //   }
+        // })
+      },
+      //获取所有楼层
+      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
+        //     })
+        //     this.allEquipObj = {}
+        //     this.getEquip(list)
+        //   }
+        // });
+        let pa = {
+          data: {
+            Orders: 'Family asc',
+            Distinct: true,
+            PageSize: 500,
+            Projection: ["Family", "FamilyName"]
+          }
+        }
+        getEquipBelongs(pa, res => {
+          this.AllFamily = res.Content.map(t => {
+            return {
+              Code: t.Family,
+              Name: t.FamilyName
+            }
+          })
+        })
+      },
     getEquip(list) {
       list.forEach(ele => {
         if (ele.content) {

+ 62 - 0
src/views/data_admin/buildAssets/report.vue

@@ -0,0 +1,62 @@
+<template>
+  <div class="saga-report">
+    <section class="saga-report-section">
+      <el-row :gutter="20"  v-for="(item,index) in errorReport" >
+          <el-col :span="12">
+            <h3>{{index +1}},{{item.Name}}</h3>
+            <div class="problem-description">{{item.Note}}</div>
+            <h5>问题创建人:{{item.Author}}</h5>
+          </el-col>
+          <el-col :span="12" v-if="item.Pic" v-for="pic in item.Pic">
+            <h4>现场照片</h4>
+            <el-image
+              :src="`/image-service/common/image_get?systemId=dataPlatform&key=${pic.Key}`"
+              style="width:100%;height: 300px" :alt="item.Name"
+              :fit="fill"></el-image>
+          </el-col>
+      </el-row>
+    </section>
+  </div>
+</template>
+
+<script>
+  import {mapState} from "vuex";
+
+  export default {
+    name: "report",
+    data() {
+      return {
+        fill:'cover'
+      }
+    },
+    computed: {
+      ...mapState('layout', ['errorReport'])
+
+    },
+    created() {
+      console.log(this.errorReport)
+    }
+
+  }
+</script>
+
+<style scoped lang="less">
+  .saga-report {
+    width: 1000px;
+    height: 710px;
+    background: #fff;
+    margin: 0 auto;
+    overflow-y: auto;
+
+    .saga-report-section {
+      padding: 20px;
+
+      .problem-description {
+        width: 400px;
+        height: 250px;
+        background: #eeeeee;
+        border-radius: 5px;
+      }
+    }
+  }
+</style>