فهرست منبع

Merge branch 'master' into apiupdate

haojianlong 5 سال پیش
والد
کامیت
b984decc2e
36فایلهای تغییر یافته به همراه241 افزوده شده و 103 حذف شده
  1. 2 1
      build/webpack.dev.conf.js
  2. 2 1
      build/webpack.prod.conf.js
  3. 1 0
      config/dev.env.js
  4. 1 0
      config/prod.env.js
  5. 4 2
      src/api/scan/httpUtil.js
  6. 5 1
      src/components/business_space/dialogs/addDialog/businessDialog.vue
  7. 4 1
      src/components/business_space/dialogs/list/guaranteeDialog.vue
  8. 5 2
      src/components/business_space/dialogs/list/insurerDialog.vue
  9. 5 2
      src/components/business_space/dialogs/list/maintainerDialog.vue
  10. 5 1
      src/components/business_space/dialogs/list/paramDetails.vue
  11. 5 2
      src/components/business_space/dialogs/list/supplierDialog.vue
  12. 7 3
      src/components/business_space/dialogs/list/supplyDialog.vue
  13. 10 6
      src/components/business_space/dialogs/list/systemType.vue
  14. 6 2
      src/components/business_space/lib/floorCascader.vue
  15. 6 2
      src/components/data_admin/buildFamily.vue
  16. 5 1
      src/components/dialogHanson/addDevice.vue
  17. 5 1
      src/components/dialogs/addDialog/businessDialog.vue
  18. 3 6
      src/components/dialogs/addDialog/dialogAssets.vue
  19. 3 3
      src/components/dialogs/addDialog/dialogSystem.vue
  20. 8 4
      src/components/dialogs/detailsDialog.vue
  21. 6 2
      src/components/dialogs/facilityDialog.vue
  22. 8 4
      src/components/dialogs/influenceDialog.vue
  23. 1 1
      src/components/dialogs/list/guaranteeDialog.vue
  24. 5 2
      src/components/dialogs/list/insurerDialog.vue
  25. 5 2
      src/components/dialogs/list/maintainerDialog.vue
  26. 5 1
      src/components/dialogs/list/paramDetails.vue
  27. 5 2
      src/components/dialogs/list/supplierDialog.vue
  28. 2 2
      src/components/dialogs/list/systemType.vue
  29. 6 3
      src/components/ledger/addDialog/dialogDevice.vue
  30. 1 1
      src/components/ledger/handsontables/device.vue
  31. 46 36
      src/components/ledger/handsontables/system.vue
  32. 1 1
      src/data/mapTable.js
  33. 1 0
      src/framework/layout/layout-store.js
  34. 19 3
      src/views/ledger/property/addpropertys.vue
  35. 38 2
      src/views/ledger/report/index.vue
  36. BIN
      static/favicon.ico

+ 2 - 1
build/webpack.dev.conf.js

@@ -51,7 +51,8 @@ const devWebpackConfig = merge(baseWebpackConfig, {
         new HtmlWebpackPlugin({
             filename: 'index.html',
             template: 'index.html',
-            inject: true
+            inject: true,
+            favicon: path.resolve(__dirname, '../static/favicon.ico')
         }),
         // copy custom static assets
         new CopyWebpackPlugin([

+ 2 - 1
build/webpack.prod.conf.js

@@ -72,7 +72,8 @@ const webpackConfig = merge(baseWebpackConfig, {
                 // https://github.com/kangax/html-minifier#options-quick-reference
             },
             // necessary to consistently work with multiple chunks via CommonsChunkPlugin
-            chunksSortMode: 'dependency'
+            chunksSortMode: 'dependency',
+            favicon: path.resolve(__dirname, '../static/favicon.ico')
         }),
         // keep module.id stable when vendor modules does not change
         new webpack.HashedModuleIdsPlugin(),

+ 1 - 0
config/dev.env.js

@@ -6,6 +6,7 @@ module.exports = merge(prodEnv, {
     NODE_ENV: '"development"',
     BASE_URL: '"http://192.168.20.215"', //测试iframe地址
     SSO_SERVER: '"http://192.168.20.101:8004"' //测试环境
+    // SSO_SERVER: '"http://192.168.20.102:8080"' //(新)测试环境
     // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
     // BASE_URL: '"http://mbi.sagacloud.cn"' //线上iframe地址
 })

+ 1 - 0
config/prod.env.js

@@ -3,6 +3,7 @@ module.exports = {
     NODE_ENV: '"production"',
     // BASE_URL: '"http://192.168.20.215"', //测试iframe地址
     // SSO_SERVER: '"http://192.168.20.101:8004"' //测试环境
+    // SSO_SERVER: '"http://192.168.20.102:8080"' //(新)测试环境
     BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
     SSO_SERVER: '"http://sso.sagacloud.cn"'  //正式环境
 }

+ 4 - 2
src/api/scan/httpUtil.js

@@ -34,8 +34,9 @@ function errorResponse(vm, response, err) {
 export default {
     getJson: function(url, data, success, failed, err) {
         let ProjectId = storage.get("global_project_selected")
+        let userName = storage.get("user_name")
         let vm = this;
-        fetch({ url: url, method: 'get', params: data, headers: {'ProjectId': ProjectId}}).then((response) => {
+        fetch({ url: url, method: 'get', params: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName}}).then((response) => {
             successResponse(vm, response, success, failed)
         }).catch(error => {
             errorResponse(vm, error, err);
@@ -43,8 +44,9 @@ export default {
     },
     postJson: function(url, data, success, failed, err) {
         let ProjectId = storage.get("global_project_selected")
+        let userName = storage.get("user_name")
         let vm = this;
-        fetch({ url: url, method: 'post', data: data, headers: {'ProjectId': ProjectId} }).then((response) => {
+        fetch({ url: url, method: 'post', data: data, headers: {'ProjectId': ProjectId, 'Comming': 'adm' ,'Account': userName} }).then((response) => {
             successResponse(vm, response, success, failed)
         }).catch(error => {
             errorResponse(vm, error, err);

+ 5 - 1
src/components/business_space/dialogs/addDialog/businessDialog.vue

@@ -68,6 +68,7 @@
 import myCascader from "@/components/business_space/lib/cascaders/assets";
 // import hansonTable from "@/components/business_space/dialogHanson/addDevice";
 import { getSpaceHeader } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
 import tools from "@/utils/tools";
 import qrcode from "@/components/business_space/lib/qrcode";
 import firm from "@/components/business_space/dialogs/list/firm";
@@ -118,6 +119,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       width: "30%",
@@ -216,7 +220,7 @@ export default {
       this.main = table(10)
       getSpaceHeader({
         code: "space",
-        ProjId: this.$route.query.projId
+        ProjId: this.projectId
       }).then(res => {
         this.headers = res.data.Content;
         if (!!this.hot) {

+ 4 - 1
src/components/business_space/dialogs/list/guaranteeDialog.vue

@@ -84,6 +84,9 @@ export default {
       default: 0
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       search: "", //搜索文案
@@ -130,7 +133,7 @@ export default {
         data: {
           venderId: this.id,
           insuranceNo: this.formData.name,
-          projectId: this.$route.query.projId,
+          projectId: this.projectId,
           contractFile: this.keysArr[0]
         }
       }

+ 5 - 2
src/components/business_space/dialogs/list/insurerDialog.vue

@@ -52,6 +52,7 @@
 </template>
 <script>
 import myPagination from "@/components/common/myPagination";
+import { mapGetters } from "vuex";
 import { getLib } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 
@@ -69,6 +70,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       search: "", //搜索文案
@@ -79,8 +83,7 @@ export default {
         sizes: [10, 30, 50, 100, 150, 200],
         total: 0,
         currentPage: 1
-      },
-      projectId: this.$route.query.projId,
+      }
     };
   },
   created() {

+ 5 - 2
src/components/business_space/dialogs/list/maintainerDialog.vue

@@ -51,6 +51,7 @@
 </template>
 <script>
 import myPagination from "@/components/ledger/lib/myPagination";
+import { mapGetters } from "vuex";
 import { getLib } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 
@@ -68,6 +69,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       search: "", //搜索文案
@@ -78,8 +82,7 @@ export default {
         sizes: [10, 30, 50, 100, 150, 200],
         total: 0,
         currentPage: 1
-      },
-      projectId: this.$route.query.projId,
+      }
     };
   },
   created() {

+ 5 - 1
src/components/business_space/dialogs/list/paramDetails.vue

@@ -13,6 +13,7 @@
 <script>
 
 import { getSpaceHeader } from "@/api/scan/request"
+import { mapGetters, mapActions } from "vuex"
 
 export default {
   props: {
@@ -32,6 +33,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       labelArr: []
@@ -42,7 +46,7 @@ export default {
   methods: {
     getData() {
       let param = {
-        ProjId: this.$route.query.projId,
+        ProjId: this.projectId,
         code: this.data.eqFamily
       }
       getSpaceHeader(param).then(res => {

+ 5 - 2
src/components/business_space/dialogs/list/supplierDialog.vue

@@ -51,6 +51,7 @@
 </template>
 <script>
 import myPagination from "@/components/common/myPagination";
+import { mapGetters, mapActions } from "vuex";
 import { getLib } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 
@@ -68,6 +69,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       search: "", //搜索文案
@@ -78,8 +82,7 @@ export default {
         sizes: [10, 30, 50, 100, 150, 200],
         total: 0,
         currentPage: 1
-      },
-      projectId: this.$route.query.projId,
+      }
     };
   },
   created() {

+ 7 - 3
src/components/business_space/dialogs/list/supplyDialog.vue

@@ -49,6 +49,7 @@
 </template>
 <script>
 import myPagination from "@/components/common/myPagination";
+import { mapGetters, mapActions } from "vuex";
 import { getListForSupplier } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 
@@ -70,6 +71,9 @@ export default {
       default: 0
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       search: "", //搜索文案
@@ -126,11 +130,11 @@ export default {
       if (!!this.id) {
         let param = {
           data: {
-            projectId: this.$route.query.projId,
+            projectId: this.projectId,
             venderId: this.id
           },
-          ProjId: this.$route.query.projId,
-          secret: this.$route.query.secret,
+          ProjId: this.projectId,
+          secret: this.secret,
         }
         getListForSupplier(param, res => {
           _this.$refs.ruleForm.resetFields()

+ 10 - 6
src/components/business_space/dialogs/list/systemType.vue

@@ -79,6 +79,7 @@
 </template>
 <script>
 import myPagination from "@/components/common/myPagination";
+import { mapGetters, mapActions } from "vuex";
 import { getLib, getAllbusiness, getEqCode, getRelation } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 
@@ -112,6 +113,9 @@ export default {
       type: [Array]
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       search: "", //搜索文案
@@ -202,8 +206,8 @@ export default {
 
     getData() {
       let param = param = {
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret,
+        ProjId: this.projectId,
+        secret: this.secret,
         data: {
           criteria: {
             type: ["Sy"]
@@ -232,8 +236,8 @@ export default {
     //查询id对应系统
     getRelation(table) {
       getRelation({
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret,
+        ProjId: this.projectId,
+        secret: this.secret,
         criterias: {
           criteria: {
             "to_id": this.infos,
@@ -277,9 +281,9 @@ export default {
       this.iframeSrc =
         process.env.BASE_URL +
         ":8889/#/details?perjectId=" +
-        this.$route.query.projId +
+        this.projectId +
         "&secret=" +
-        this.$route.query.secret +
+        this.secret +
         "&FmId=" +
         infos.id +
         "&type=1&code=" +

+ 6 - 2
src/components/business_space/lib/floorCascader.vue

@@ -15,6 +15,7 @@
 <script>
 
 import { getSpaceFloor } from '@/api/request'
+import { mapGetters, mapActions } from "vuex";
 
 export default {
   props: {
@@ -27,13 +28,16 @@ export default {
       default: "yes"
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       options: [
       ],
       param: {
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret
+        ProjId: this.projectId,
+        secret: this.secret
       },
       value: ['all']
     };

+ 6 - 2
src/components/data_admin/buildFamily.vue

@@ -76,6 +76,7 @@
 
 <script>
 import buildInput from "@/components/input";
+import { mapGetters, mapActions } from "vuex";
 import {
   getAllFamily, //获取所有设备族
   getTableHeader, //点击时后去右侧的数据
@@ -88,6 +89,9 @@ export default {
   components: {
     "build-input": buildInput
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       value: "property",
@@ -112,8 +116,8 @@ export default {
       ajaxMsg: "",
       code: '',
       letterArr: [], //出现的a-z字符
-      UserId: this.$route.query.userId, //用户id
-      ProjId: this.$route.query.projId, //项目id
+      UserId: this.userId, //用户id
+      ProjId: this.projectId, //项目id
       labelKey: [], // 右侧主体数据承接数组
       searchArr: [], // 搜索后的数据
       searchVal: "", //搜索内容

+ 5 - 1
src/components/dialogHanson/addDevice.vue

@@ -16,6 +16,7 @@
 </template>
 <script>
 import { getSpaceHeader } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
 import tools from "@/utils/scan/tools";
 import qrcode from "@/components/ledger/lib/qrcode";
 import firm from "@/components/dialogs/list/firm";
@@ -38,6 +39,9 @@ export default {
     guaranteeDialog,
     uploadFilesDialog,
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     let table = function (num) {
       let main = []
@@ -85,7 +89,7 @@ export default {
     getData() {
       getSpaceHeader({
         code: this.deviceType.code,
-        ProjId: this.$route.query.projId
+        ProjId: this.projectId
       }).then(res => {
         this.headers = res.data.Content;
         if (!!this.hot) {

+ 5 - 1
src/components/dialogs/addDialog/businessDialog.vue

@@ -68,6 +68,7 @@
 import myCascader from "@/components/lib/cascaders/assets";
 import hansonTable from "@/components/dialogHanson/addDevice";
 import { getSpaceHeader } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
 import tools from "@/utils/scan/tools";
 import qrcode from "@/components/ledger/lib/qrcode";
 import firm from "@/components/dialogs/list/firm";
@@ -118,6 +119,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       width: "30%",
@@ -216,7 +220,7 @@ export default {
       this.main = table(10)
       getSpaceHeader({
         code: "space",
-        ProjId: this.$route.query.projId
+        ProjId: this.projectId
       }).then(res => {
         this.headers = res.data.Content;
         if (!!this.hot) {

+ 3 - 6
src/components/dialogs/addDialog/dialogAssets.vue

@@ -97,10 +97,7 @@ import text from "@/utils/handsontable/mainText"
 import showTools from "@/utils/handsontable/notShow"
 
 import uuid from "@/utils/uuid";
-import {
-    mapGetters,
-    mapActions
-} from "vuex";
+import { mapGetters, mapActions } from "vuex";
 import { getTableHeader, createProperty, getSpaceFloor, createAssetsList } from "@/api/scan/request";
 let table = function (num) {
   let main = []
@@ -303,7 +300,7 @@ export default {
       this.main = table(1)
       getTableHeader({
         code: this.deviceType.code,
-        ProjId: this.$route.query.projId
+        ProjId: this.projectId
       }).then(res => {
         this.headers = res.data.Content;
         if (!!this.hot) {
@@ -367,7 +364,7 @@ export default {
           one.FamilyName = this.deviceType.facility
           one.Infos = item.infos
           one.FmId = "Pe" + uuid(32, 16)
-          one.ProjId = this.$route.query.projId
+          one.ProjId = this.projectId
           one.FmName = item.infos.EquipLocalName || ""
           one.X = 0
           one.Y = 0

+ 3 - 3
src/components/dialogs/addDialog/dialogSystem.vue

@@ -266,7 +266,7 @@ export default {
       this.main = table(1)
       getTableHeader({
         code: this.deviceType.code,
-        ProjId: this.$route.query.projId
+        ProjId: this.projectId
       }).then(res => {
         this.headers = res.data.Content;
         if (!!this.hot) {
@@ -328,8 +328,8 @@ export default {
     async createJson(data) {
       let param = {
         data: { criterias: data },
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret
+        ProjId: this.projectId,
+        secret: this.secret
       }
       console.log(param)
       this.createPost(param)

+ 8 - 4
src/components/dialogs/detailsDialog.vue

@@ -54,6 +54,7 @@ Vue.use(DropdownMenu)
 Vue.use(DropdownItem)
 
 import { delManySpace } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
 import equipTable from "@/components/table/equipTable";
 import addEquip from "@/components/table/addEquip";
 
@@ -88,6 +89,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       step: 1,
@@ -110,8 +114,8 @@ export default {
       this.$nextTick(() => {
         this.$refs.myEquip.getData(list, this.activeTabType);
       });
-      let perjectId = this.$route.query.projId,
-        secret = this.$route.query.secret;
+      let perjectId = this.projectId,
+        secret = this.secret;
       this.iframeSrc =
         process.env.BASE_URL +
         ":8889/#/details?perjectId=" +
@@ -150,8 +154,8 @@ export default {
       })
         .then(() => {
           let param = {
-            ProjId: this.$route.query.projId,
-            secret: this.$route.query.secret,
+            ProjId: this.projectId,
+            secret: this.secret,
             data: {
               criteria: {
                 ids: [this.list.id]

+ 6 - 2
src/components/dialogs/facilityDialog.vue

@@ -40,6 +40,7 @@ Vue.use(DropdownMenu)
 Vue.use(DropdownItem)
 import equipTable from "@/components/table/equipTable";
 import addEquip from "@/components/table/addEquip";
+import { mapGetters, mapActions } from "vuex";
 
 export default {
   components: {
@@ -72,6 +73,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       step: 1,
@@ -80,8 +84,8 @@ export default {
       activeName: "1",
       myDia: {
         id: 'Sp11010800034c251365d66111e8bf0a15b159c8e729',
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret
+        ProjId: this.projectId,
+        secret: this.secret
       },
       buildMess: {},
     };

+ 8 - 4
src/components/dialogs/influenceDialog.vue

@@ -23,6 +23,7 @@
 </template>
 <script>
 import { getAllMess, deleteNotice } from "@/api/scan/request";
+import { mapGetters, mapActions } from "vuex";
 export default {
   props: {
     width: {
@@ -44,6 +45,9 @@ export default {
       default: []
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       data: null,
@@ -70,8 +74,8 @@ export default {
         data: {
           ids: ids
         },
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret
+        ProjId: this.projectId,
+        secret: this.secret
       };
       deleteNotice(param)
         .then(res => {
@@ -91,8 +95,8 @@ export default {
     },
     getAllMess() {
       getAllMess({
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret
+        ProjId: this.projectId,
+        secret: this.secret
       })
         .then(res => {
           if (res.data.Result == "success") {

+ 1 - 1
src/components/dialogs/list/guaranteeDialog.vue

@@ -133,7 +133,7 @@ export default {
         data: {
           venderId: this.id,
           insuranceNo: this.formData.name,
-          projectId: this.$route.query.projId,
+          projectId: this.projectId,
           contractFile: this.keysArr[0]
         }
       }

+ 5 - 2
src/components/dialogs/list/insurerDialog.vue

@@ -52,6 +52,7 @@
 <script>
 import myPagination from "@/components/ledger/lib/myPagination";
 import { getLib } from "@/api/scan/request"
+import { mapGetters, mapActions } from "vuex";
 import tools from "@/utils/scan/tools"
 
 export default {
@@ -68,6 +69,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       search: "", //搜索文案
@@ -78,8 +82,7 @@ export default {
         sizes: [10, 30, 50, 100, 150, 200],
         total: 0,
         currentPage: 1
-      },
-      projectId: this.$route.query.projId,
+      }
     };
   },
   created() {

+ 5 - 2
src/components/dialogs/list/maintainerDialog.vue

@@ -51,6 +51,7 @@
 </template>
 <script>
 import myPagination from "@/components/ledger/lib/myPagination";
+import { mapGetters, mapActions } from "vuex";
 import { getLib } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 
@@ -68,6 +69,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       search: "", //搜索文案
@@ -78,8 +82,7 @@ export default {
         sizes: [10, 30, 50, 100, 150, 200],
         total: 0,
         currentPage: 1
-      },
-      projectId: this.$route.query.projId,
+      }
     };
   },
   created() {

+ 5 - 1
src/components/dialogs/list/paramDetails.vue

@@ -13,6 +13,7 @@
 <script>
 
 import { getSpaceHeader } from "@/api/scan/request"
+import { mapGetters, mapActions } from "vuex";
 
 export default {
   props: {
@@ -32,6 +33,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       labelArr: []
@@ -42,7 +46,7 @@ export default {
   methods: {
     getData() {
       let param = {
-        ProjId: this.$route.query.projId,
+        ProjId: this.projectId,
         code: this.data.eqFamily
       }
       getSpaceHeader(param).then(res => {

+ 5 - 2
src/components/dialogs/list/supplierDialog.vue

@@ -51,6 +51,7 @@
 </template>
 <script>
 import myPagination from "@/components/ledger/lib/myPagination";
+import { mapGetters } from "vuex";
 import { getLib } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
 
@@ -78,10 +79,12 @@ export default {
         sizes: [10, 30, 50, 100, 150, 200],
         total: 0,
         currentPage: 1
-      },
-      projectId: this.$route.query.projId,
+      }
     };
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   created() {
     // this.getData()
   },

+ 2 - 2
src/components/dialogs/list/systemType.vue

@@ -175,9 +175,9 @@ export default {
       this.iframeSrc =
         process.env.BASE_URL +
         ":8889/#/details?perjectId=" +
-        this.$route.query.projId +
+        this.projectId +
         "&secret=" +
-        this.$route.query.secret +
+        this.secret +
         "&FmId=" +
         infos.id +
         "&type=1&code=" +

+ 6 - 3
src/components/ledger/addDialog/dialogDevice.vue

@@ -158,6 +158,9 @@ export default {
       }
     }
   },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"]),
+  },
   data() {
     return {
       width: "30%",
@@ -351,7 +354,7 @@ export default {
       this.main = table(1)
       getTableHeader({
         code: this.deviceType.code,
-        ProjId: this.$route.query.projId
+        ProjId: this.projectId
       }).then(res => {
         this.headers = res.data.Content;
         if (!!this.hot) {
@@ -448,8 +451,8 @@ export default {
       console.log(param, data)
       let pushParam = {
         data: { criterias: [] },
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret
+        ProjId: this.projectId,
+        secret: this.secret
       }
       let list = []
       data.map((item, index) => {

+ 1 - 1
src/components/ledger/handsontables/device.vue

@@ -13,7 +13,7 @@
       <el-select v-model="showType" @change="initTable" style="width:100px;margin-right:10px;vertical-align:bottom;">
         <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
       </el-select>
-      <el-button size="small" style='width: 80px;' @click="download" icon="iconfont icon-xiazai">下载</el-button>
+      <!-- <el-button size="small" style='width: 80px;' @click="download" icon="iconfont icon-xiazai">下载</el-button> -->
       <el-button size="small" style='width: 80px;' @click="addDevice" icon="iconfont icon-tianjia">添加设备</el-button>
       <el-button size="small" style='width: 80px;' @click="reset" icon="iconfont icon-shuaxin">刷新</el-button>
       <el-button size="small" style='width: 80px;' v-show="!onlyRead" @click="undo" icon="iconfont icon-undo">撤销</el-button>

+ 46 - 36
src/components/ledger/handsontables/system.vue

@@ -281,47 +281,57 @@ export default {
           criterias: []
         }
       }
-      if (!!data && data.length) {
-        //一级遍历list
-        data.map(item => {
-          if (!!item.infos) {
-            //二级遍历对象infos
-            for (let key in item.infos) {
-              //判断是否是设定参数和动态参数
-              if (!!item.infos[key]) {
-                this.tableHeader.map(child => {
-                  //如果一级标签为动态参数或者设定参数放入数据等待请求
-                  if (key == child.InfoPointCode && (child.InputMode == "L" || child.InputMode == "L1" || child.InputMode == "L2" || child.InputMode == "M")) {
-                    param.data.criterias.push({
-                      id: item.id,
-                      code: key
-                    })
-                  }
-                })
-              }
+      //一级遍历list
+      this.tableHeader.map(head => {
+        //如果一级标签为动态参数或者设定参数放入数据等待请求
+        if (
+          head.InputMode == "L" ||
+          head.InputMode == "L1" ||
+          head.InputMode == "L2" ||
+          head.InputMode == "M"
+        ) {
+          data.map(item => {
+            let cur = tools.dataForKey(item, head.Path);
+            if (cur) {
+              param.data.criterias.push({
+                id: item.SysID,
+                code: head.InfoPointCode
+              });
             }
+          });
+        }
+      })
+      if (param.data.criterias.length) {
+        BeatchQueryParam(param, res => {
+          if (!this.onlyRead) {
+            return false
           }
-        })
-        if (param.data.criterias.length) {
-          BeatchQueryParam(param, res => {
-            if (!this.onlyRead) {
-              return false
-            }
-            this.tableData = data.map(item => {
-              res.Content.map(child => {
-                if (item.id == child.id) {
-                  if (!!child.data || child.data == 0) {
-                    item.infos[child.code] = child.data
-                  } else {
-                    item.infos[child.code] = child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                  }
+          this.tableData = data.map(item => {
+            res.Content.map(child => {
+              if (item.SysID == child.id) {
+                if (!!child.data || child.data == 0) {
+                  this.tableHeader.map(head => {
+                    if (head.InfoPointCode == child.code) {
+                      tools.setDataForKey(item, head.Path, child.data);
+                    }
+                  });
+                } else {
+                  this.tableHeader.map(head => {
+                    if (head.InfoPointCode == child.code) {
+                      tools.setDataForKey(
+                        item,
+                        head.Path,
+                        child.error ? "表号功能号格式错误" : "表号功能号不存在"
+                      );
+                    }
+                  });
                 }
-              })
-              return item
+              }
             })
-            this.hot.loadData(this.tableData)
+            return item
           })
-        }
+          this.hot.loadData(this.tableData)
+        })
       }
     },
     //初始化插件

+ 1 - 1
src/data/mapTable.js

@@ -5,7 +5,7 @@ export const State = {
   '-2': '现场已找到-距离太远未贴码',
   '-1': '现场已找到-只验证未贴码',
   '0': '现场已找到-正常贴码',
-  '1': '岗位转资产,待现场验证',
+  '1': '待现场验证',
   '2': '撕码任务',
   '3': '换码任务'
 }

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

@@ -81,6 +81,7 @@ export default {
                     console.log(resp)
                     if (resp.result == 'success') {
                         state.userInfo = { username: resp.username }
+                        storage.set('user_name', resp.username)
                         state.permissions = {}
                         if (resp.permissions) {
                             resp.permissions.forEach(p => (state.permissions[p] = true))

+ 19 - 3
src/views/ledger/property/addpropertys.vue

@@ -17,9 +17,9 @@
           <el-table-column label="设备本地编码" show-overflow-tooltip>
             <template slot-scope="scope">{{ scope.row.EquipLocalID?scope.row.EquipLocalID:scope.row.EquipID }}</template>
           </el-table-column>
-          <el-table-column prop="Category" label="设备类型" show-overflow-tooltip width="200"></el-table-column>
-          <el-table-column prop="BuildingId" label="所属建筑"></el-table-column>
-          <el-table-column prop="FloorId" label="所属楼层"></el-table-column>
+          <el-table-column prop="EquipCategory.EquipName" label="设备类型" show-overflow-tooltip width="200"></el-table-column>
+          <el-table-column prop="Building.BuildLocalName" label="所属建筑"></el-table-column>
+          <el-table-column prop="Floor.FloorLocalName" label="所属楼层"></el-table-column>
           <el-table-column prop="address" label="操作" width="100">
             <template slot-scope="scope">
               <el-button @click.native.prevent="handleOpenDetail(scope.row, tableData)" type="text" size="small">详情</el-button>
@@ -106,6 +106,7 @@ export default {
       } else {
         this.params.category = ''
       }
+      this.page.pageNumber = 1
       this.getTableData()
     },
     //选择建筑楼层
@@ -118,6 +119,7 @@ export default {
       } else {
         this.params.floorId = ''
       }
+      this.page.pageNumber = 1
       this.getTableData()
     },
     //获取表格数据
@@ -133,6 +135,20 @@ export default {
     //格式化条件
     formatFilter() {
       let param = {
+        Cascade: [
+          {
+            Name: "equipCategory",
+            Projection: ["EquipCode", "EquipName"]
+          },
+          {
+            Name: "building",
+            Projection: [ "BuildLocalName", "BuildName", "BuildID" ]
+          },
+          {
+            Name: "floor",
+            Projection: [ "FloorLocalName", "FloorName", "FloorID" ]
+          }
+        ],
         Filters: `category='${this.params.category}';PropertyId isNull`,
         Orders: "createTime desc, EquipID asc",
         PageNumber: this.page.pageNumber,

+ 38 - 2
src/views/ledger/report/index.vue

@@ -94,6 +94,24 @@ export default {
       }, {
         fieldName: "BIMID",
         headerName: "设备BIMID"
+      }, {
+        fieldName: "Property.EquipFamilyList.0.FamilyName",
+        headerName: "资产设备族"
+      }, {
+        fieldName: "Property.EquipLocalName",
+        headerName: "资产本地名称"
+      }, {
+        fieldName: "Property.EquipLocalID",
+        headerName: "资产本地编码"
+      }, {
+        fieldName: "Property.EquipID",
+        headerName: "资产id"
+      }, {
+        fieldName: "Property.CreateTime",
+        headerName: "资产创建时间"
+      }, {
+        fieldName: "Property.CodeType",
+        headerName: "资产现场验证状态"
       }],
       header3: [{
         fieldName: "Building.BuildLocalName",
@@ -102,6 +120,21 @@ export default {
         fieldName: "Floor.FloorLocalName",
         headerName: "楼层"
       }, {
+        fieldName: "Equipment.EquipCategory.EquipName",
+        headerName: "设备类"
+      }, {
+        fieldName: "Equipment.EquipLocalName",
+        headerName: "设备本地名称"
+      }, {
+        fieldName: "Equipment.EquipLocalID",
+        headerName: "设备本地编码"
+      }, {
+        fieldName: "Equipment.EquipID",
+        headerName: "设备id"
+      }, {
+        fieldName: "Equipment.BIMID",
+        headerName: "设备BIMID"
+      }, {
         fieldName: "EquipFamilyList.0.FamilyName",
         headerName: "资产设备族"
       }, {
@@ -163,9 +196,10 @@ export default {
           }
         ],
         Filters: " not propertyId isnull ",
+        Orders: "CreateTime desc, EquipID asc",
         PageNumber: pageNum,
         PageSize: 1000,
-        Projection: ["BuildingId", "FloorId", "Category", "EquipLocalName", "EquipLocalID", "EquipID", "BIMID"]
+        Projection: ["CreateTime", "BuildingId", "FloorId", "Category", "EquipLocalName", "EquipLocalID", "EquipID", "BIMID"]
       }
       queryEquip(params, res => {
         this.dataList = this.dataList.concat(res.Content.map((item) => {
@@ -200,9 +234,10 @@ export default {
           }
         ],
         Filters: " propertyId isnull ",
+        Orders: "CreateTime desc, EquipID asc",
         PageNumber: pageNum,
         PageSize: 1000,
-        Projection: ["BuildingId", "FloorId", "Category", "EquipLocalName", "EquipLocalID", "EquipID", "BIMID"]
+        Projection: ["CreateTime", "BuildingId", "FloorId", "Category", "EquipLocalName", "EquipLocalID", "EquipID", "BIMID"]
       }
       queryEquip(params, res => {
         this.dataList = this.dataList.concat(res.Content)
@@ -233,6 +268,7 @@ export default {
           }
         ],
         Filters: " EquipmentId isnull ",
+        Orders: "CreateTime desc, EquipID asc",
         PageNumber: pageNum,
         PageSize: 1000,
         Projection: [ "BuildingId", "FloorId", "Family", "EquipLocalName", "EquipLocalID", "EquipID", "CreateTime", "CodeType" ]

BIN
static/favicon.ico