浏览代码

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-bm-guide into develop

YaolongHan 4 年之前
父节点
当前提交
22f2d38688

+ 1 - 1
package.json

@@ -14,7 +14,7 @@
         "@saga-web/base": "2.1.25",
         "@saga-web/big": "1.0.107",
         "@saga-web/draw": "2.1.106",
-        "@saga-web/feng-map": "1.0.38",
+        "@saga-web/feng-map": "1.0.39",
         "@saga-web/graph": "2.1.123",
         "ant-design-vue": "^1.4.10",
         "axios": "^0.19.2",

+ 16 - 12
src/utils/ganttChart/GanttChart_day.js

@@ -499,20 +499,24 @@ GanttChartDay.prototype.drawTasks = function() {
                         tempTaskContainerEl.setZIndex(1)
                         tempTaskContainerEl._pdata = taskP
                         tempTaskContainerEl.on('mouseenter', (ev) => {
-                            tempTaskContainerEl.attr({ fill: '#F5F6F7' })
-                            tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
-                                if (_tempTask._rectEl) {
-                                    _tempTask._rectEl.setZIndex(5)
-                                }
-                            })
+                            if (taskP.parentNode.open) {
+                                tempTaskContainerEl.attr({ fill: '#F5F6F7' })
+                                tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
+                                    if (_tempTask._rectEl) {
+                                        _tempTask._rectEl.setZIndex(5)
+                                    }
+                                })
+                            }
                         })
                         tempTaskContainerEl.on('mouseleave', (ev) => {
-                            tempTaskContainerEl.attr({ fill: '#fff' })
-                            tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
-                                if (_tempTask._rectEl) {
-                                    _tempTask._rectEl.setZIndex(5)
-                                }
-                            })
+                            if (taskP.parentNode.open) {
+                                tempTaskContainerEl.attr({ fill: '#fff' })
+                                tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
+                                    if (_tempTask._rectEl) {
+                                        _tempTask._rectEl.setZIndex(5)
+                                    }
+                                })
+                            }
                         })
                         taskP._containerEl = tempTaskContainerEl
                     }

+ 20 - 16
src/utils/ganttChart/GanttChart_month.js

@@ -357,10 +357,10 @@ GanttChartMonth.prototype.handleClick = function(task, flag, ev) {
         // document.getElementById('detailTaskStatus').textContent = task._pdata.status
         // document.getElementById('detailTaskStartDate').textContent = task._pdata.startDate
         // document.getElementById('detailTaskEndDate').textContent = task._pdata.endDate
-        console.log('show:', task)
+        // console.log('show:', task)
     } else if (flag === 'leave') {
         // detailDiv.style.display = 'none'
-        console.log('hide:', task)
+        // console.log('hide:', task)
     } else {
         this.callback(task)
         console.log('click:', task)
@@ -507,20 +507,24 @@ GanttChartMonth.prototype.drawTasks = function() {
                         tempTaskContainerEl.setZIndex(1)
                         tempTaskContainerEl._pdata = taskP
                         tempTaskContainerEl.on('mouseenter', (ev) => {
-                            tempTaskContainerEl.attr({ fill: '#F5F6F7' })
-                            tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
-                                if (_tempTask._rectEl) {
-                                    _tempTask._rectEl.setZIndex(5)
-                                }
-                            })
+                            if (taskP.parentNode.open) {
+                                tempTaskContainerEl.attr({ fill: '#F5F6F7' })
+                                tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
+                                    if (_tempTask._rectEl) {
+                                        _tempTask._rectEl.setZIndex(5)
+                                    }
+                                })
+                            }
                         })
                         tempTaskContainerEl.on('mouseleave', (ev) => {
-                            tempTaskContainerEl.attr({ fill: '#fff' })
-                            tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
-                                if (_tempTask._rectEl) {
-                                    _tempTask._rectEl.setZIndex(5)
-                                }
-                            })
+                            if (taskP.parentNode.open) {
+                                tempTaskContainerEl.attr({ fill: '#fff' })
+                                tempTaskContainerEl._pdata.tasks.forEach((_tempTask) => {
+                                    if (_tempTask._rectEl) {
+                                        _tempTask._rectEl.setZIndex(5)
+                                    }
+                                })
+                            }
                         })
                         taskP._containerEl = tempTaskContainerEl
                     }
@@ -546,10 +550,10 @@ GanttChartMonth.prototype.drawTasks = function() {
                             rectEl._pdata = _taskItem
                             _taskItem._rectEl = rectEl
                             rectEl.on('mouseover', (ev) => {
-                                this.handleClick(ev.target, 'enter', ev)
+                                // this.handleClick(ev.target, 'enter', ev)
                             })
                             rectEl.on('mouseleave', (ev) => {
-                                this.handleClick(ev.target, 'leave', ev)
+                                // this.handleClick(ev.target, 'leave', ev)
                             })
                             rectEl.on('click', (ev) => {
                                 this.handleClick(ev.target, 'click', ev)

+ 2 - 2
src/views/analysis/CoreDeviceReport.vue

@@ -109,7 +109,7 @@
               <span
                 style="color: #025BAA"
                 @click="showPicturesDetail(scope.row, 'his')"
-              >{{ scope.row.photosNum || scope.row.photosNum === 0?(scope.row.photosNum + '张') : '—' }}</span>
+              >{{ scope.row.photosNum?(scope.row.photosNum + '张') : '—' }}</span>
               <!-- <span style="color: #025BAA" @click="showPicturesDetail(scope.row)">1张</span> -->
             </template>
           </el-table-column>
@@ -537,7 +537,7 @@ export default {
      */
     getDetailData(val, type) {
       let param = {
-        // assetnum: this.assetnum,
+        assetnum: this.assetnum,
         plazaId: this.plazaId,
         file_type: type === 'equip'?val.file_type : val.type,
         // file_type: 0,

+ 9 - 4
src/views/analysis/GanttChart.vue

@@ -153,6 +153,7 @@ export default {
   data() {
     return {
       plazaId: 1000423, // 广场id
+      // assetnum: null, // 设备台账编码
       systemList: [], // 系统列表
       systemId: "", // 系统名称
       legends: [
@@ -356,18 +357,21 @@ export default {
           this.treeData = newData;
 
           let taskData = _.map(_.cloneDeep(newData), item => {
-            return {
+            let parentNode = {
               id: item.id,
               type: item.name,
               open: item.open,
+            };
+            return Object.assign(parentNode, {
               dataList: _.map(item.children, _item => {
                 return {
+                  parentNode,
                   id: _item.id,
                   title: _item.name,
                   tasks: _item.originData
                 };
               })
-            };
+            })
           });
           console.log("taskData", taskData);
           if (!window.gc) {
@@ -516,6 +520,7 @@ export default {
         file_type_id: id,
         // file_type_id: 9886,
         type: type,
+        // assetnum: this.assetnum,
       };
       queryDetailData("/data/base/queryFileDetails", param).then(res => {
         console.log("photo", res);
@@ -668,9 +673,9 @@ export default {
       padding-right: 8px;
       // width: 58px;
       height: 24px;
-      background: rgba(91, 143, 249, 0.2);
+      // background: rgba(91, 143, 249, 0.2);
       border-radius: 2px;
-      color: #5b8ff9;
+      // color: #5b8ff9;
       line-height: 24px;
       text-align: center;
     }

+ 4 - 1
src/views/legendLibrary/index.vue

@@ -54,7 +54,7 @@
                         :returnParentNode='false'
                         :choseArea='true'
                         :data='deviceList'
-                        :lastStage='true'
+                        :lastStage='false'
                         @change='treeConfirmDevice'
                     />
                 </span>
@@ -652,6 +652,9 @@ export default {
 }
 </style>
 <style lang="less">
+.p-tree-svg {
+    margin-top: 3px !important;
+}
 @media screen and (max-height: 800px) {
     .legend-library-bottom {
         overflow-y: auto;