Bläddra i källkod

adm:feat > 扫楼部分接口替换

shaun-sheep 4 år sedan
förälder
incheckning
31bb8f0d05
3 ändrade filer med 83 tillägg och 81 borttagningar
  1. 19 18
      src/api/scan/request.js
  2. 5 5
      src/views/data_admin/buildAssets/index.vue
  3. 59 58
      src/views/model/report/index.vue

+ 19 - 18
src/api/scan/request.js

@@ -4,27 +4,27 @@ import {
   api1,
   baseUrl,
   business,
-  physics,
-  venders,
-  zone,
-  object,
-  dictCustom,
-  system,
-  shContainSp,
-  compSpace,
-  shaft,
+  classDef,
   compEquipQuery,
-  statistics,
-  floor,
+  component,
+  compSpace,
+  dataCenter,
   dict,
-  locationPoint,
+  floor,
   graphicUrl,
-  tenant,
-  dataCenter,
-  classDef,
+  locationPoint,
+  object,
+  physics,
   rel,
-  component,
-  rwd
+  rwd,
+  scan,
+  shaft,
+  shContainSp,
+  statistics,
+  system,
+  tenant,
+  venders,
+  zone
 } from './config.js'
 import http from './httpUtil'
 import storage from '@/framework/utils/storage'
@@ -2377,6 +2377,7 @@ export function objectDeleteBuild(param, success) {
 
 // 查询记录
 export function problemQuery(param, success) {
-  let url = `${baseUrl}${dataCenter}/problems/query`
+  // let url = `${baseUrl}${dataCenter}/problems/query`
+  let url = `${baseUrl}${scan}/task/problems/query`
   http.postJson(url, param, success)
 }

+ 5 - 5
src/views/data_admin/buildAssets/index.vue

@@ -108,13 +108,13 @@ export default {
     handleTime(val) {
       console.log(val)
       let param = {
-        Filters: `createTime > '${val[0]}';createTime < '${val[1]}'`,
-        PageNumber: 1,
-        PageSize: 50
+        filters: `createTime > '${val[0]}';createTime < '${val[1]}'`,
+        pageNumber: 1,
+        pageSize: 50
       }
       problemQuery(param, res => {
-        this.total = res.Total
-        this.setErrorReport(res.Content)
+        this.total = res.total
+        this.setErrorReport(res.content)
       })
 
     },

+ 59 - 58
src/views/model/report/index.vue

@@ -170,53 +170,54 @@
 </template>
 
 <script>
-  import {mapGetters} from "vuex";
-  import dasBoard from "@/views/dasboard/index";
-  import {queryFloorList, queryLostReportList, queryModel, queryReportList} from "@/api/model/report.js";
-  import {getSupplement, getToBeDelEquip} from "@/api/scan/request.js";
-  import axios from 'axios'
+import { mapGetters } from "vuex";
+import dasBoard from "@/views/dasboard/index";
+import { queryFloorList, queryLostReportList, queryModel, queryReportList } from "@/api/model/report.js";
+import { getSupplement, getToBeDelEquip } from "@/api/scan/request.js";
+import axios from 'axios'
 
-  export default {
-    components: {
-      dasBoard
-    },
-    data() {
-      return {
-        params: null,
-        ModelFileCount: null,// 模型文件夹数量
-        modelFloorCount: null,// 包含楼层模型文件数量
-        problemCount: 0,// 检查出问题的楼层模型文件数量
-        tableList: [], // tab数据
-        tableData: [],// 列表数据
-        activeTab: '', // tab当前选中项
-        headerStyle: { // 列表样式
-          backgroundColor: '#e1e4e5',
-          color: '#2b2b2b',
-          lineHeight: '30px'
-        },
-        page: {
-          pageSize: 50,
-          pageSizes: [10, 20, 50, 100],
-          pageNumber: 1,
-          total: 0
-        },
-        loading: false,
-        load: false,
-        floorIconType: null,
-        toBeSuppCount: 0,
-        toBeDelCount: 0
-      }
-    },
-    mounted() { },
-    created() {
-      this.params = {
-        Orders: "Name asc"
-      }
-      this.getModelFileCount();
-      this.getModelFloorCount();
-    },
-    computed: {
-      ...mapGetters('layout', ['projectId'])
+export default {
+  components: {
+    dasBoard
+  },
+  data() {
+    return {
+      params: null,
+      ModelFileCount: null,// 模型文件夹数量
+      modelFloorCount: null,// 包含楼层模型文件数量
+      problemCount: 0,// 检查出问题的楼层模型文件数量
+      tableList: [], // tab数据
+      tableData: [],// 列表数据
+      activeTab: '', // tab当前选中项
+      headerStyle: { // 列表样式
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      },
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      loading: false,
+      load: false,
+      floorIconType: null,
+      toBeSuppCount: 0,
+      toBeDelCount: 0
+    }
+  },
+  mounted() {
+  },
+  created() {
+    this.params = {
+      Orders: "Name asc"
+    }
+    this.getModelFileCount();
+    this.getModelFloorCount();
+  },
+  computed: {
+    ...mapGetters('layout', ['projectId'])
     },
     methods: {
       cellStyle({row, column, rowIndex, columnIndex}) {
@@ -317,7 +318,7 @@
         this.LostFloorName.forEach(item => {
           if (item.CurrentModelId) {
             equipComDelList.push({
-              ModelId: item.CurrentModelId
+              modelId: item.CurrentModelId
             });
             this.equipComDelList.push(item.CurrentModelId)
           } else {
@@ -326,15 +327,15 @@
           }
           if (item.Id) {
             toBeAdded.push({
-              ModelId: item.Id
+              modelId: item.Id
             })
           }
         })
         let params = {
-          ProjectId: this.projectId,
+          projectId: this.projectId,
           data: equipComDelList
         }, paramsToBe = {
-          ProjectId: this.projectId,
+          projectId: this.projectId,
           data: toBeAdded
         }
         let promise1 = new Promise(resolve => {
@@ -352,23 +353,23 @@
           let res1 = response[1];
           this.toBeDelCount = 0;
           this.toBeSuppCount = 0;
-          res.Content.forEach(item => {
-            if (item.Count > 0) {
+          res.content.forEach(item => {
+            if (item.count > 0) {
               this.toBeDelCount += 1;
             }
             this.LostFloorName.forEach(it => {
-              if (item.ModelId === it.CurrentModelId) {
-                it.toBeDel = item.Count;
+              if (item.modelId === it.CurrentModelId) {
+                it.toBeDel = item.count;
               }
             })
           })
-          res1.Content.forEach(item => {
-            if (item.Count > 0) {
+          res1.content.forEach(item => {
+            if (item.count > 0) {
               this.toBeSuppCount += 1;
             }
             this.LostFloorName.forEach(it => {
-              if (item.ModelId === it.Id) {
-                it.toBeSupplement = item.Count;
+              if (item.modelId === it.Id) {
+                it.toBeSupplement = item.count;
               }
             })
           })