Browse Source

合并解决冲突

zhangyu 5 years ago
parent
commit
a47375ae70

+ 1 - 1
package.json

@@ -36,7 +36,7 @@
     "@saga-web/base": "2.1.9",
     "@saga-web/draw": "2.1.61",
     "@saga-web/graphy": "2.1.34",
-    "@saga-web/cad-engine": "2.0.461"
+    "@saga-web/cad-engine": "2.0.491"
   },
   "devDependencies": {
     "ajv": "^6.9.1",

+ 39 - 6
src/components/business_space/business/handsontable.vue

@@ -29,6 +29,8 @@
     </div> -->
     <!-- 二维码弹窗 -->
     <qrcode :dialog="dialog" :qrcodeUrl="qrcodeUrl" :addBody="true" ref="qrcode"></qrcode>
+    <!--      上传图片-->
+    <upload-img-dialog :read="onlyRead" @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog" />
   </div>
 </template>
 <script>
@@ -45,6 +47,7 @@ import Handsontable from "handsontable-pro"
 import buildFloor from '@/utils/handsontable/buildFloorData'
 import 'handsontable-pro/dist/handsontable.full.css'
 import zhCN from 'handsontable-pro/languages/zh-CN';
+import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
 import qrcode from "@/components/ledger/lib/qrcode";
 import { queryZone, updateZone, deleteZone, createZone, BeatchQueryParam, updateRelateInSpAndBuild } from "@/api/scan/request";
 import { mapGetters, mapActions } from "vuex";
@@ -56,7 +59,8 @@ export default {
   components: {
     qrcode, //二维码页面
     myPagination,
-    addBusiness
+    addBusiness,
+    uploadImgDialog
   },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId"]),
@@ -101,7 +105,11 @@ export default {
       filtersArr: [], //表格数据被过滤后的下标
       copyMain: [], //深拷贝数组
       buildFloorData: [], //楼层数据
-      zoneItemID: ''
+      zoneItemID: '',
+      myDialog: {
+        uploadImgs: false, //上传图片弹窗
+      },
+      imgsArr: [], //空间图片
     };
   },
   created() {
@@ -214,7 +222,7 @@ export default {
           "filter_by_value",
           "filter_action_bar"
         ],
-        contextMenu: this.onlyRead ? false :{
+        contextMenu: this.onlyRead ? false : {
           items: {
             remove_row: {
               name: "删除该业务空间"
@@ -260,7 +268,8 @@ export default {
     },
     getInfors(infos, row) {
       let val = this.hot.colToProp(row.col);
-      lStorage.set('screen_data', {path: this.$route.path, data: {RoomID: infos.RoomID, zone: this.zoneCode}})
+      this.row = row.row;
+      lStorage.set('screen_data', { path: this.$route.path, data: { RoomID: infos.RoomID, zone: this.zoneCode } })
       if (val == "point") {
         let query = {
           RoomID: infos.RoomID,
@@ -279,6 +288,12 @@ export default {
         } else {
           this.$message("此设备没有设备二维码")
         }
+      } else if (val == "Pic") {
+        let Picdata = tools.dataForKey(this.main[row.row], val);
+        this.imgsArr = Picdata ? Picdata : [];
+        if (!this.onlyRead || this.imgsArr.length) {
+          this.myDialog.uploadImgs = true;
+        }
       } else {
         return false;
       }
@@ -439,7 +454,6 @@ export default {
           this.$message.success('修改成功')
         })
       } else {
-        param.data.Projection = []
         updateZone(param, (res) => { })
       }
     },
@@ -633,7 +647,26 @@ export default {
     handleCurrentChange(val) {
       this.page.pageNumber = val
       this.getData()
-    }
+    },
+    //上传图片弹窗触发事件
+    imgChange(keys) {
+      this.setDataToMain(keys, 'Pic', this.row);
+    },
+    //判断是否有值,有值赋值
+    setDataToMain(data, key, row) {
+      if (!!data && data != '--') {
+        if (!!this.main[row]) {
+          tools.setDataForKey(this.main[row], key, data);
+          this.tdChange([[row, key, null, data]], "edit");
+        } else {
+          this.main[row] = {};
+          tools.setDataForKey(this.main[row], key, data);
+        }
+      } else {
+        tools.setDataForKey(this.main[row], key, "");
+      }
+      this.hot.render()
+    },
   },
   watch: {
     projectId() {

+ 4 - 2
src/components/business_space/lib/uploadImgsName.vue

@@ -12,7 +12,8 @@
           <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>
+        <p v-if="readOnly" >{{item.Name}}</p>
+        <form-input v-else :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">
@@ -24,7 +25,8 @@
             controls="controls"
           >您的浏览器不支持 video 标签。</video>
         </div>
-        <form-input :label="''" @change="getName" :keys="index" :value="item.Name" :width="10"></form-input>
+        <p v-if="readOnly" >{{item.Name}}</p>
+        <form-input v-else :label="''" @change="getName" :keys="index" :value="item.Name" :width="10"></form-input>
       </div>
       <div v-if="!readOnly" style="float:left;">
         <el-upload

+ 1 - 0
src/components/business_space/newGraphy/graphy.vue

@@ -395,6 +395,7 @@ export default {
     // 取消(所有取消公用)
     cancelGraphy() {
       this.init(2);
+      this.$emit('copyID', '')
     },
     // 批量创建业务空间弹窗
     handleCommand(command) {

+ 1 - 1
src/components/config_point/dictionaryCascader.vue

@@ -77,7 +77,7 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-.cascader-container {
+.cascader-container.el-form-item--small.el-form-item {
   margin-bottom: 0;
   /deep/ .el-cascader {
     width: 89%;

+ 6 - 6
src/components/config_point/step3_edit/index.vue

@@ -12,19 +12,19 @@
         </li>
         <li>
           <span>对象类型</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.KeyEquipmentType || '--'}}</span>
+          <span :title="editData.Point.KeyEquipmentType || '--'">{{editData.Point.KeyEquipmentType || '--'}}</span>
         </li>
         <li>
           <span>对象参数</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.KeyEquipmentParameter || '--'}}</span>
+          <span :title="editData.Point.KeyEquipmentParameter || '--'">{{editData.Point.KeyEquipmentParameter || '--'}}</span>
         </li>
         <li>
           <span>值/单位说明</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.ValueDescription || '--'}}</span>
+          <span :title="editData.Point.ValueDescription || '--'">{{editData.Point.ValueDescription || '--'}}</span>
         </li>
         <li>
           <span>备注</span>&nbsp;&nbsp;&nbsp;
-          <span>{{editData.Point.Remarks || '--'}}</span>
+          <span :title="editData.Point.Remarks || '--'">{{editData.Point.Remarks || '--'}}</span>
         </li>
       </ul>
     </div>
@@ -625,9 +625,9 @@ export default {
       }
       span:nth-of-type(2) {
         width: calc(100% - 120px);
-        white-space:nowrap;
-        overflow:hidden;
+        overflow: hidden;
         text-overflow:ellipsis;
+        white-space: nowrap;
       }
     }
   }

+ 4 - 4
src/components/config_point/step3_point/3_temps.vue

@@ -21,7 +21,7 @@
           <p class="content-view p10">{{delDataSource(unitObj.DataSource)}}</p>
         </div>
       </div>
-      <div class="center">
+      <div class="center" style="margin-top:20px;">
         <el-button @click="next">下一步</el-button>
       </div>
     </div>
@@ -49,7 +49,7 @@
         <formula-handle :devFlag="false" ref='formulaHandle' v-else-if='form2.DataRuleType == "需按公式转换"'></formula-handle>
         <!-- <split-handle :devFlag="false" ref='splitHandle' v-else-if='form2.DataRuleType == "需按拆分枚举转换"'></split-handle> -->
       </el-form>
-      <div class="center">
+      <div class="center" style="margin-top:20px;">
         <el-button @click="undo">上一步</el-button>
         <el-button @click="next">下一步</el-button>
       </div>
@@ -64,7 +64,7 @@
       <div v-if="pages.total>pages.size" class="right">
         <pagination :page="pages" @change="changePage"></pagination>
       </div>
-      <div class="center">
+      <div class="center" style="margin-top:20px;">
         <el-button @click="undo">上一步</el-button>
         <el-button v-show="renderData.length" @click="save">保存</el-button>
       </div>
@@ -701,7 +701,7 @@ export default {
     }
   }
   .collapse-item {
-    height: 290px;
+    height: 328px;
     overflow-y: auto;
   }
 }

+ 2 - 2
src/components/ledger/report/datafan.vue

@@ -6,7 +6,7 @@
       </el-tooltip>
     </div>
     <div class="doughnut-view">
-      <fan-chart v-if="renderData.needCountO" type="type" width="200" height="200" :name="renderData.title" :renderData="echartsData" :id="id">
+      <fan-chart v-if="renderData.needCountO" type="type" width="200" height="200" :name="renderData.title" :renderData="renderData.needCountO" :id="id">
       </fan-chart>
     </div>
     <slot></slot>
@@ -79,4 +79,4 @@ export default {
     box-sizing: border-box;
   }
 }
-</style>
+</style>

+ 93 - 74
src/components/ledger/report/dataorigin.vue

@@ -1,101 +1,120 @@
 <template>
-  <div class="saga-fill">
+  <div :class="filterClass ? 'saga-fill reset-fill':'saga-fill'">
     <div class="mess-view">
       <el-tooltip class="item" effect="dark" :content="renderData.tips" placement="bottom-start">
-        <i class="el-icon-info"><span>{{renderData.title}}</span></i>
+        <i :class="renderData.title ? 'el-icon-info':''"><span>{{renderData.title}}</span></i>
       </el-tooltip>
     </div>
     <div class="doughnut-view">
-      <report-doughnut v-if="renderData.needCountO || renderData.needCountT" type="type" width="200" height="200" :sum="renderData.sum"
-        :name="renderData.title" :renderData="echartsData" :id="id" :text="renderData.text">
+      <report-doughnut
+          v-if="renderData.needCountO || renderData.needCountT"
+          type="type"
+          width="200"
+          height="200"
+          :sum="renderData.sum"
+          :name="renderData.title"
+          :renderData="echartsData"
+          :id="id"
+          :text="renderData.text">
       </report-doughnut>
     </div>
+    <p style="text-align: center">{{renderData.val}}</p>
     <slot></slot>
   </div>
 </template>
 
 <script>
-import reportDoughnut from "@/components/echarts/reportDoughnut"
-export default {
-  name: "dataOrgin",
-  components: {
-    reportDoughnut
-  },
-  props: {
-    id: {
-      type: String,
-      default: function createRandomId() {
-        return (Math.random() * 10000000).toString(16).substr(0, 4) + '-' + (new Date()).getTime() + '-' + Math.random().toString().substr(2, 5);
-      }
-    },
-    renderData: {
-      type: Object,
-      default: function () {
-        return {
+  import reportDoughnut from "@/components/echarts/reportDoughnut"
 
+  export default {
+    name: "dataOrgin",
+    components: {
+      reportDoughnut
+    },
+    props: {
+      id: {
+        type: String,
+        default: function createRandomId() {
+          return (Math.random() * 10000000).toString(16).substr(0, 4) + '-' + (new Date()).getTime() + '-' + Math.random().toString().substr(2, 5);
         }
+      },
+      renderData: {
+        type: Object,
+        default: function () {
+          return {}
+        }
+      },
+      filterClass: String
+    },
+    data() {
+      return {
+        echartsData: []
       }
-    }
-  },
-  data() {
-    return {
-      echartsData: []
-    }
-  },
-  created() {
-    this.changeData()
-  },
-  mounted() { },
-  methods: {
-    changeData() {
-      this.echartsData = [
-        {
-          name: this.renderData.contentValueO + this.renderData.needCountO,
-          value: this.renderData.needCountO
-        },
-        {
-          name: this.renderData.contentValueT + this.renderData.needCountT,
-          value: this.renderData.needCountT
-        },
-      ]
-    }
-  },
-  watch: {
-    renderData: {
-      deep: true,
-      handler: function () {
-        this.changeData()
+    },
+    created() {
+      this.changeData()
+    },
+    mounted() {
+    },
+    methods: {
+      changeData() {
+        this.echartsData = [
+          {
+            name: this.renderData.contentValueO + this.renderData.needCountO,
+            value: this.renderData.needCountO
+          },
+          {
+            name: this.renderData.contentValueT + this.renderData.needCountT,
+            value: this.renderData.needCountT
+          },
+        ]
+      }
+    },
+    watch: {
+      renderData: {
+        deep: true,
+        handler: function () {
+          this.changeData()
+        }
       }
     }
   }
-}
 </script>
 
 <style lang="less" scoped>
-.mess-view {
-  box-sizing: border-box;
-  border-bottom: 1px solid #ddd;
-  padding: 10px 20px 10px 15px;
-  .saga-title {
-    font-size: 14px;
-    color: #333;
-    font-weight: 600;
-    line-height: 14px;
+
+  .mess-view {
+    box-sizing: border-box;
+    border-bottom: 1px solid #ddd;
+    padding: 10px 20px 10px 15px;
+
+    .saga-title {
+      font-size: 14px;
+      color: #333;
+      font-weight: 600;
+      line-height: 14px;
+    }
+
+    i {
+      span {
+        padding-left: 6px;
+      }
+    }
   }
-  i {
-    span {
-      padding-left: 6px;
+
+  .saga-fill {
+    width: 345px;
+    // height: 220px;
+    .doughnut-view {
+      height: 165px;
+      width: 100%;
+      padding: 0 5px;
+      box-sizing: border-box;
     }
   }
-}
-.saga-fill {
-  width: 345px;
-  // height: 220px;
-  .doughnut-view {
-    height: 165px;
-    width: 100%;
-    padding: 0 5px;
-    box-sizing: border-box;
+  .reset-fill{
+    background: #fff;
+    width: 353px;
+
   }
-}
 </style>

+ 1 - 1
src/views/data_admin/buildGraphy/graphyTabs.vue

@@ -315,7 +315,7 @@ export default {
       this.videoPic = [];
       this.elsePic = [];
       imgArr.map((item, index) => {
-        switch (item.name) {
+        switch (item.Name) {
           case "安装位置":
             this.installPic.push(item);
             break;

+ 1 - 0
src/views/data_admin/buildTask/addTask/addModelTask.vue

@@ -83,6 +83,7 @@ export default {
         this.modelFolderName = item.label
         let data = {
           FolderId: val,
+          Status: '4',
           ProjectId: this.projectId
         };
         request.queryFloorList(data, res => {

File diff suppressed because it is too large
+ 750 - 583
src/views/ledger/report/index.vue


+ 10 - 29
src/views/ready/collectsetting/index.vue

@@ -107,7 +107,7 @@
         </div>
         <!--/锚点-->
         <div v-else class="center" style="margin-top:260px;">
-          <i class="icon-wushuju iconfont"></i> 请选择设备族
+          <i class="icon-wushuju iconfont"></i> 请先选择左侧分类
         </div>
       </div>
     </main>
@@ -133,7 +133,8 @@
     getDataDictionary,
     queryFamilyAll,
     queryPhysicsAllType,
-    setDataDictionary
+    setDataDictionary,
+    queryDictionaryHead
   } from "@/api/scan/request";
   import {mapGetters} from "vuex";
 
@@ -601,35 +602,15 @@
             this.familySort()
           })
         } else if (this.value == "space") {
-          getBussTypes(res => {
+          queryDictionaryHead({Filters: "parentId = 'Space';Code != 'Ispace'"}, res => {
             this.isLoading = false
-            //   this.allFamily = res.Content;
-            this.allFamily = [{
-              "code": "GeneralZone",
-              "name": "默认分区",
-              "rel_type": "99"
-            },
-              {
-                "name": "供电分区",
-                "rel_type": "1",
-                "code": "PowerSupplyZone"
-              },
-              {
-                "name": "照明分区",
-                "rel_type": "2",
-                "code": "LightingZone"
-              },
-              {
-                "name": "空调分区",
-                "rel_type": "4",
-                "code": "AirConditioningZone"
-              },
-              {
-                "code": "TenantZone",
-                "name": "租户分区",
-                "rel_type": "10"
+            this.allFamily = res.Content.map(item => {
+              return {
+                "code": item.Code,
+                "name": item.Name
               }
-            ]
+            })
+            console.log(this.allFamily)
             this.familySort();
           })
         } else if (this.value == "tenant") {