Browse Source

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

# Conflicts:
#	src/api/scan/httpUtil.js
chuwu 5 years ago
parent
commit
7f07d494b0

+ 6 - 0
src/components/business_space/lib/detailsDia.vue

@@ -72,4 +72,10 @@ export default {
   }
 }
 </script>
+<style lang="less" scoped>
+    #google_ads_frame2 {
+        height: 300px;
+        overflow: auto;
+    }
+</style>
 

+ 7 - 1
src/components/business_space/lib/qrcode.vue

@@ -4,7 +4,7 @@
     v-if="dialog.qrcode"
     custom-class="custom-dialog"
     :visible.sync="dialog.qrcode"
-    width="300px"
+    width="500px"
   >
     <div>
       <div id="qrcode">
@@ -55,3 +55,9 @@ export default {
   }
 };
 </script>
+<style lang="less" scoped>
+#qrcode {
+    height: 300px;
+    overflow: auto;
+}
+</style>

+ 15 - 8
src/components/dialogs/list/systemType.vue

@@ -2,7 +2,7 @@
     systemType 设备所属类型
 -->
 <template>
-  <el-dialog title="所属系统实例" :visible.sync="dialog.systemType" width="600px">
+  <el-dialog title="所属系统实例" :visible.sync="dialog.systemType" width="500px">
     <div>
       <div id="systemType">
         <div class="title-search" style="margin-bottom: 10px;" v-if="type != 'read' ">
@@ -16,10 +16,10 @@
           <el-button size="small" @click="searchChecked">查找</el-button>
         </div>
         <el-table
+        class='data-table'
           :data="tableData"
           @selection-change="handleSelectionChange"
           style="width: 100%"
-          height="400px"
           ref="multipleTable"
         >
           <el-table-column
@@ -81,7 +81,7 @@
 import myPagination from "@/components/ledger/lib/myPagination";
 import { getLib, getAllbusiness, getEqCode, getRelation } from "@/api/scan/request"
 import tools from "@/utils/scan/tools"
-
+import { mapGetters } from 'vuex'
 export default {
   components: {
     myPagination
@@ -125,7 +125,12 @@ export default {
       iframeShow: false
     };
   },
-  created() {
+  computed: {
+    ...mapGetters("peojMess", [
+        "projectId",
+        "secret",
+        "userId"
+    ])
   },
   mounted() { },
   methods: {
@@ -202,8 +207,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 +237,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,
@@ -302,6 +307,8 @@ export default {
 
 <style lang="less">
 #systemType {
+    height: 350px;
+    overflow-y:auto; 
   .el-table thead {
     tr {
       th {

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

@@ -686,7 +686,7 @@ export default {
         columns: this.getType(this.headers), //数据显示格式
         filters: true,
         maxRows: this.main.length,
-        height: winHeight - 100 - 50 - 150,
+        height: winHeight - 100 - 50 - 290,
         columnSorting: true, //添加排序
         sortIndicator: true, //添加排序
         renderAllRows: true,

+ 24 - 29
src/components/ledger/handsontables/device.vue

@@ -84,7 +84,9 @@
       style="width:100%;text-align:center;font-size:30px;color:gray;"
     >{{ mess.deviceId ? '请选择设备族' : '无设备'}}</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>
+    <div  v-show="main && main.length" class="right">
+        <my-pagination @change="getMain" :page="page"></my-pagination>
+    </div>
     <dialog-assets
       @close="getClose"
       :graphyId="graphyId"
@@ -127,6 +129,10 @@ import lookPic from "@/components/ledger/lib/lookImages"
 import "@/assets/js/chosen.jquery.min";
 import "@/assets/js/handsontable-chosen-editor";
 import {mapGetters, mapActions} from "vuex";
+
+import Handsontable from "handsontable-pro"
+import 'handsontable-pro/dist/handsontable.full.css'
+import zhCN from 'handsontable-pro/languages/zh-CN';
 export default {
   props: ["myParam"],
   components: {
@@ -241,7 +247,6 @@ export default {
             }
           })
           this.floorData = floorData
-          console.log(this.floorData)
         } else {
           this.$message.error(res.data.ResultMsg)
         }
@@ -295,13 +300,16 @@ export default {
       this.page.currentPage = 1
       this.mess = code
       this.changeCader()
-      getTableHeader({
-        code: this.mess.deviceId,
-        ProjId: this.projId
-      }).then(res => {
-        this.headers = res.data.Content;
-        this.getMain()
-      });
+      if(this.mess.deviceId){
+          getTableHeader({
+            code: this.mess.deviceId,
+            ProjId: this.projectId
+        }).then(res => {
+            this.headers = res.data.Content;
+            this.getMain()
+        });
+      }
+      
     },
 
     //获取主体数据
@@ -318,8 +326,8 @@ export default {
           id: "",
           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.id = this.mess.ProjId
@@ -364,12 +372,10 @@ export default {
               }
               return item
             })
-            console.log(_this.onlyRead, "onlyRead")
             if (_this.onlyRead) {
               this.getBatch(res.Content)
             }
             _this.main = res.Content
-            console.log(_this.main, "main")
             _this.copyMain = tools.deepCopy(res.Content)
             _this.page.total = res.TotalCount
             if (!!_this.hot) {
@@ -389,10 +395,9 @@ 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: []
         }
@@ -435,7 +440,6 @@ export default {
               })
               return item
             })
-            console.log(this.main)
             this.hot.loadData(this.main)
           })
         }
@@ -514,7 +518,6 @@ export default {
 
       let data = showTools.changeHeader(arr, readArr, this.onlyRead, this.isWatch, this.allMess)
       data.unshift("操作", "当前关联的资产", "所属系统实例");
-      console.log(data)
       return data;
     },
 
@@ -530,9 +533,7 @@ export default {
       if (!this.onlyRead) {
         // arr = showTools.arrToArr(arr)
       }
-      console.log("test")
       let data = showTools.showTypes(arr, this.onlyRead, this.isWatch, this.allMess)
-      console.log("test2")
       data.map(item => {
         if (
           item.data == "infos." + "Drawing" ||
@@ -578,7 +579,6 @@ export default {
           item.readOnly = true
         })
       }
-      console.log(data)
       return data;
     },
 
@@ -790,7 +790,7 @@ export default {
         columns: this.getType(this.headers), //数据显示格式
         filters: true,
         maxRows: this.main.length,
-        height: winHeight - 100 - 50 - 150,
+        height: winHeight - 100 - 50 - 290,
         columnSorting: true, //添加排序
         sortIndicator: true, //添加排序
         renderAllRows: true,
@@ -893,7 +893,6 @@ export default {
       params.map(item => {
         param.data.criterias.push({ id: item.id })
       })
-      console.log(params, param)
       this.$confirm("此操作将删除设备,是否继续?", "提示", {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -919,7 +918,6 @@ export default {
 
     // 修改
     updateBusiness(data, change) {
-      console.log(data)
       //   data.map(item => {
       //       if (!!item.flowBuild) {
       //       item.building_id = item.flowBuild.split("-")[0]
@@ -998,9 +996,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=" +
@@ -1156,7 +1154,6 @@ export default {
     },
     //如果选择供应商之后
     supplierChange(data) {
-      console.log(data)
       for (let key in data) {
         if (key == "venderId") {
           data[key] = data[key] + "-" + data.name
@@ -1188,7 +1185,6 @@ export default {
 
     //选择型号修改
     firmChange(data) {
-      console.log(data, "xinghao")
       for (let key in data) {
         // this.utilToKey(key, "name", data, "Supplier")
         // this.utilToKey(key, "email", data, "SupplierEmail")
@@ -1206,7 +1202,6 @@ export default {
 
     //保险商变更
     changeInsurer(data) {
-      console.log(data, "@22")
       for (let key in data) {
         // this.utilToKey(key, "name", data, "Insurer")
         // this.utilToKey(key, "email", data, "InsurerEmail")

+ 11 - 8
src/components/ledger/handsontables/system.vue

@@ -182,13 +182,16 @@ export default {
     //获取表头
     getHeaderData(code) {
       this.mess = code
-      getTableHeader({
-        code: this.mess.deviceId,
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        this.getMain()
-      });
+      if(this.mess.deviceId) {
+          getTableHeader({
+                code: this.mess.deviceId,
+                ProjId: this.projectId
+            }).then(res => {
+                this.headers = res.data.Content;
+                this.getMain()
+            });
+      }
+      
     },
     changeRead() {
       this.onlyRead = !this.onlyRead
@@ -615,7 +618,7 @@ export default {
         columns: this.getType(this.headers), //数据显示格式
         filters: true,
         maxRows: this.main.length,
-        height: winHeight - 100 - 50 - 270,
+        height: winHeight - 100 - 50 - 290,
         columnSorting: true, //添加排序
         sortIndicator: true, //添加排序
         renderAllRows: true,

+ 7 - 0
src/components/ledger/lib/detailsDia.vue

@@ -72,4 +72,11 @@ export default {
   }
 }
 </script>
+<style scoped>
+#google_ads_frame2{
+    height: 350px;
+    overflow: auto;
+}
+</style>
+
 

+ 6 - 1
src/components/ledger/lib/qrcode.vue

@@ -4,7 +4,7 @@
     v-if="dialog.qrcode"
     custom-class="custom-dialog"
     :visible.sync="dialog.qrcode"
-    width="300px"
+    width="500px"
   >
     <div>
       <div id="qrcode">
@@ -55,3 +55,8 @@ export default {
   }
 };
 </script>
+<style lang="less" scoped>
+#qrcode {
+    height: 300px;
+}
+</style>