Browse Source

三轮测试问题修改

zhangyu 3 years ago
parent
commit
ac0963b378

+ 1 - 1
config/index.js

@@ -10,7 +10,7 @@ module.exports = {
     // Paths
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
-    proxyTable: proxyTable["14"],
+    proxyTable: proxyTable["18"],
 
     // Various Dev Server settings
     host: '0.0.0.0', // can be overwritten by process.env.HOST

+ 7 - 0
src/api/relation/api.js

@@ -17,6 +17,13 @@ export function graphicNumber(param, success) {
 
 }
 
+// 查询总览数量-根据类型查询关系数量
+export function graphicTypeNumber(param, success) {
+  let url = `${baseUrl}${graphicUrl}/type/query-count?type=${param.type}`
+  httpUtil.postJson(url, {}, success)
+
+}
+
 //导入excel
 export function graphicUpload(param, success) {
   let url = `${baseUrl}${graphicUrl}/import`

+ 10 - 1
src/components/ready/buildfloor/formItems.vue

@@ -146,6 +146,15 @@ export default {
         callback();
       }
     };
+    let validateFloor = (rule, value, callback) => {
+        let floorSequenceID = this.form["infos.floorSequenceID"];
+        console.log(floorSequenceID);
+        if (!floorSequenceID) {
+        return callback(new Error("请输入楼层顺序号"));
+      } else {
+        callback();
+      }
+    };
     // }
     return {
       form: {},
@@ -158,7 +167,7 @@ export default {
           { required: true, message: "请输入楼层本地名称", trigger: "blur" },
         ],
         floorSequenceID: [
-          { required: true, message: "请输入楼层顺序号", trigger: "blur" },
+          { validator: validateFloor, required: true, trigger: "blur" },
         ],
       },
     };

+ 4 - 3
src/components/relation/overview/CardList.vue

@@ -171,6 +171,7 @@
       :TableVisibleMoreLoading="TableVisibleMoreLoading"
       @openComputed="openComputed"
       @RelationType="RelationType"
+      @calcSpecialUpdate="calcSpecialUpdate"
     />
   </div>
 
@@ -234,7 +235,9 @@ export default {
     RelationType() {
       // this.cardDisabled = true
       this.$emit('RelationType', this.isComputed.relationType, this.isComputed.zoneType, this.isComputed)
-
+    },
+    calcSpecialUpdate(params) {
+        this.$emit("calcSpecialUpdate", params, this.isComputed);
     },
     computed(relation) {
       this.isComputed = relation // 当前要计算的对象
@@ -249,8 +252,6 @@ export default {
         } else {
           this.values.autoComputed = `根据现有数据自动计算 <${ relation.relationTypeName }>`
           this.$refs.maintain.dialogTableVisible = true
-
-
         }
       } else {
         this.$message.warning("设计中")

+ 1 - 21
src/components/relation/overview/Modal/RelationMaintain.vue

@@ -513,32 +513,12 @@ export default {
       })
     },
     computedUpdate() {
-      // if (!this.resultOrigin.length && !this.ops.length) {
-      //   this.$message({
-      //     showClose: true,
-      //     message: '请选择源端设备类',
-      //     type: 'warning'
-      //   });
-      //   return false
-      // } else {
-      //   if (this.resultOrigin.length || this.resultEnd.length) {
-      //     this.resultOrigin.push(...this.resultEnd)
-      //     this.$emit('openComputed', this.resultOrigin)
-      //   }
-      //   this.dialogTableVisibleMore = false
-      //
-      // }
-      // this.resultOrigin.push(...this.resultEnd)
-      // this.$emit('openComputed', this.resultOrigin)
       this.dialogTableVisibleMore = false
       let params = {
         projectId: this.projectId,
         relationType: this.isComputed.relationType
       }
-      calcSpecial(params, res => {
-        this.$message.success('计算成功')
-      })
-
+      this.$emit("calcSpecialUpdate", params);
     },
   }
 }

+ 20 - 1
src/components/relation/relationShip/Modal/exportExcel.vue

@@ -9,7 +9,7 @@
         <el-col :span="8">
           <p>
             <i class="iconfont icon-doc-line"/>
-            {{values.currentNum}}{{length}}
+            {{values.currentNum}}{{graphicTypeNum}}
           </p>
 
           <a :href="downloadProject('excel')" target="_self">
@@ -92,6 +92,7 @@
 <script>
 import { mapGetters } from 'vuex'
 import storage from '@/framework/utils/storage'
+import { graphicTypeNumber } from "@/api/relation/api";
 
 export default {
   name: "exportExcel",
@@ -101,6 +102,7 @@ export default {
       // relationCount:localStorage.getItem('count'),
       dialogExport: false,
       dialogProcess: false,
+      graphicTypeNum: 0,
       activities: [{
         content: '数据文件处理中..',
         size: 'large',
@@ -134,6 +136,16 @@ export default {
     },
   },
   methods: {
+      getGraphicTypeNum() {
+        const params = {
+            type: this.dataId.relType
+        }
+        graphicTypeNumber(params, res => {
+            if (res.content && res.content.length) {
+                this.graphicTypeNum = res.content[0] && res.content[0].count || 0;
+            }
+        })
+      },
       downloadProject(str) {
         let relType = localStorage.getItem('RelationType') != '' ? `&relType=${localStorage.getItem('RelationType')}` : '';
         let zoneType = localStorage.getItem('ZoneType') != '' ? `&zoneType=${localStorage.getItem('ZoneType')}` : '';
@@ -168,6 +180,13 @@ export default {
         this.$emit('upDataTable')
       },
 
+    },
+    watch: {
+        dialogExport(val) {
+            if(val) {
+                this.getGraphicTypeNum();
+            }
+        }
     }
   }
 </script>

+ 1 - 1
src/framework/layout/layout-store.js

@@ -26,7 +26,7 @@ export default {
     },
     projectId: '',
     group_code: '',
-    projects: project["14"],
+    projects: project["18"],
     breadcrumb: [],
     uploaderList: [], //当前上传文件列表
     secret: "saga123456", //项目密码

+ 7 - 7
src/router/system.js

@@ -801,18 +801,18 @@ export default [{
   },
   //数据同步日志
   {
-		path: '/',
+	path: '/',
     name: 'LayoutMain',
     component: LayoutMain,
 		children: [
 			{
 				path: 'synclog',
-        name: 'synclog',
-        component: syncLog,
-        meta: {
-          keepAlive: false,
-          breadcrumbs: [{label: '数据同步日志', path: '/synclog'}]
-        }
+				name: 'synclog',
+				component: syncLog,
+				meta: {
+					keepAlive: false,
+					breadcrumbs: [{label: '数据同步日志', path: '/synclog'}]
+				}
 			}
 		]
   }

+ 0 - 1
src/views/data_admin/buildAssets/report.vue

@@ -42,7 +42,6 @@
             this.$router.push({path: '/floor/abnormalprop'})
         }
     }
-
   }
 </script>
 

+ 5 - 4
src/views/model/report/deleted.vue

@@ -13,7 +13,7 @@
           <input id="copyContent" type="text" @dblclick="copyContent" style="border:none;opacity:0;position:absolute;top:0;left:0;">
           <!-- <p style="margin-top:30px;">Revit族:{{item.BIMFamilyName}}</p> -->
           <p>设计图纸中编码:{{item.cadId || '--'}}</p>
-          <p><span>设备类型:{{item.codeName || '--'}}</span></p>
+          <p><span>设备类型:{{item.equipCategory && item.equipCategory.name || '--'}}</span></p>
           <p>设备ID:{{item.id}}</p>
           <!-- <p><span v-if="item.Property && item.Property.FamilyName">资产族:{{item.Property.FamilyName.Name}}</span><span
               v-if="item.PropertyId">关联的资产ID:{{item.PropertyId}}</span></p> -->
@@ -166,7 +166,7 @@ export default {
       let params = {
         orders: "createTime desc ,id asc",
         filters: `modelId in ${this.equipComDelList}`,
-        cascade: [{ name: "scanTaskBase" }],
+        cascade: [{ name: "scanTaskBase" }, { name: "equipCategory"}],
         pageNumber: this.page.pageNumber,
         pageSize: this.page.pageSize
       }
@@ -306,8 +306,9 @@ export default {
           }
         }
         .copy {
-          color: #409eff;
-          margin-left: 20px;
+            cursor: pointer;
+            color: #409eff;
+            margin-left: 20px;
         }
       }
       .plan {

+ 12 - 14
src/views/model/report/index.vue

@@ -160,9 +160,9 @@
               </div>
             </template>
           </el-table>
-          <el-pagination class="right" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNumber"
+          <!-- <el-pagination class="right" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNumber"
                          :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total">
-          </el-pagination>
+          </el-pagination> -->
         </div>
       </div>
     </div>
@@ -194,12 +194,12 @@ export default {
         color: '#2b2b2b',
         lineHeight: '30px'
       },
-      page: {
-        pageSize: 50,
-        pageSizes: [10, 20, 50, 100],
-        pageNumber: 1,
-        total: 0
-      },
+    //   page: {
+    //     pageSize: 50,
+    //     pageSizes: [10, 20, 50, 100],
+    //     pageNumber: 1,
+    //     total: 0
+    //   },
       loading: false,
       load: false,
       floorIconType: null,
@@ -279,8 +279,6 @@ export default {
         let params = {
           ProjectId: this.projectId,
           Id: `${this.activeTab}`,
-          PageNumber: this.page.pageNumber,
-          PageSize: this.page.pageSize
         }
         queryReportList(params, res => {
           this.FloorName = res.Content;
@@ -305,7 +303,9 @@ export default {
       getLostModelFloor() {// 获取缺失楼层
         let params = {
           ProjectId: this.projectId,
-          Filters: `FolderId='${this.activeTab}';Status=4`
+          Filters: `FolderId='${this.activeTab}';Status=4`,
+          PageNumber: 1,
+          PageSize: 1000
         }
         queryLostReportList(params, res => {
           this.LostFloorName = res.Content;
@@ -390,7 +390,6 @@ export default {
           } else {
             this.tableData = [];
           }
-          this.page.total = this.tableData.length;
           this.loading = false;
         })
       },
@@ -502,8 +501,7 @@ export default {
     background: white;
 
     .content-box {
-      height: calc(100% - 105px);
-
+      height: calc(100% - 56px);
       .table {
         margin-top: 15px;
       }

+ 3 - 2
src/views/model/report/supplement.vue

@@ -291,8 +291,9 @@ export default {
         }
 
         .copy {
-          color: #409eff;
-          margin-left: 20px;
+            cursor: pointer;
+            color: #409eff;
+            margin-left: 20px;
         }
       }
 

+ 51 - 94
src/views/relation/overview/index.vue

@@ -7,6 +7,7 @@
       @calcSpecial="calcSpecial"
       @openComputed="openComputed"
       @RelationType="RelationType"
+      @calcSpecialUpdate="calcSpecialUpdate"
     />
   </div>
 </template>
@@ -27,58 +28,8 @@ import { mapGetters } from "vuex";
 export default {
   data() {
     return {
-      content: [
-        // {
-        //     GraphTypeId: '3535436',//大分类id
-        //     graphTypeName: '架构从属关系',//大分类名称
-        //     GraphTypeCode: '',//大分类编码
-        //     Note: '',//说明
-        //     ParentId: '',//父id
-        //     childGraphicTypeList: [
-        //         {
-        //             GraphTypeId: '234534543',//图类型id
-        //             graphTypeName: '建筑从属关系',//图类型名称
-        //             GraphTypeCode: 'ksaajdk',//图类型编码
-        //             Note: '显示数字字典excel中的xxx',//说明
-        //             ParentId: '3535436',//父id,GraphTypeId
-        //             relationTypeProjectList: [
-        //                 {
-        //                     Id: '23445433534',
-        //                     RelationTypeName: '项目下的建筑体',//关系类型名称
-        //                     RelationTypeCode: 'Pj2Bd',//关系类型编码
-        //                     GraphicId: 'ksaajdk',//图类型编码
-        //                     Note: '边类型说明(待补充)',//说明
-        //                     ConneObject: '项目→建筑体',//连接对象
-        //                     source: true,//是否需要配置源末端
-        //                     automatic: true,//是否自动计算类型
-        //                     Manual: 2,//123选一个手动计算类型1禁用2提示引导3手动维护
-        //                     Prompting: '【设备台账】,【系统台账】',//提示信息
-        //                     ProjectId: 'Pj1245',//项目id
-        //                     ComputingTime: '2019.12.12 12:00',//null不显示,最后一次自动计算时间
-        //                     ComputationalState: 1,//计算状态
-        //                 },
-        //             ]
-        //         },
-        //     ]
-        // },
-      ],
-      countNumber: [
-        //     {
-        //     "GraphTypeId": "3243215",
-        //     "graphTypeName": "从属关系",
-        //     "GraphTypeCode": "ksaajdk",
-        //     "relationTypeProjectList": [
-        //         {
-        //             "Id": "f3bed766a5ba45868d3a744fb8aaa0c8",
-        //             "RelationTypeName": "项目下的建筑体",
-        //             "RelationTypeCode": "关系类型编码",
-        //             "GraphicCode": "图类型code",
-        //             "ProjectId": "Pj5432532",
-        //             "count": "123"
-        //         },
-        //     ]
-        // }
-      ],
+      content: [],
+      countNumber: [],
       loading: false,
       source: [], //源端数据
       currentRelationTypeName: "", //当前点击卡片的RelationTypeName
@@ -102,30 +53,41 @@ export default {
   methods: {
     init() {
       this.loading = true;
-      // let data = {
-      //     "Cascade": [{
-      //         "Cascade": [{
-      //             "Filters": `projectId = '${this.projectId}'`,
-      //             "Name": "relationTypeProjectList"
-      //         }],
-      //         "Filters": " not parentId isnull",
-      //         "Name": "childGraphicTypeList"
-      //     }],
-      //     "Filters": " parentId isnull ",
-      //     "PageNumber": 1,
-      //     "PageSize": 1000
-      // }
       let dataNumber = {
         projectId: this.projectId
       };
-      graphic(dataNumber, res => {
-        graphicNumber(dataNumber, resCount => {
-          this.countNumber = resCount.content;
-          this.loading = false;
-          this.transform(res.content, this.countNumber);
-          this.content = res.content;
-        });
-      });
+      const promise1 = new Promise((resolve, reject) => {
+        graphic(dataNumber, res => {
+          resolve(res)
+        })
+      })
+      const promise2 = new Promise((resolve, reject) => {
+        graphicNumber(dataNumber, res => {
+          resolve(res)
+        })
+      })
+      Promise.all([promise1, promise2]).then(values => {
+        this.countNumber = values[1].content;
+        this.content = values[0].content;
+        this.transform(this.content, this.countNumber);
+        this.loading = false;
+      })
+    },
+    updateState() {
+        this.loading = true;
+        let dataNumber = {
+            projectId: this.projectId
+        };
+        graphic(dataNumber, res => {
+            if (res.result === "success") {
+                this.content = res.content;
+                this.transform(this.content, this.countNumber);
+                this.loading = false;
+            } else {
+                this.$message.error(res.message);
+                this.loading = false;
+            }
+        })
     },
     transform(list1, list2) {
       let countInfo = {}; // { graphTypeName: { Id: count } }
@@ -173,34 +135,29 @@ export default {
       // todo
       obj.computationalState = 3
       setTimeout(() => {
-        this.init()
+        this.updateState();
       })
     },
+    /**
+     * 计算需更新的关系
+     */
+    calcSpecialUpdate(params, obj) {
+        calcSpecial(params, res => {
+            if (res.result === "failure") {
+                this.$message.success('计算失败')
+            }
+            this.init();
+        })
+        obj.computationalState = 3
+        setTimeout(() => {
+            this.updateState();
+        })
+    },
     statusCard() {
 
     },
     calcSpecial(relation) {
       this.currentRelationTypeName = relation.RelationTypeName;
-      if (relation.source) {
-        //配置云末端
-        // this.TableVisibleMoreLoading = true//会很慢,加loading
-        // let param = {
-        //   BuildingId: '',
-        //   Domain: 'DomainPiping',
-        //   ProjectId: this.projectId,
-        //   SystemName: relation.RelationTypeName
-        // }
-        // calcSpecial(param, res => {
-        //   let data = {
-        //     projectId: this.projectId,
-        //   }
-        //   blockQuery(data, res => {
-        //     //    获取源端数据
-        //     this.TableVisibleMoreLoading = false
-        //     this.source = res.content
-        //   })
-        // })
-      }
     },
 
     openComputed(result) {

+ 1 - 1
src/views/relation/relationShip/index.vue

@@ -279,7 +279,7 @@
         total: 0,
         values: {
           relation_maintenance: '关系维护',
-          optionTips: `请下载最新最新<${localStorage.getItem('RelationTypeName')}>数据进行手动维护`, //请下载最新最新 xxxx 数据进行手动维护
+          optionTips: `请下载最新<${localStorage.getItem('RelationTypeName')}>数据进行手动维护`, //请下载最新最新 xxxx 数据进行手动维护
           currentNum: '当前关系数量:',
           download: '下载模板(含数据)',
           lastTime: `最后更新时间为:${localStorage.getItem('ComputingTime') || ''}`, //最后更新时间为

+ 0 - 8
src/views/synclog/index.vue

@@ -270,14 +270,6 @@ export default {
                 } else {
                     this.$refs.status.style.background = "#4a4a4a";
                 }
-            }, () => {
-                this.loading = false;
-                this.$message({
-                    showClose: true,
-                    message: error,
-                    type: "error",
-                    duration: 3000,
-                });
             });
         },
         // 获取对象类型下拉框