Browse Source

Merge remote-tracking branch 'origin/dataType' into dataType

onlyh 3 years ago
parent
commit
bb1a3eec55

+ 6 - 6
src/api/scan/httpUtil.js

@@ -53,14 +53,14 @@ function downFile(blob, fileName) {
 export default {
   getJson: function (url, data, success, failed, err) {
     let ProjectId = store.state.layout.projectId ? store.state.layout.projectId : localStorage.getItem("projectId");
-    let userName = storage.get("user_name")
-    let group_code = localStorage.getItem("group_code")
+    let userName = store.state.layout.userInfo.userName ? store.state.layout.userInfo.userName : storage.get("user_name");
+    let group_code = store.state.layout.group_code ? store.state.layout.group_code : localStorage.getItem("group_code");
     let vm = this;
     fetch({
       url: url,
       method: 'get',
       params: data,
-      headers: {'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName, 'group_code': group_code}
+      headers: {'projectId': ProjectId, 'appId': 'adm', 'userId': userName, 'groupCode': group_code}
     }).then((response) => {
       successResponse(vm, response, success, failed)
     }).catch(error => {
@@ -69,15 +69,15 @@ export default {
   },
   postJson: function (url, data, success, failed, err) {
     let ProjectId = store.state.layout.projectId ? store.state.layout.projectId : localStorage.getItem("projectId");
-    let userName = storage.get("user_name")
-    let group_code = localStorage.getItem("group_code")
+    let userName = store.state.layout.userInfo.userName ? store.state.layout.userInfo.userName : storage.get("user_name");
+    let group_code = store.state.layout.group_code ? store.state.layout.group_code : localStorage.getItem("group_code");
 
     let vm = this;
     fetch({
       url: url,
       method: 'post',
       data: data,
-      headers: {'ProjectId': ProjectId, 'Comming': 'adm', 'Account': userName, 'group_code': group_code}
+      headers: {'projectId': ProjectId, 'appId': 'adm', 'userId': userName, 'groupCode': group_code}
     }).then((response) => {
       successResponse(vm, response, success, failed)
     }).catch(error => {

+ 12 - 0
src/api/scan/request.js

@@ -1765,6 +1765,12 @@ export function manageDeleteFloor(param, success) {
   http.postJson(url, param, success)
 }
 
+//建筑楼层管理-删除楼层(该接口有删除失败的原因)
+export function deleteFloorInfo(param, success) {
+	let url = `${baseUrl}${floor}/single/delete`;
+	http.postJson(url, param, success)
+}
+
 //建筑楼层管理-修改楼层
 export function manageUpdateFloor(param, success) {
   let url = `${baseUrl}${floor}/update`;
@@ -2347,6 +2353,12 @@ export function objectDeleteBuild(param, success) {
   http.postJson(url, param, success)
 }
 
+//根据id删除建筑信息(该接口有删除失败的原因)
+export function deleteBuildInfo(param, success) {
+  let url = `${baseUrl}${object}/building/single/delete`
+  http.postJson(url, param, success)
+}
+
 // 查询记录
 export function problemQuery(param, success) {
   // let url = `${baseUrl}${dataCenter}/problems/query`

+ 6 - 6
src/components/relation/relationShip/Modal/exportExcel.vue

@@ -207,9 +207,9 @@ export default {
 						type: 'primary',
 					}]
 				}
-        this.dialogExport = true
-        this.dialogProcess = true
-
+        this.dialogExport = false;
+        this.dialogProcess = true;
+        this.$emit('upDataTable')
       },
       error(event, file, fileList) {
 				this.activities = [{
@@ -225,9 +225,9 @@ export default {
 					size: 'large',
 					type: 'primary',
         }]
-        this.dialogExport = true
-        this.dialogProcess = true
-
+        this.dialogExport = false;
+        this.dialogProcess = true;
+        this.$emit('upDataTable')
       },
       errBack() {
         this.dialogProcess = false

+ 1 - 1
src/framework/layout/Main.vue

@@ -18,7 +18,7 @@
           <router-view v-if='$route.meta.keepAlive' class='page-content'></router-view>
         </keep-alive>
         <router-view v-if='!$route.meta.keepAlive' class='page-content'></router-view>
-        <div class="version">当前版本: V 3.9.10</div>
+        <div class="version">当前版本: V 3.9.1</div>
       </div>
     </div>
     <!-- <div class='page-footer'>

+ 1 - 1
src/views/ledger/facility/parts/index.vue

@@ -170,7 +170,7 @@ export default {
         pageNumber: this.page.pageNumber,
         pageSize: this.page.PageSize,
         orders: "createTime desc, localName desc, localId desc, id desc",
-        filters: `category='${this.tabVal}';parentId='${this.deviceId}'`
+        filters: `classCode='${this.tabVal}';parentId='${this.deviceId}'`
       };
       await getEquipPartsCon(params, res => {
         this.tableData = res.content;

+ 6 - 9
src/views/ready/buildfloor/index.vue

@@ -85,7 +85,7 @@
       <div>确定要删除该{{ delText }}?</div>
       <span class="dialog-footer" slot="footer">
         <el-button @click="delDialogVis=false" size="small">取消</el-button>
-        <el-button @click="confirmDel" size="small" type="primary" :disabled="buildDisabled">确认</el-button>
+        <el-button @click="confirmDel" size="small" type="primary">确认</el-button>
       </span>
     </el-dialog>
     <!-- 添加贯通关系弹窗 -->
@@ -103,8 +103,10 @@ import {
   buildingQueryAndCount,
   floorQueryAndSign,
   manageDeleteFloor,
-  objectCreateBuild,
   objectDeleteBuild,
+  deleteFloorInfo,
+  deleteBuildInfo,
+  objectCreateBuild,
   objectQueryBuild,
   objectUpdateBuild
 } from "@/api/scan/request";
@@ -122,7 +124,6 @@ export default {
       floorTitle: "添加楼层",
       buildTitle: "添加建筑",
       delDialogVis: false,
-      buildDisabled: false,
       delText: "建筑",
       headerStyle: {
         backgroundColor: "#d9d9d9",
@@ -313,27 +314,23 @@ export default {
     },
     // 确认删除(删除建筑-楼层公用)
     confirmDel() {
-      this.buildDisabled = true
       if (this.delText == "楼层") {
         let delParam = [{ id: this.curFloorId }];
         this.delDialogVis = false;
-        manageDeleteFloor(delParam, res => {
+        deleteFloorInfo(delParam, res => {
           this.$message.success("删除成功");
-          this.buildDisabled = false
           this.init();
         });
       } else {
         // 删除建筑
         if (this.tableData && this.tableData.length) {
-          this.buildDisabled = false
           this.$message.error("当前建筑中包含楼层,不可删除");
           this.delDialogVis = false;
         } else {
           let param = [{ id: this.curBuildId }];
           this.delDialogVis = false;
-          objectDeleteBuild(param, res => {
+          deleteBuildInfo(param, res => {
             this.$message.success("删除成功");
-            this.buildDisabled = false
             this.handleBuildQuery()
             this.init()
           })