Bladeren bron

提交代码,台账资产

chuwu 6 jaren geleden
bovenliggende
commit
ddc21033a5

+ 8 - 0
config/index.js

@@ -41,6 +41,14 @@ module.exports = {
                 // 将主机标头的原点更改为目标URL
                 changeOrigin: false
             },
+            '/venders': {
+                // 目标 API 地址
+                target: 'http://192.168.20.225:8080/',
+                // 如果要代理 websockets
+                ws: true,
+                // 将主机标头的原点更改为目标URL
+                changeOrigin: false
+            },
             '/ScanBuilding': {
                 // 目标 API 地址
                 target: 'http://172.16.0.141:8080/',

+ 2 - 1
src/api/scan/config.js

@@ -1,4 +1,5 @@
 export const api = '/ScanBuilding';
 export const sass = 'sass';
 export const physics = '/data-platform-3';
-export const business = '/business-space'
+export const business = '/business-space'
+export const venders = '/venders'

+ 10 - 10
src/api/scan/request.js

@@ -1,5 +1,5 @@
 import fetch from './fetch'
-import { api, physics, business } from './config'
+import { api, physics, business, venders } from './config'
 import http from './httpUtil'
 let arithmetic = '/arithmetic'
 
@@ -573,31 +573,31 @@ export function strDiff(param) {
 //获取供应商列表
 export function getManuLib(param, success) {
     let data = param
-    http.postJson(`${physics}venders/supplier/query`, data, success)
+    http.postJson(`${venders}/supplier/query`, data, success)
 }
 
 //查询所有供应商信息
 export function getLib(param) {
     let data = param
-    return fetch({ method: 'POST', url: `${physics}/venders/auxiliary/query/all`, data })
+    return fetch({ method: 'POST', url: `${venders}/auxiliary/query/all`, data })
 }
 
 //查询资产的list
 export function getPropertyList(param, success) {
     let data = param.data
-    let url = `${physics}/data-platform-3/property/relation_query?projectId=${param.ProjId}&secret=${param.secret}`
+    let url = `${physics}/property/relation_query?projectId=${param.ProjId}&secret=${param.secret}`
     http.postJson(url, data, success)
 }
 
 //获取资产种族编码query/equipment_family
 export function getEquipmentFamily(success) {
-    let url = `${physics}/data-platform-3/dict/query/equipment_family`
+    let url = `${physics}/dict/query/equipment_family`
     http.getJson(url, {}, success)
 }
 
 //删除资产
 export function delProperty(param, success) {
-    let url = `${physics}/data-platform-3/property/delete?projectId=${param.ProjId}&secret=${param.secret}`
+    let url = `${physics}/property/delete?projectId=${param.ProjId}&secret=${param.secret}`
     let data = param.data
     http.postJson(url, data, success)
 }
@@ -618,7 +618,7 @@ export function getListForGuarantee(param, success) {
 
 //新建保单
 export function createGuarantee(param, success) {
-    let url = `${physics}/venders/insurance/contract/create `
+    let url = `${venders}/insurance/contract/create `
     let data = param.data
     http.postJson(url, data, success)
 }
@@ -697,7 +697,7 @@ export function getSysToEq(param, success) {
 
 //台账查询型号
 export function getSpecList(param, success) {
-    let url = `${physics}/venders/manufacturer/specification/query_spec`
+    let url = `${venders}/manufacturer/specification/query_spec`
     let data = param
     http.postJson(url, data, success)
 }
@@ -752,7 +752,7 @@ export function getListForBuss(param, success) {
 
 //获取产品list
 export function getProductList(param, success) {
-    let url = `${physics}/venders/manufacturer/product/queryByType`
+    let url = `${venders}/manufacturer/product/queryByType`
     http.postJson(url, param, success)
 }
 
@@ -760,5 +760,5 @@ export function getProductList(param, success) {
 export function getBasicMatch(param) {
     console.log(param, "param")
     let data = param
-    return fetch({ method: 'POST', url: `${physics}/venders/basic/autoFillId`, data })
+    return fetch({ method: 'POST', url: `${venders}/basic/autoFillId`, data })
 }

+ 42 - 26
src/components/business_space/dialogs/addDialog/dialogAssets.vue

@@ -73,32 +73,39 @@
   </div>
 </template>
 <script>
-
-import myCascader from "@/components/lib/cascaders/assets";
-import hansonTable from "@/components/dialogHanson/addDevice";
+import myCascader from "@/components/ledger/lib/assets";
+import hansonTable from "@/components/ledger/lib/addDevice";
 import tools from "@/utils/scan/tools";
-import qrcode from "@/components/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/dialogs/list/picDialog"
 
+import qrcode from "@/components/business_space/lib/qrcode";
+import firm from "@/components/business_space/dialogs/list/firm";
+import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog";
+import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog";
+import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog";
+import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog";
+import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog";
+import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog";
+import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog";
+import picDialog from "@/components/business_space/dialogs/list/picDialog"
+
+
+import Handsontable from "handsontable-pro"
+    import 'handsontable-pro/dist/handsontable.full.css'
+    import zhCN from 'handsontable-pro/languages/zh-CN';
 //下拉插件
-import "@/assets/js/chosen.jquery.min";
-import "@/assets/js/handsontable-chosen-editor";
-
-import text from "@/utils/hansontable/mainText"
+// import "@/assets/js/chosen.jquery.min";
+// import "@/assets/js/handsontable-chosen-editor";
 
-import showTools from "@/utils/hansontable/notShow"
+import text from "@/utils/handsontable/mainText"
 
-import uuid from "@/utils/uuid";
+import showTools from "@/utils/handsontable/notShow"
 
-import { getTableHeader, createProperty, getSpaceFloor, createAssetsList } from "@/api/request";
+import uuid from "@/utils/scan/uuid";
+import {
+    mapGetters,
+    mapActions
+} from "vuex";
+import { getTableHeader, createProperty, getSpaceFloor, createAssetsList } from "@/api/scan/request";
 let table = function (num) {
   let main = []
   for (let i = 0; i < num; i++) {
@@ -137,6 +144,13 @@ export default {
       }
     }
   },
+  computed: {
+        ...mapGetters("peojMess", [
+            "projectId",
+            "secret",
+            "userId"
+        ])
+    },
   data() {
     return {
       width: "30%",
@@ -173,8 +187,8 @@ export default {
       imgsArr: [],//临时保存的图片key数组
       picsArr: [],//临时设备图片keys数组
       param: {
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret
+        ProjId: '',
+        secret: ''
       },
       floorData: [],
       isWatch: true,
@@ -182,6 +196,8 @@ export default {
     };
   },
   created() {
+      this.param.ProjId = this.projectId
+      this.param.secret = this.secret
     this.getFloorData()
   },
   mounted() { },
@@ -291,7 +307,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) {
@@ -355,7 +371,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
@@ -404,8 +420,8 @@ export default {
       this.ajaxResult = true
       let param = {
         FmList: data,
-        ProjId: this.$route.query.projId,
-        UserId: this.$route.query.userId
+        ProjId: this.projectId,
+        UserId: this.userId
       }
       await this.createAssetId(param)
     },

src/components/business_space/dialogs/addDialog/dialogDevice.vue → src/components/ledger/addDialog/dialogDevice.vue


+ 41 - 20
src/components/business_space/dialogs/addDialog/dialogSystem.vue

@@ -59,25 +59,36 @@
 </template>
 <script>
 
-import myCascader from "@/components/lib/cascaders/system";
-import hansonTable from "@/components/dialogHanson/addDevice";
+import myCascader from "@/components/ledger/lib/system";
+import hansonTable from "@/components/ledger/lib/addDevice";
 import tools from "@/utils/scan/tools";
-import qrcode from "@/components/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/dialogs/list/picDialog"
 
+import qrcode from "@/components/business_space/lib/qrcode";
+import firm from "@/components/business_space/dialogs/list/firm";
+import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog";
+import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog";
+import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog";
+import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog";
+import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog";
+import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog";
+import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog";
+import picDialog from "@/components/business_space/dialogs/list/picDialog"
+
+import Handsontable from "handsontable-pro"
+    import 'handsontable-pro/dist/handsontable.full.css'
+    import zhCN from 'handsontable-pro/languages/zh-CN';
 //下拉插件
-import "@/assets/js/chosen.jquery.min";
-import "@/assets/js/handsontable-chosen-editor";
+// import "@/assets/js/chosen.jquery.min";
+// import "@/assets/js/handsontable-chosen-editor";
+
+import { getTableHeader, BatchCreateSome, getSpaceFloor } from "@/api/scan/request";
+
+import {
+    mapGetters,
+    mapActions
+} from "vuex";
+
 
-import { getTableHeader, BatchCreateSome, getSpaceFloor } from "@/api/request";
 let table = function (num) {
   let main = []
   for (let i = 0; i < num; i++) {
@@ -116,6 +127,13 @@ export default {
       }
     }
   },
+  computed: {
+        ...mapGetters("peojMess", [
+            "projectId",
+            "secret",
+            "userId"
+        ])
+    },
   data() {
     return {
       width: "30%",
@@ -152,13 +170,15 @@ export default {
       imgsArr: [],//临时保存的图片key数组
       picsArr: [],//临时设备图片keys数组
       param: {
-        ProjId: this.$route.query.projId,
-        secret: this.$route.query.secret
+        ProjId: '',
+        secret: ''
       },
       floorData: []
     };
   },
   created() {
+      this.param.ProjId = this.projectId
+      this.param.secret = this.secret
     this.setValue()
     this.getFloorData()
   },
@@ -257,7 +277,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) {
@@ -319,8 +339,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)
@@ -343,6 +363,7 @@ export default {
      * @return 处理好的文案
      */
     delHeader(arr) {
+        console.log(arr)
       let data = arr.map(item => {
         if (
           item.InputMode == "A1" ||

+ 46 - 34
src/components/ledger/handsontables/assets.vue

@@ -92,35 +92,39 @@
   </div>
 </template>
 <script>
-import { getTableHeader, getBillPropList, updateProperty, upDateTableMain, delProperty, getEquipmentFamily } from "@/api/request";
+import { getTableHeader, getBillPropList, updateProperty, upDateTableMain, delProperty, getEquipmentFamily } from "@/api/scan/request";
 
 
-import tools from "@/assets/js/tools";
-import handsonUtils from "@/utils/hasontableUtils"
-import text from "@/utils/hansontable/mainText"
-
-import qrcode from "@/components/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/dialogs/list/picDialog"
-import myPagination from "@/components/lib/myPagination";
-import dialogAssets from "@/components/dialogs/addDialog/dialogAssets";
-import detailsDialog from "@/components/lib/detailsDia"
+import tools from "@/utils/scan/tools";
+import handsonUtils from "@/utils/scan/hasontableUtils"
+import showTools from "@/utils/handsontable/notShow"
 
+import qrcode from "@/components/business_space/lib/qrcode";
+import firm from "@/components/business_space/dialogs/list/firm";
+import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog";
+import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog";
+import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog";
+import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog";
+import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog";
+import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog";
+import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog";
+import detailsDialog from "@/components/business_space/lib/detailsDia"
+import picDialog from "@/components/business_space/dialogs/list/picDialog"
+import myPagination from "@/components/common/myPagination";
+import dialogAssets from "@/components/ledger/addDialog/dialogAssets";
+import {
+    mapGetters,
+    mapActions
+} from "vuex";
 //图片查看
-import lookPic from "@/components/lib/lookImages"
-
+import lookPic from "@/components/ledger/lib/lookImages"
+import Handsontable from "handsontable-pro"
+import 'handsontable-pro/dist/handsontable.full.css'
+import zhCN from 'handsontable-pro/languages/zh-CN';
 //下拉插件
-import "@/assets/js/chosen.jquery.min";
-import "@/assets/js/handsontable-chosen-editor";
+// import "@/assets/js/chosen.jquery.min";
+// import "@/assets/js/handsontable-chosen-editor";
 
-import showTools from "@/utils/hansontable/notShow"
 
 export default {
   components: {
@@ -139,6 +143,13 @@ export default {
     detailsDialog,
     lookPic
   },
+  computed: {
+        ...mapGetters("peojMess", [
+            "projectId",
+            "secret",
+            "userId"
+        ])
+    },
   data() {
     return {
       main: [],
@@ -170,7 +181,7 @@ export default {
       messKey: null,
       imgsArr: [],//临时保存的图片key数组
       picsArr: [],//临时设备图片keys数组
-      projId: this.$route.query.projId,
+      projId: '',
       copyMain: null,
       groupList: [],
       iframeSrc: "",
@@ -185,6 +196,7 @@ export default {
     };
   },
   created() {
+      this.projId = this.projectId
   },
   mounted() { },
   methods: {
@@ -245,8 +257,8 @@ export default {
             family: [this.mess.deviceId]
           }
         },
-        secret: this.$route.query.secret,
-        ProjId: this.$route.query.projId
+        secret: this.secret,
+        ProjId: this.projectId
       }
       if (this.mess.buildId == "all") {
         delete param.data.criteria.id
@@ -315,8 +327,8 @@ export default {
         }
       })
       upDateTableMain({
-        ProjId: this.$route.query.projId,
-        UserId: this.$route.query.userId
+        ProjId: this.projectId,
+        UserId: this.userId
       }, param).then(res => {
         if (res.data.Result == "success") {
           return
@@ -330,8 +342,8 @@ export default {
     getBatch(data) {
       console.log(this.headers, data, "data22222")
       let param = {
-        secret: this.$route.query.secret,
-        ProjId: this.$route.query.projId,
+        secret: this.secret,
+        ProjId: this.projectId,
         data: {
           criterias: []
         }
@@ -856,8 +868,8 @@ export default {
         return item
       })
       upDateTableMain({
-        ProjId: this.$route.query.projId,
-        UserId: this.$route.query.userId
+        ProjId: this.projectId,
+        UserId: this.userId
       }, param).then(res => {
         console.log(res)
       })
@@ -873,9 +885,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=" +

+ 28 - 14
src/components/ledger/handsontables/system.vue

@@ -56,13 +56,13 @@
     >请选择系统类型</div>
     <div v-show="main && main.length" v-loading="loading" id="handsontable" ref="handsontable"></div>
     <my-pagination v-show="main && main.length" @change="getMain" :page="page"></my-pagination>
-    <!-- <dialog-assets
+    <dialog-assets
       :assetType="[this.mess.deviceId]"
       @close="getClose"
       v-if="dialog.addDevice"
       ref="assets"
       :dialog="dialog"
-    ></dialog-assets> -->
+    ></dialog-assets>
     <details-dialog :iframeSrc="iframeSrc" v-if="dialog.details" :dialog="dialog"></details-dialog>
     <system-relevance @close="reset" :id="systemId" :dialog="dialog"></system-relevance>
   </div>
@@ -87,10 +87,18 @@ import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDia
 import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog";
 import picDialog from "@/components/business_space/dialogs/list/picDialog"
 import myPagination from "@/components/common/myPagination";
-// import dialogAssets from "@/components/dialogs/addDialog/dialogSystem";
+import dialogAssets from "@/components/ledger/addDialog/dialogSystem";
 import detailsDialog from "@/components/business_space/lib/detailsDia"
 import systemRelevance from "@/components/ledger/tableTransfers"
 
+import Handsontable from "handsontable-pro"
+import 'handsontable-pro/dist/handsontable.full.css'
+import zhCN from 'handsontable-pro/languages/zh-CN';
+
+import {
+    mapGetters,
+    mapActions
+} from "vuex";
 //下拉插件
 // import "@/assets/js/chosen.jquery.min";
 // import "@/assets/js/handsontable-chosen-editor";
@@ -108,10 +116,17 @@ export default {
     uploadImgDialog,
     picDialog,
     myPagination,
-    // dialogAssets,
+    dialogAssets,
     detailsDialog,
     systemRelevance
   },
+  computed: {
+        ...mapGetters("peojMess", [
+            "projectId",
+            "secret",
+            "userId"
+        ])
+    },
   data() {
     return {
       main: [],
@@ -144,7 +159,6 @@ export default {
       imgsArr: [],//临时保存的图片key数组
       picsArr: [],//临时设备图片keys数组
       noShowList: ["SysID", "SysName"],
-      projId: this.$route.query.projId,
       copyMain: null,
       iframeSrc: "",
       systemId: "",
@@ -170,7 +184,7 @@ export default {
       this.mess = code
       getTableHeader({
         code: this.mess.deviceId,
-        ProjId: this.projId
+        ProjId: this.projectId
       }).then(res => {
         this.headers = res.data.Content;
         this.getMain()
@@ -199,8 +213,8 @@ export default {
             type: [this.mess.deviceId]
           }
         },
-        secret: this.$route.query.secret,
-        ProjId: this.$route.query.projId
+        secret: this.secret,
+        ProjId: this.projectId
       }
       if (this.mess.buildId == "all") {
         param.data.criteria.id = this.mess.ProjId
@@ -539,8 +553,8 @@ export default {
     getBatch(data) {
       console.log(this.headers, data, "data22222")
       let param = {
-        secret: this.$route.query.secret,
-        ProjId: this.$route.query.projId,
+        secret: this.secret,
+        ProjId: this.projectId,
         data: {
           criterias: []
         }
@@ -697,8 +711,8 @@ export default {
         console.log(params, "params")
 
         let param = {
-          secret: this.$route.query.secret,
-          ProjId: this.$route.query.projId,
+          secret: this.secret,
+          ProjId: this.projectId,
           data: {
             criterias: []
           }
@@ -768,9 +782,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=" +

+ 509 - 0
src/components/ledger/lib/addDevice.vue

@@ -0,0 +1,509 @@
+<template>
+  <div>
+    <div class="hanson-bar">
+      <span>当前选择的设备类型:{{deviceType.facility}}</span>
+      <el-button size="small" @click="undo" icon="iconfont icon-undo">撤销</el-button>
+      <el-button size="small" @click="reset" icon="iconfont icon-shuaxin">刷新</el-button>
+    </div>
+    <qrcode :dialog="dialog" :addBody="true" ref="qrcode"></qrcode>
+    <firm :dialog="dialog"></firm>
+    <supply-dialog :dialog="dialog"></supply-dialog>
+    <supplier-dialog :dialog="dialog"></supplier-dialog>
+    <guarantee-dialog :dialog="dialog"></guarantee-dialog>
+    <upload-files-dialog :dialog="dialog"></upload-files-dialog>
+    <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
+  </div>
+</template>
+<script>
+import { getSpaceHeader } from "@/api/scan/request";
+import tools from "@/utils/scan/tools";
+import qrcode from "@/components/business_space/lib/qrcode";
+import firm from "@/components/business_space/dialogs/list/firm";
+import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog";
+import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog";
+import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog";
+import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog";
+import Handsontable from "handsontable-pro"
+import 'handsontable-pro/dist/handsontable.full.css'
+import zhCN from 'handsontable-pro/languages/zh-CN';
+import {
+    mapGetters,
+    mapActions
+} from "vuex";
+export default {
+  props: {
+    deviceType: {
+      type: Object
+    }
+  },
+  components: {
+    qrcode, //二维码页面
+    firm, //
+    supplyDialog,
+    supplierDialog,
+    guaranteeDialog,
+    uploadFilesDialog,
+  },
+  computed: {
+        ...mapGetters("peojMess", [
+            "projectId",
+            "secret",
+            "userId"
+        ])
+    },
+  data() {
+    let table = function (num) {
+      let main = []
+      for (let i = 0; i < num; i++) {
+        main.push({})
+      }
+      return main
+    }
+    return {
+      main: table(20),
+      mess: {},
+      headers: null,
+      page: {
+        size: 10,
+        sizes: [10, 30, 50, 100, 150, 200],
+        total: 400,
+        currentPage: 1
+      },
+      dialog: {
+        qrcode: false, //二维码弹窗
+        firm: false, //厂商弹窗
+        supply: false, //选择供应合同
+        supplier: false, //供应商选择
+        guarantee: false //选择保单
+      }
+    };
+  },
+  created() {
+  },
+  mounted() { },
+  methods: {
+
+    //获取header的mess
+    getHeader(mess) {
+      this.mess = mess;
+      console.log(this.mess);
+    },
+
+    //获取主体内容
+    getMain(floorMess) {
+      console.log(floorMess);
+    },
+
+    //获取表头
+    getData() {
+      getSpaceHeader({
+        code: this.deviceType.code,
+        ProjId: this.projectId
+      }).then(res => {
+        this.headers = res.data.Content;
+        if (!!this.hot) {
+          this.hot.destroy();
+          this.hot = null;
+        }
+        this.initHot();
+      });
+    },
+
+    //撤回
+    undo() {
+      this.hot.undo();
+    },
+
+    //刷新
+    reset() {
+      this.getData();
+    },
+
+    //添加设备
+    addDevice() {
+      console.log("addDevice")
+    },
+
+    /**
+     * 表头文案处理函数
+     * @param arr header数组数据
+     *
+     * @return 处理好的文案
+     */
+    delHeader(arr) {
+      let data = arr.map(item => {
+        if (
+          item.InputMode == "A1" ||
+          item.InputMode == "A2" ||
+          item.InputMode == "B1" ||
+          item.InputMode == "C5" ||
+          item.InputMode == "D1" ||
+          item.InputMode == "D2" ||
+          item.InputMode == "X" ||
+          item.InputMode == "L" ||
+          item.InputMode == "L1" ||
+          item.InputMode == "L2" ||
+          item.InputMode == "F1" ||
+          item.InputMode == "F2"
+        ) {
+          if (item.unit == "") {
+            return item.InfoPointName;
+          } else {
+            return item.InfoPointName + "(" + item.unit + ")";
+          }
+        } else {
+          return undefined;
+        }
+      });
+      data = data.filter(item => item);
+      data.unshift("同时创建资产", "所属建筑楼层", "所属系统实例");
+      return data;
+    },
+
+    /**
+     * 表头数据处理函数
+     * @param arr header数组数据
+     *
+     * @return 处理好的数据格式
+     */
+    getType(arr) {
+      let data = arr.map(item => {
+        //二维码
+        if (item.infoPointCode == "EquipQRCode") {
+          return {
+            data: "infos." + item.infoPointCode,
+            renderer: tools.lookDetails,
+            readOnly: true
+          }
+        }
+        //厂商选择
+        if (item.infoPointCode == "Brand" || item.infoPointCode == "Specification") {
+          return {
+            data: "infos." + item.infoPointCode,
+            renderer: tools.lookDetails,
+            readOnly: true
+          }
+        }
+        if (item.infoPointCode == "SupplierContractID") {
+          return {
+            data: "infos." + item.infoPointCode,
+            renderer: tools.lookDetails,
+            readOnly: true
+          }
+        }
+
+        if (item.infoPointCode == "InsuranceNum") {
+          //选择保单
+          return {
+            data: "infos." + item.infoPointCode,
+            renderer: tools.lookDetails,
+            readOnly: true
+          }
+        }
+
+        if (item.infoPointCode == "InsuranceFile" || item.infoPointCode == "Archive") {
+          return {
+            data: "infos." + item.infoPointCode,
+            renderer: tools.lookDetails,
+            readOnly: true
+          }
+        }
+
+        if (
+          item.infoPointCode == "InstallLocation" ||
+          item.infoPointCode == "InstallPic" ||
+          item.infoPointCode == "InstallDrawing" ||
+          item.infoPointCode == "Nameplate" ||
+          item.infoPointCode == "Pic" ||
+          item.infoPointCode == "Drawing"
+        ) {
+          return {
+            data: "infos." + item.infoPointCode,
+            renderer: tools.lookDetails,
+            readOnly: true
+          }
+        }
+
+        if (
+          item.infoPointCode == "Maintainer" ||
+          item.infoPointCode == "Supplier" ||
+          item.infoPointCode == "Insurer" ||
+          item.infoPointCode == "InsurerContactor"
+        ) {
+          return {
+            data: "infos." + item.infoPointCode,
+            renderer: tools.lookDetails,
+            readOnly: true
+          }
+        }
+        if (item.InputMode == "D1") {
+          return {
+            data: "infos." + item.infoPointCode,
+            renderer: tools.customDropdownRenderer,
+            editor: "chosen",
+            chosenOptions: {
+              // multiple: true,//多选
+              data: item.DataSource.Content || ""
+            }
+          };
+        } else if (item.InputMode == "A1" || item.InputMode == "A2") {
+          return {
+            data: "infos." + item.infoPointCode,
+            type: "numeric",
+            numericFormat: {
+              pattern: "0,0.00"
+              // culture: 'de-DE' // use this for EUR (German),
+              // more cultures available on http://numbrojs.com/languages.html
+            }
+          };
+        } else if (item.InputMode == "C5") {
+          return {
+            data: "infos." + item.infoPointCode,
+            type: "date",
+            dateFormat: "YYYY-MM-DD",
+            correctFormat: true
+          };
+        } else if (
+          item.InputMode == "B1" ||
+          item.InputMode == "L" ||
+          item.InputMode == "L1" ||
+          item.InputMode == "L2"
+        ) {
+          return {
+            data: "infos." + item.infoPointCode
+          };
+        } else if (
+          item.InputMode == "X" ||
+          item.InputMode == "F2"
+          // item.InputMode == "L1" ||
+          // item.InputMode == "L2"
+        ) {
+          return {
+            data: "infos." + item.infoPointCode,
+            readOnly: true
+          };
+        } else if (item.InputMode == "D2") {
+          return {
+            data: "infos." + item.infoPointCode,
+            renderer: tools.customDropdownRenderer,
+            editor: "chosen",
+            chosenOptions: {
+              multiple: true, //多选
+              data: item.DataSource.Content || ""
+            }
+          };
+        } else {
+          return undefined;
+        }
+
+      });
+      data.unshift(
+        {
+          type: "checkbox",
+          checkedTemplate: 1,
+          uncheckedTemplate: 0,
+          data: "Checked",
+          label: {
+            position: "after",
+          }
+        },
+        {
+          data: "flowBuild",
+          renderer: tools.customDropdownRenderer,
+          editor: "chosen",
+          chosenOptions: {
+            // multiple: true,//多选
+            // data: item.DataSource.Content || ""
+          }
+        },
+        {
+          data: "system",
+          renderer: tools.customDropdownRenderer,
+          editor: "chosen",
+          chosenOptions: {
+            // multiple: true,//多选
+            // data: item.DataSource.Content || ""
+          }
+        }
+      );
+      data = data.filter(item => item);
+      return data;
+    },
+
+    //初始化插件
+    initHot() {
+      var container = document.getElementById("myHandson");
+      let winHeight = document.documentElement.clientHeight;
+      this.hot = new Handsontable(container, {
+        data: this.main,
+        colHeaders: this.delHeader(this.headers), //表头文案
+        columns: this.getType(this.headers), //数据显示格式
+        filters: true,
+        height: winHeight - 100 - 50 - 60,
+        columnSorting: true, //添加排序
+        sortIndicator: true, //添加排序
+        renderAllRows: true,
+        autoColumnSize: true,
+        language: "zh-CN",
+        manualColumnResize: true,
+        manualColumnMove: true,
+        dropdownMenu: [
+          "filter_by_condition",
+          "filter_by_value",
+          "filter_action_bar"
+        ],
+        contextMenu: {
+          items: {
+            remove_row: {
+              name: "删除该业务空间"
+            }
+          }
+        },
+        // 事件
+        afterChange: this.tdChange, //修改后
+        afterFilter: this.trimmedRows, //排序前
+        beforeRemoveRow: this.romoveFm, //右键删除
+        afterOnCellMouseDown: this.eventClick //鼠标点击
+      });
+      let pro = document.getElementById("hot-display-license-info");
+      if (!!pro) {
+        pro.parentNode.removeChild(pro);
+      }
+      this.isLoading = false;
+    },
+
+    //表格中的点击
+    eventClick(el, rowArr) {
+      let filter = this.filtersArr;
+      //被筛选过后的数组
+      let trimmedArr = this.trimmedRows();
+      //是否启用了排序
+      let isSort = this.hot.getPlugin("columnSorting").isSorted();
+      if (trimmedArr.length && isSort) {
+        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
+          .__arrayMap;
+        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
+        this.getInfors(infos, rowArr);
+      } else if (isSort) {
+        //排序后的数组
+        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
+        let infos = this.main[sortArr[rowArr.row]];
+        this.getInfors(infos, rowArr);
+      } else if (trimmedArr.length) {
+        let infos = this.main[trimmedArr[rowArr.row]];
+        this.getInfors(infos, rowArr);
+      } else {
+        let infos = this.main[rowArr.row];
+        this.getInfors(infos, rowArr);
+      }
+    },
+
+    getInfors(infos, row) {
+      //点击的是表头
+      if (row.row < 0) {
+        return;
+      }
+      //其他的开始判断
+      let val = this.hot.colToProp(row.col);
+      if (val == "infos.EquipQRCode") {
+        this.dialog.qrcode = true;
+        this.$refs.qrcode.getCanvas(1111);
+      }
+
+      if (val == "infos.Brand" || val == "infos.Specification") {
+        this.dialog.firm = true;
+      }
+
+      if (val == "infos.SupplierContractID") {
+        this.dialog.supply = true;
+      }
+
+      if (val == "infos.InsuranceNum") {
+        //选择保单
+        this.dialog.guarantee = true;
+      }
+
+      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
+        alert("上传文件");
+      }
+
+      if (
+        val == "infos.InstallLocation" ||
+        val == "infos.InstallPic" ||
+        val == "infos.InstallDrawing" ||
+        val == "infos.Nameplate" ||
+        val == "infos.Pic" ||
+        val == "infos.Drawing"
+      ) {
+        alert("上传图片");
+      }
+
+      if (
+        val == "infos.Maintainer" ||
+        val == "infos.Supplier" ||
+        val == "infos.Insurer" ||
+        val == "infos.InsurerContactor"
+      ) {
+        this.dialog.supplier = true;
+      }
+      console.log(val);
+    },
+
+    //获取被筛选掉的行号
+    trimmedRows() {
+      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
+      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
+      let dataLength = this.main.length;
+      let dataArr = new Array();
+      for (let i = 0; i < dataLength; i++) {
+        dataArr.push(i);
+      }
+      if (plugin.length <= 0) {
+        dataArr = undefined;
+      } else {
+        dataArr = this.array_diff(dataArr, plugin);
+      }
+      return dataArr || [];
+      // var DataArray = new Array();
+
+      // for (var i = 0; i < plugin.length; i++) {
+      //     // 通过行号获取数据
+      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
+      // }
+    },
+
+    //判断是否为空行
+    isEmptyRow(instance, row) {
+      var rowData = instance.countRows();
+      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
+        if (rowData[i] !== null) {
+          return false;
+        }
+      }
+      return true;
+    }
+  },
+  watch: {
+    deviceType: {
+      handler(newName, oldName) {
+        this.getData()
+      },
+      immediate: true
+    }
+  }
+};
+</script>
+<style lang="less">
+.hanson-bar {
+  height: 40px;
+  padding: 5px;
+  font-size: 16px;
+  overflow: hidden;
+  .iconfont {
+    font-size: 12px;
+  }
+  .el-button {
+    margin-right: 10px;
+  }
+}
+</style>

+ 181 - 0
src/components/ledger/lib/lookImages.vue

@@ -0,0 +1,181 @@
+<!--
+    上传图片的弹窗
+-->
+
+<template>
+  <el-dialog title="上传图片" :visible.sync="dialog.lookPic" v-if="dialog.lookPic" width="600px">
+    <div style="max-height:700px;overflow-y:auto;">
+      <el-tabs type="border-card">
+        <el-tab-pane>
+          <span slot="label">图片</span>
+          <div style="width:500px;max-height:500px;">
+            <div v-if="picArrs.length">
+              <iframe
+                id="google_ads_frame3"
+                name="google_ads_frame3"
+                frameborder="0"
+                width="100%"
+                height="500px"
+                :src="iframeSrc"
+                marginwidth="0"
+                marginheight="0"
+                vspace="0"
+                hspace="0"
+                allowtransparency="true"
+                scrolling="no"
+                allowfullscreen="true"
+              ></iframe>
+            </div>
+            <div v-if="!picArrs.length">暂无图片</div>
+          </div>
+        </el-tab-pane>
+        <el-tab-pane v-if="videoArr.length">
+          <span slot="label">视频</span>
+          <div style="width:500px;">
+            <div
+              v-for=" (item,index) in videoArr "
+              style="width:200px;height:200px;float:left;margin: 5px;"
+              :key="index"
+            >
+              <video
+                width="100%"
+                height="100%"
+                :src="
+                '/img/image-service/common/image_get?systemId=dataPlatform&key='+item.key"
+                controls
+                :poster="'img/image-service/common/image_get?systemId=dataPlatform&key='+ item.key +'&width=200'"
+              ></video>
+            </div>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </el-dialog>
+</template>
+<script>
+import uploadImgs from "@/components/ledger/lib/uploadImgsName";
+import tools from "@/utils/scan/tools";
+export default {
+  components: {
+    uploadImgs
+  },
+  props: {
+    dialog: {
+      type: Object,
+      default: function () {
+        return {
+          lookPic: true
+        };
+      }
+    },
+    keysArr: {
+      type: Array,
+      default: function () {
+        return []
+      }
+    },
+    read: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      picArrs: [],
+      panoramaArr: [],
+      videoArr: [],
+      videoPicArr: [],
+      changeKeys: [],
+      iframeSrc: ""
+    };
+  },
+  created() { },
+  mounted() { },
+  methods: {
+    imageItem(images) {
+      this.picArrs = images
+      this.change()
+    },
+
+    panoramaItem(images) {
+      this.panoramaArr = images
+      this.change()
+    },
+
+    videoItem(videos, pe, pics) {
+      this.videoArr = videos
+      this.videoPicArr = pics
+      this.change()
+    },
+
+    change() {
+      //   let picsArr = this.getArr(this.picArrs, "设备图片", "image")
+      //   let videos = this.getArr(this.videoArr, "视频", "video")
+      //   let videoPics = this.getArr(this.videoPicArr, "视频资料", "image_video")
+      //   let panoramas = this.getArr(this.panoramaArr, "全景照片", "panorama")
+      let picsArr = this.picArrs
+      let videos = this.videoArr
+      let videoPics = this.videoPicArr
+      let panoramas = this.panoramaArr
+      this.changeKeys = picsArr.concat(videos).concat(videoPics).concat(panoramas)
+      console.log(this.changeKeys)
+      this.$emit("change", this.changeKeys)
+    },
+
+    getArr(arr, name, type) {
+      return arr.map(item => {
+        return { "systemId": "dataPlatform", "name": name, "type": type, "key": item }
+      })
+    },
+
+    //将父组件传来的数据进行分组
+    fatherTochild() {
+      this.panoramaArr = []
+      this.videoArr = []
+      this.videoPicArr = []
+      this.picArrs = []
+      if (this.keysArr instanceof Array) {
+        this.keysArr.map(item => {
+          if (item.type == 'panorama') {
+            this.panoramaArr.push(item)
+          } else if (item.type == "video") {
+            this.videoArr.push(item)
+          } else if (item.type == 'image_video') {
+            this.videoPicArr.push(item)
+          } else {
+            this.picArrs.push(item)
+          }
+        })
+      } else {
+        this.panoramaArr = []
+        this.videoArr = []
+        this.videoPicArr = []
+        this.picArrs = []
+      }
+      if (this.picArrs.length) {
+        this.$nextTick(_ => {
+          this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+          let iframe = document.getElementById("google_ads_frame3")
+          console.log(iframe)
+          iframe.onload = () => {
+            console.log("onload")
+            iframe.contentWindow.postMessage(this.picArrs, "*")
+          }
+        })
+      }
+    }
+  },
+  watch: {
+    dialog: {
+      deep: true,
+      handler: function () {
+        if (this.dialog.lookPic) {
+          this.fatherTochild()
+        }
+      }
+    }
+  }
+};
+</script>
+<style>
+</style>

+ 365 - 0
src/components/ledger/lib/uploadImgsName.vue

@@ -0,0 +1,365 @@
+<!--
+    @param keysArr 承接数组
+    @param readOnly  删除按钮是否显示,上传是否显示
+    @param max     上传最大数限制
+    @click change  承接数组发生变化时触发函数
+-->
+<template>
+  <div id="sagaUploads">
+    <div class="saga-upload-images">
+      <div v-if="type != 'video'" class="point-view" v-for="(item,index) in imagesArr">
+        <div class="point-image">
+          <i v-if="!readOnly" class="el-icon-delete" @click="delImage(index,item)"></i>
+          <img @click="lookImg" :src="imageGetUrl + '&key=' +item.key" alt v-load>
+        </div>
+        <form-input :label="''" @change="getName" :keys="index" :value="item.name" :width="10"></form-input>
+      </div>
+      <div v-if="type == 'video'" class="point-view" v-for="(item,index) in imagesArr">
+        <div class="point-image">
+          <i v-if="!readOnly" class="el-icon-delete" @click="delImage(index,item)"></i>
+          <video
+            width="100%"
+            height="100%;"
+            :src="imageGetUrl + '&key=' +item.key"
+            controls="controls"
+          >您的浏览器不支持 video 标签。</video>
+        </div>
+        <form-input :label="''" @change="getName" :keys="index" :value="item.name" :width="10"></form-input>
+      </div>
+      <div v-if="!readOnly && imagesArr.length < max" style="float:left;">
+        <el-upload
+          class="avatar-uploader"
+          :http-request="uploadAndSubmit"
+          :show-file-list="false"
+          :accept="accept"
+          action
+          drag
+          style="position: relation"
+        >
+          <i class="el-icon-plus avatar-uploader-icon"></i>
+        </el-upload>
+        <video style="display:none;" id="video" controls/>
+      </div>
+    </div>
+    <details-dialog :title="'图片'" :iframeSrc="iframeSrc" :dialog="dialog" :setData="imagesArr"></details-dialog>
+  </div>
+</template>
+<script>
+import tools from "@/utils/scan/tools";
+import formInput from "@/components/business_space/lib/formInput"
+import detailsDialog from "@/components/business_space/lib/detailsDia"
+
+export default {
+  components: {
+    formInput,
+    detailsDialog
+  },
+  props: {
+    keysArr: {
+      type: [Array, String]
+    },
+    readOnly: {
+      type: Boolean,
+      default: false
+    },
+    max: {
+      type: [Number, String],
+      default: 6
+    },
+    accept: {
+      type: String,
+      default: "image/*"
+    },
+    type: {
+      type: String,
+      default: "image"
+    },
+    defined: null,
+    videoPicArr: {
+      type: Array,
+      default: function () {
+        return []
+      }
+    }
+  },
+  data() {
+    return {
+      baseUrl: "",
+      imageGetUrl: "/img/image-service/common/image_get?systemId=dataPlatform",
+      imageUploadUrl: "/img/image-service/common/image_upload?systemId=dataPlatform&secret=9e0891a7a8c8e885&overwrite=true",
+      imagesArr: [],
+      iframeSrc: "",
+      dialog: {
+        details: false
+      }
+    };
+  },
+  created() {
+    this.imageFalg();
+  },
+  methods: {
+    getName(name, index) {
+      console.log(this.imagesArr, "imagesArr")
+      this.imagesArr[index].name = name
+      this.$emit("change", this.imagesArr, this.defined, this.videoPicArr);
+    },
+    //判断是否为空
+    imageFalg() {
+      let type = typeof this.keysArr;
+      if (type == "string") {
+        this.imagesArr = [this.keysArr];
+      } else {
+        this.imagesArr = tools.copyArr(this.keysArr);
+      }
+
+      if (!this.keysArr) {
+        this.imagesArr = [];
+      }
+    },
+
+    //查看图片
+    lookImg() {
+      this.dialog.details = true
+      this.iframeSrc = process.env.BASE_URL + ":8890/photo-View.html"
+    },
+
+    //删除图片
+    delImage(i, key) {
+      if (this.type == "video") {
+        this.videoPicArr = this.videoPicArr.map(item => {
+          if (item.key.substring(0, item.length - 3) == this.imagesArr[i].key.substring(0, this.imagesArr[i].length - 3)) {
+            return undefined
+          } else {
+            return item
+          }
+        }).filter(p => p)
+      }
+      this.imagesArr.splice(i, 1);
+      this.$emit("change", this.imagesArr, this.defined, this.videoPicArr);
+    },
+
+    //上传
+    uploadAndSubmit(item, key) {
+      // var form = document.forms["demoForm"];
+
+      // if (form["file"].files.length > 0) {
+      // 寻找表单域中的 <input type="file" ... /> 标签
+      // var file = form["file"].files[0];
+
+      console.log("lalala", item)
+      let file = item.file;
+      // try sending
+      let reader = new FileReader();
+
+      let vm = this;
+
+      let fileType = file.name.split(".");
+      let type = fileType[fileType.length - 1];
+
+      let uploadKey = file.uid
+      if (!!key) {
+        uploadKey = key
+      }
+
+      reader.onloadstart = function () {
+        // 这个事件在读取开始时触发
+      };
+      reader.onprogress = function (p) {
+        // 这个事件在读取进行中定时触发
+      };
+
+      reader.onload = function () {
+        // 这个事件在读取成功结束后触发
+      };
+      reader.onloadend = function () {
+        // 这个事件在读取结束后,无论成功或者失败都会触发
+        if (reader.error) {
+        } else {
+          // document.getElementById("bytesRead").textContent = file.size;
+          // 构造 XMLHttpRequest 对象,发送文件 Binary 数据
+          var xhr = new XMLHttpRequest();
+          xhr.open(
+            /* method */
+            "POST",
+            /* target url */
+            vm.imageUploadUrl + "&key=" + uploadKey + "." + type
+            /*, async, default to true */
+          );
+          //xhr.overrideMimeType("application/octet-stream");
+          xhr.send(reader.result);
+          xhr.onreadystatechange = function () {
+            if (xhr.readyState == 4) {
+              if (xhr.status == 200) {
+                if (vm.type == 'image') {
+                  vm.imagesArr.push(
+                    {
+                      name: uploadKey,
+                      key: uploadKey + "." + type,
+                      systemId: "dataPlatform",
+                      type: "image"
+                    }
+                  );
+                }
+                if (type == 'mp4') {
+                  vm.imagesArr.push({
+                    name: uploadKey,
+                    key: uploadKey + "." + type,
+                    systemId: "dataPlatform",
+                    type: "video"
+                  }
+                  );
+                  vm.creatImg(vm.imageGetUrl + "&key=" + uploadKey + "." + type, uploadKey)
+                }
+                if (vm.type == "video" && type == "png") {
+                  vm.videoPicArr.push({
+                    name: uploadKey,
+                    key: uploadKey + "." + type,
+                    systemId: "dataPlatform",
+                    type: "image_video"
+                  })
+                }
+                vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);
+              }
+            }
+          };
+        }
+      };
+      reader.readAsArrayBuffer(file);
+    },
+    dataURLtoBlob(dataURI, type) {
+      var binary = atob(dataURI.split(',')[1]);
+      var array = [];
+      for (var i = 0; i < binary.length; i++) {
+        array.push(binary.charCodeAt(i));
+      }
+      return new Blob([new Uint8Array(array)], { type: type });
+    },
+
+    creatImg(reader, key) {
+      var videoDom = document.getElementById('video');
+      videoDom.src = reader;
+      let vm = this
+      videoDom.onloadeddata = function () {
+        // 这里可以打印视频时长
+        // 这里取得视频封面
+        var canvas = document.createElement('canvas');
+        canvas.width = 300;
+        canvas.height = 300 * this.videoHeight / this.videoWidth;
+        canvas.getContext('2d').drawImage(this, 0, 0, canvas.width, canvas.height);
+        //将canvas的base64位图片转换成图片png的file
+        var blob = vm.dataURLtoBlob(canvas.toDataURL('image/png'), "image/png")
+        //将其转换成file对象
+        var file = new File([blob], "video_image.png", { type: "image/png", lastModified: Date.now() })//blob转file
+        vm.uploadAndSubmit({ file: file }, key)
+      }
+    },
+  },
+  watch: {
+    keysArr: function (val) {
+      this.imageFalg();
+    }
+  },
+  //自定义指令
+  directives: {
+    load: function (el) {
+      let imgDom = document.createElement("img");
+      imgDom.style.position = "absolute";
+      imgDom.style.top = "-999px";
+      imgDom.style.opacity = 0;
+      imgDom.src = el.src;
+      el.src = "";
+      imgDom.onload = () => {
+        let width = imgDom.width;
+        let height = imgDom.height;
+        if (width > height) {
+          el.style.height = "100%";
+          el.style.width = "auto";
+          el.style.position = "absolute";
+          el.style.left = "50%";
+          el.style.top = "0";
+          el.style.transform = "translateX(-50%)";
+          el.style.webkitTransform = "translateX(-50%) translateY(0)";
+          el.style.MozTransform = "translateX(-50%) translateY(0)";
+          el.style.msTransform = "translateX(-50%) translateY(0)";
+          el.style.OTransform = "translateX(-50%) translateY(0)";
+        } else if (width < height) {
+          el.src = imgDom.src;
+          el.style.width = "100%";
+          el.style.height = "auto";
+          el.style.position = "absolute";
+          el.style.top = "50%";
+          el.style.left = "0";
+          el.style.transform = "translateY(-50%) translateX(0)";
+          el.style.webkitTransform = "translateY(-50%) translateX(0)";
+          el.style.MozTransform = "translateY(-50%) translateX(0)";
+          el.style.msTransform = "translateY(-50%) translateX(0)";
+          el.style.OTransform = "translateY(-50%) translateX(0)";
+        } else {
+          el.style.width = "100%";
+          el.style.height = "100%";
+          el.style.position = "absolute";
+          el.style.top = "0";
+          el.style.left = "0";
+          el.style.transform = "translateY(0) translateX(0)";
+          el.style.webkitTransform = "translateY(0) translateX(0)";
+          el.style.MozTransform = "translateY(0) translateX(0)";
+          el.style.msTransform = "translateY(0) translateX(0)";
+          el.style.OTransform = "translateY(0) translateX(0)";
+        }
+        el.src = imgDom.src;
+      };
+    }
+  }
+};
+</script>
+<style lang="less">
+#sagaUploads {
+  overflow: hidden;
+  .avatar-uploader {
+    height: 180px;
+    width: 180px;
+    overflow: hidden;
+    .el-upload {
+      width: 180px;
+      height: 180px;
+      .el-upload-dragger {
+        width: 180px;
+        height: 180px;
+        .el-icon-plus {
+          display: block;
+          width: 20px;
+          height: 20px;
+          font-size: 20px;
+          margin: 80px;
+        }
+      }
+    }
+  }
+  .point-view {
+    float: left;
+    margin-right: 10px;
+    margin-bottom: 10px;
+    overflow: hidden;
+    height: 240px;
+  }
+  .point-image {
+    width: 180px;
+    height: 180px;
+    position: relative;
+    border: 1px solid #ccc;
+    overflow: hidden;
+    image {
+      z-index: 11;
+    }
+    i {
+      position: absolute;
+      bottom: 10px;
+      right: 10px;
+      background-color: #fff;
+      padding: 5px;
+      cursor: pointer;
+      z-index: 66;
+    }
+  }
+}
+</style>

+ 31 - 0
src/utils/scan/uuid.js

@@ -0,0 +1,31 @@
+function uuid(len, radix) {
+    var chars = '0123456789abcdef'.split('');
+    var uuid = [],
+        i;
+    radix = radix || chars.length;
+
+    if (len) {
+        // Compact form
+        for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
+    } else {
+        // rfc4122, version 4 form
+        var r;
+
+        // rfc4122 requires these characters
+        uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
+        uuid[14] = '4';
+
+        // Fill in random data.  At i==19 set the high bits of clock sequence as
+        // per rfc4122, sec. 4.1.5
+        for (i = 0; i < 36; i++) {
+            if (!uuid[i]) {
+                r = 0 | Math.random() * 16;
+                uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
+            }
+        }
+    }
+
+    return uuid.join('');
+}
+
+export default uuid

+ 172 - 9
src/views/ledger/property/index.vue

@@ -1,15 +1,178 @@
+<!--
+    设备清单
+-->
 <template>
-    <div>
-        资产
+  <div id="deviceList">
+    <saga-title :mess="mess"></saga-title>
+    <div class="table-main">
+      <div class="search-header">
+        <floor-cascader @change="changeFloor"></floor-cascader>
+        <my-cascader ref="cascader" @change="changeDevice"></my-cascader>
+      </div>
+      <hanson-table @getJson="change" ref="tableMain"></hanson-table>
     </div>
+    <!-- <table-transfers></table-transfers> -->
+  </div>
 </template>
 <script>
+import sagaTitle from "@/components/ledger/lib/title";
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import myCascader from "@/components/ledger/lib/assets";
+import hansonTable from "@/components/ledger/handsontables/assets";
+import tableTransfers from "@/components/ledger/tableTransfers";
+import {
+    mapGetters,
+    mapActions
+} from "vuex";
+import { getNumber, getFamilyList, getSpaceName } from "@/api/scan/request"
 export default {
-    data(){ return {}},
-    created(){},
-    mounted(){},
-    methods:{}
-}
+  components: {
+    sagaTitle,
+    floorCascader,
+    myCascader,
+    hansonTable,
+    tableTransfers
+  },
+  computed: {
+        ...mapGetters("peojMess", [
+            "projectId",
+            "secret",
+            "userId"
+        ])
+    },
+  data() {
+    return {
+      mess: {
+        perjectName: "",
+        name: [
+          {
+            key: "资产",
+            num: 0
+          },
+          {
+            key: "岗位",
+            num: 0
+          }
+        ]
+      },
+      param: {
+        buildId: "",
+        floorId: "",
+        deviceId: "",
+        ProjId: '',
+        secret: ''
+      },
+      list: []
+    };
+  },
+  created() {
+      this.param.ProjId = this.projectId
+      this.param.secret = this.secret
+    this.getProjName()
+  },
+  mounted() { },
+  methods: {
+    getProjName() {
+      let param = {
+        list: [{ id: this.param.ProjId }],
+        perjectId: this.param.ProjId,
+        secret: this.param.secret,
+      }
+      getSpaceName(param).then(res => {
+        if (res.data.Result == "success") {
+          this.mess.perjectName = res.data.Content[0].infos.ProjLocalName
+          this.getNumber()
+        } else {
+          this.$message.error("请求失败:" + res.data.ResultMsg)
+        }
+      }).catch(_ => {
+        this.$message.error("请求失败")
+      })
+    },
+    getFamilyList() {
+      let param = {
+        ProjId: this.param.ProjId,
+        secret: this.param.secret,
+        data: { type: "Pe" }
+      }
+      getFamilyList(param, res => {
+        this.$refs.cascader.pushData(res.Content)
+      })
+    },
+    //获取header的list
+    getNumber() {
+      let param = {
+        ProjId: this.param.ProjId,
+        secret: this.param.secret,
+        data: { type: "Pe" }
+      }
+      getNumber(param, res => {
+        this.mess.name[0].num = res.content.count
+        this.mess.name[1].num = res.content.bindingCount
+        this.getFamilyList()
+      })
+    },
+    //修改楼层
+    changeFloor(value) {
+      if (value[0]) {
+        this.param.buildId = value[0]
+      }
+      if (value[1]) {
+        this.param.floorId = value[1]
+      } else {
+        this.param.floorId = null
+      }
+      if (!!this.param.deviceId) {
+        this.$refs.tableMain.getHeaderData(this.param);
+      } else {
+        return;
+      }
+    },
+
+    //新建资产后进行刷新
+    change(val) {
+      console.log(val)
+      this.$refs.cascader.setValue([val.code])
+      this.param.deviceId = val.code
+      this.getNumber()
+      if (!!this.param.deviceId) {
+        this.$refs.tableMain.getHeaderData(this.param);
+      }
+    },
+
+    //修改设备族
+    changeDevice(value) {
+      console.log(value)
+      this.param.deviceId = value.code
+      if (!!value) {
+        this.$refs.tableMain.getHeaderData(this.param);
+      } else {
+        return;
+      }
+    }
+  }
+};
 </script>
-<style>
-</style>
+<style lang="less" scoped>
+#deviceList {
+  overflow: hidden;
+  height: 100%;
+  background-color: #f6f6f6;
+  .table-main {
+    position: absolute;
+    top: 140px;
+    bottom: 10px;
+    left: 10px;
+    right: 10px;
+    background-color: #fff;
+    border: 1px solid #ccc;
+    border-radius: 5px;
+    padding: 10px;
+  }
+  .search-header {
+    overflow: hidden;
+    padding-bottom: 10px;
+    border-bottom: 1px solid #bcbcbc;
+  }
+}
+</style>

+ 3 - 0
src/views/ledger/system/index.vue

@@ -25,6 +25,9 @@ import {
     mapActions
 } from "vuex";
 import { getAllbusiness, getFamilyList, getSpaceName } from "@/api/scan/request"
+import Handsontable from "handsontable-pro"
+    import 'handsontable-pro/dist/handsontable.full.css'
+    import zhCN from 'handsontable-pro/languages/zh-CN';
 
 export default {
   components: {