Browse Source

bug修改

zhangyu 5 years ago
parent
commit
1f7c730df5

+ 2 - 1
config/dev.env.js

@@ -5,5 +5,6 @@ const prodEnv = require('./prod.env')
 module.exports = merge(prodEnv, {
     NODE_ENV: '"development"',
     BASE_URL: '"http://172.16.0.239"', //线上iframe地址
-    SSO_SERVER: '"http://192.168.20.101:8004"'
+    SSO_SERVER: '"http://192.168.20.101:8004"' //测试环境
+    // SSO_SERVER: '"http://sso.sagacloud.cn"'  //正式环境
 })

+ 2 - 1
config/prod.env.js

@@ -2,5 +2,6 @@
 module.exports = {
     NODE_ENV: '"production"',
     BASE_URL: '"http://172.16.0.239"', //线上iframe地址
-    SSO_SERVER: '"http://192.168.20.101:8004"'
+    SSO_SERVER: '"http://192.168.20.101:8004"' //测试环境
+    // SSO_SERVER: '"http://sso.sagacloud.cn"'  //正式环境
 }

+ 4 - 3
src/components/data_admin/buildData/style.scss

@@ -426,10 +426,11 @@ h3 {
             .cant_mod {
                 width: 100%;
                 .table_header {
-                    border: 1px solid $borderColor;
-                    border-bottom: none;
+                    // border: 1px solid $borderColor;
+                    // border-bottom: none;
                     font-weight: 900;
-                    padding-left: 0.5rem;
+                    margin-top: 5px;
+                    // padding-left: 0.5rem;
                 }
                 table {
                     width: 100%;

+ 9 - 4
src/components/ledger/handsontables/device.vue

@@ -12,7 +12,7 @@
         <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;' @click="undo" icon="iconfont icon-undo">撤销</el-button>
+        <el-button size="small" style='width: 80px;' v-show="!onlyRead" @click="undo" icon="iconfont icon-undo">撤销</el-button>
       </div>
       <div style="width:200px;color:gray;float:right;font-size:12px;">
         <span v-if="!onlyRead">隐藏自动填充的信息点:</span>
@@ -413,6 +413,7 @@ export default {
               this.getBatch(res.Content)
             }
             _this.main = res.Content
+            // debugger
             _this.copyMain = tools.deepCopy(res.Content)
             _this.page.total = res.TotalCount
             if (!!_this.hot) {
@@ -567,7 +568,6 @@ export default {
      * @return 处理好的数据格式
      */
     getType(list) {
-      debugger;
       let arr = tools.copyArr(list)
       // 如果不是只读状态,添加四大厂商选择
       if (!this.onlyRead) {
@@ -604,8 +604,7 @@ export default {
           renderer: text.systemList,
           readOnly: true
         }, {
-          data: "partsNum",
-          renderer: text.systemList,
+          data: "linkName",
           readOnly: true
         }
       );
@@ -1072,6 +1071,12 @@ http://47.94.89.44:8058/spread?id=${infos.id}&pid=${this.projectId}&secret=${thi
         this.dialog.systemType = true
       }
 
+      if (val == "linkName" && this.onlyRead) {
+        this.$router.push({ name: 'partsLedger'});
+      } else if (val == "linkName" && !this.onlyRead) {
+        this.$router.push({ name: 'partsLedger'});
+      }
+
       if (val == "infos.Pic") {
         this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
         if (this.onlyRead) {

+ 8 - 1
src/router/system.js

@@ -32,6 +32,7 @@ const OwnerManage = () => import('@/views/market/owner/manage')
 import systemLedger from '@/views/ledger/system/index'
 import dialogAssets from '@/views/ledger/system/addsystem'
 import facilityLedger from '@/views/ledger/facility/index'
+import partsLedger from '@/views/ledger/facility/parts/index'
 import dialogDevice from '@/views/ledger/facility/addfacility'
 import propertyLedger from '@/views/ledger/property/index'
 import dialogSystem from '@/views/ledger/property/addproperty'
@@ -142,7 +143,13 @@ export default [
                 path: 'facility',
                 name: 'facilityLedger',
                 component: facilityLedger,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '设备清单' }] },
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '设备清单' }] }
+            },
+            {
+                path: 'parts',
+                name: 'partsLedger',
+                component: partsLedger,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/parts' }, { label: '设备清单 / 包含的部件' }] }
             },
             {
                 path: 'facility/addfacility',

+ 9 - 3
src/views/data_admin/buildData/index.vue

@@ -192,7 +192,7 @@
                 </div>
                 <!-- 编辑点位标签弹窗 -->
                 <el-dialog title="点位标签编辑" class="modification" :visible.sync="dialogTableVisible" @close="closeDialog">
-                    <div>
+                    <div class="content_box">
                         <div class="mod_title">
                             <div class="qr_code">
                                 <img v-if="pointList.PointId" :src="'/ScanBuilding/service/qrcode/point?projectId=' + projectId + '&pointId=' + pointList.PointId + '&FloorId=' + floorId + '&width=200&height=200'" alt>
@@ -1811,6 +1811,12 @@
                     this.getNowFormatDate(new Date().setHours(0, 0, 0, 0)),
                     this.getNowFormatDate(new Date())
                 ];
+
+                this.buildId = "";
+                this.defaultFloorData = "";
+                this.buildList = [];
+                this.floorList = [];
+
                 this.tabAvtive = "table0"
                 this.labelChecked = "请选择点位标签!"
                 // 获取建筑信息
@@ -1828,7 +1834,7 @@
 .page-content{
     position: relative;
 }
-    @import "../../../components/data_admin/buildData/style.scss";
+@import "../../../components/data_admin/buildData/style.scss";
 </style>
 
 <style lang="scss" scoped>
@@ -1858,7 +1864,7 @@
         }
     }
 }
-.el-dialog__body {
+.content_box {
     max-height: 440px;
     overflow-y: auto;
 }

+ 95 - 0
src/views/ledger/facility/parts/index.vue

@@ -0,0 +1,95 @@
+<template>
+  <div>
+    <el-tabs type="border-card">
+      <el-tab-pane :label="item.name + ' ( ' + item.num + ' ) '" v-for="item in partsTypeList" :key="item.id">
+        <el-row>
+          <el-checkbox v-model="checked">只看采集的信息</el-checkbox>
+          <el-button plain>刷新</el-button>
+          <div :id="partsTable"></div>
+        </el-row>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+
+<script>
+import { mapGetters, mapActions } from "vuex";
+
+export default {
+  data() {
+    return {
+      data: [],
+      checked: true,
+      partsTable: "partsTable",
+      partsTypeList: [
+        {
+          id: "011A",
+          name: "部件A",
+          num: 12
+        },
+        {
+          id: "011B",
+          name: "部件B",
+          num: 5
+        },
+        {
+          id: "011C",
+          name: "部件C",
+          num: 8
+        },
+        {
+          id: "011AD",
+          name: "部件D",
+          num: 7
+        }
+      ]
+    };
+  },
+  methods: {
+    createHot() { //创建表格实例
+      let options = {
+        data: data,
+        colHeaders: headers,
+        manualColumnResize: true,
+        manualColumnMove: true,
+        maxRows: maxRow,
+        height: height,
+        columnSorting: true, //添加排序
+        sortIndicator: true, //添加排序
+        renderAllRows: true,
+        autoColumnSize: true,
+        fixedRowsTop: 1,
+        language: "zh-CN",
+        contextMenu: {
+          items: {
+            remove_row: {
+              name: "删除部件"
+            }
+          }
+        },
+        // customBorders: customBorders,
+        columns: this.getType(headerArr),
+        afterOnCellMouseDown: this.tableDown, //鼠标单击
+        afterChange: this.tdChange, //修改后
+        afterRemoveRow: this.romoveFm, //右键删除
+        dropdownMenu: [
+          "filter_by_condition",
+          "filter_by_value",
+          "filter_action_bar"
+        ],
+        filters: true,
+        afterFilter: this.trimmedRows,
+        afterDocumentKeyDown: this.afterDocumentKeyDown
+      };
+      console.log(options, variableNum);
+      this.myHotArr[variableNum] = new Handsontable(partsTable, options);
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"])
+  }
+};
+</script>
+
+<style lang="less" scoped>
+</style>