Преглед изворни кода

Merge branch 'dev' of http://39.106.8.246:3003/web/ibms into dev

 Conflicts:
	src/views/ready/collectsetting/index.vue
shaun-sheep пре 5 година
родитељ
комит
d25402e58c

+ 2 - 0
src/components/business_space/business/handsontable.vue

@@ -115,6 +115,7 @@ export default {
     getHeader(headers, buildFloorSelectd) {
       this.headers = headers
       this.buildFloorSelectd = buildFloorSelectd
+      this.page.pageNumber = 1
       this.getData()
     },
     getData() {
@@ -612,6 +613,7 @@ export default {
     //切换每页显示多少条数据
     handleSizeChange(val) {
       this.page.pageSize = val
+      this.page.pageNumber = 1
       this.getData()
     },
     //切换页数

+ 6 - 3
src/components/business_space/newGraphy/graphy.vue

@@ -141,6 +141,7 @@ export default {
       isAction: false,
       curOutline: [],
       BIMIDToSID: {}, //bimid映射元空间id
+      BIMIDToSIName: {}, //bimid映射元空间名称
       curZoneItem: {}, //当前选中的业务空间item
       allUnRelatISP: [], //
       zoneList: [], // 业务空间-canvas图中
@@ -203,8 +204,10 @@ export default {
       }
       queryZone(pa, res => {
         this.BIMIDToSID = {}
+        this.BIMIDToSIName = {}
         res.Content.map(t => {
           this.BIMIDToSID[t.BIMID.split(":")[1]] = t.RoomID;
+          this.BIMIDToSIName[t.BIMID.split(":")[1]] = t.RoomLocalName || t.RoomName;
         })
       })
     },
@@ -461,7 +464,7 @@ export default {
       if (arr.length) {
         let tempArr = [];
         arr.map(t => {
-          tempArr.push(t.data.Name);
+          tempArr.push(this.BIMIDToSIName[t.data.SourceId]);
         })
         this.$refs.createBSP.showDialog(tempArr.toString());
       } else {
@@ -639,7 +642,7 @@ export default {
         spaces = arr.map(t => {
           return {
             IspaceId: this.BIMIDToSID[t.data.SourceId],
-            RoomLocalName: t.data.Name,
+            RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
             Outline: outlines[t.data.SourceId],
             BuildingId: this.buildFloor[0],
             FloorId: this.buildFloor[1],
@@ -650,7 +653,7 @@ export default {
         spaces = arr.map(t => {
           return {
             IspaceId: this.BIMIDToSID[t.data.SourceId],
-            RoomLocalName: t.data.Name,
+            RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
             Outline: [t.data.OutLine],
             BuildingId: this.buildFloor[0],
             FloorId: this.buildFloor[1],

+ 3 - 1
src/components/data_admin/buildTask/table/assetsTable.vue

@@ -50,7 +50,7 @@ export default {
     assetsDetail
   },
   computed: {
-    ...mapGetters("layout", ["projectId"])
+    ...mapGetters("layout", ["projectId", "userInfo"])
   },
   props: {
     paramsData: Object,
@@ -157,6 +157,8 @@ export default {
     handleConfirm(index, row){
       let params = {
         Content: [{
+          ConfirmingPersonId: this.userInfo.userId,
+          ConfirmingPersonName: this.userInfo.userName,
           TaskId: row.TaskId,
           TaskState: 0
         }]

+ 3 - 1
src/components/data_admin/buildTask/table/deviceTable.vue

@@ -59,7 +59,7 @@ export default {
     deviceDetail
   },
   computed: {
-    ...mapGetters("layout", ["projectId"])
+    ...mapGetters("layout", ["projectId", "userInfo"])
   },
   props: {
     paramsData: Object,
@@ -185,6 +185,8 @@ export default {
     handleConfirm(index, row){
       let params = {
         Content: [{
+          ConfirmingPersonId: this.userInfo.userId,
+          ConfirmingPersonName: this.userInfo.userName,
           TaskId: row.TaskId,
           TaskState: 0
         }]

+ 3 - 1
src/components/data_admin/buildTask/table/modelTable.vue

@@ -53,7 +53,7 @@ export default {
     deviceDetail
   },
   computed: {
-    ...mapGetters("layout", ["projectId"])
+    ...mapGetters("layout", ["projectId", "userInfo"])
   },
   props: {
     paramsData: Object,
@@ -175,6 +175,8 @@ export default {
     handleConfirm(index, row){
       let params = {
         Content: [{
+          ConfirmingPersonId: this.userInfo.userId,
+          ConfirmingPersonName: this.userInfo.userName,
           TaskId: row.TaskId,
           TaskState: 0
         }]

+ 19 - 3
src/components/globaluploader/index.vue

@@ -2,7 +2,7 @@
  * @Author: zhangyu
  * @Date: 2019-11-28 10:05:28
  * @Info: 
- * @LastEditTime: 2019-12-16 15:30:27
+ * @LastEditTime : 2019-12-19 15:55:18
  -->
 <template>
   <div id="global-uploader">
@@ -16,6 +16,7 @@
         @file-success="onFileSuccess"
         @file-progress="onFileProgress"
         @file-error="onFileError"
+        @file-removed="onFileRemoved"
         class="uploader-app">
       <uploader-unsupport></uploader-unsupport>
 
@@ -72,7 +73,7 @@ export default {
         target: '/image-service/common/multipart_upload',
         chunkSize: 1*1024*1024,
         fileParameterName: 'file',
-        maxChunkRetries: 5,
+        maxChunkRetries: 3,
         testChunks: false,   //是否开启服务器分片校验
         // 服务器分片校验函数,秒传及断点续传基础
         // checkChunkUploadedByResponse: function (chunk, message) {
@@ -122,7 +123,7 @@ export default {
               })
               this.uploader.addFile(file)
               this.setUploaderList(this.uploader.files.map(item => {
-                item.modelId = item.file.modelId?item.file.modelId:''
+                item.modelId = item.file.modelId?item.file.modelId:'';
                 return item
               }))
             } else {
@@ -206,6 +207,18 @@ export default {
         type: 'error'
       })
     },
+    onFileRemoved(file) {
+      this.uploaderList.splice(this.uploaderList.findIndex(item => {
+        return item.id == file.id;
+      },1))
+      this.setUploaderList(this.uploaderList);
+      if(file.modelId && !file.isComplete()) {
+        request.deleteModelFileList(file.modelId, res => {
+          console.log('删除错误模型:',file.modelId);
+          Bus.$emit('modelStatusChange')
+        })
+      }
+    },
 
     /**
      * 计算md5,实现断点续传及秒传
@@ -446,6 +459,9 @@ export default {
       > li {
         background-color: #fff;
       }
+      /deep/ .uploader-file-info i{
+        display: none;
+      }
       /deep/ .status_style{
         position: absolute;
         top: 0;

+ 15 - 11
src/components/ledger/lib/system.vue

@@ -2,7 +2,7 @@
   <div id="cascaderMap">
     <span class="buildFloor" style="padding-right: 12px;">所属专业系统类型</span>
     <el-select v-model="value" placeholder="请选择" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
-      <el-option  v-for="item in options" :key="item.Category" :label="item.CategoryName" :value="item.Category"></el-option>
+      <el-option v-for="item in options" :key="item.Category" :label="item.CategoryName" :value="item.Category"></el-option>
     </el-select>
     <!-- <el-cascader placeholder="请选择" :options="options" v-model="value" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"
       @change="changeVal" change-on-select></el-cascader> -->
@@ -18,8 +18,8 @@ export default {
       type: Boolean,
       default: true
     },
-    all:{
-      default:false
+    all: {
+      default: false
     }
   },
   computed: {
@@ -36,20 +36,24 @@ export default {
     };
   },
   created() {
-    if(this.all){
-      //物理世界所有系统
-      this.getAllData();
-    }else{
-      //当前项目下已有的系统
-      this.getData();
-    }
+    this.init()
   },
   watch: {
     projectId() {
       this.value = ''
+      this.init()
     }
   },
   methods: {
+    init() {
+      if (this.all) {
+        //物理世界所有系统
+        this.getAllData();
+      } else {
+        //当前项目下已有的系统
+        this.getData();
+      }
+    },
     setValue(val) {
       this.value = val
     },
@@ -80,7 +84,7 @@ export default {
         }
       })
     },
-    getAllData(){
+    getAllData() {
       getEqCode().then(res => {
         this.options = this.changeArr(res.data.Content)
         if (this.value) {

+ 3 - 2
src/components/model/file/floorTable.vue

@@ -114,9 +114,10 @@ export default {
     },
     // 下载模型文件
     downloadModel(item) {
-      if (item.Url) {
+      let url = item.Url.match(/(\/image-service\S*)$/g)?item.Url.match(/(\/image-service\S*)$/g)[0]:''
+      if (url) {
         let a = document.createElement("a");
-        a.href = item.Url;
+        a.href = url;
         a.download = `${this.modelFolderName}${item.FloorName}模型文件v${item.Version}.rvt`;
         a.click();
       } else {

+ 4 - 2
src/components/model/file/modelLog.vue

@@ -3,13 +3,14 @@
   <div id="modelLog">
     <el-dialog title="模型日志" :visible.sync="modelLogVisible" width="40%" :before-close="handleClose">
       <div class="bodys">
+        <el-button v-show="filterlogData.length == 1" class="delete-model" @click="deleteModel(filterlogData[0])"><i class="iconfont icon-delete el-icon--left"></i>删除模型</el-button>
         <el-tabs v-model="activeName" type="card" @tab-click="changeModel">
           <el-tab-pane label="上传日志" name="first">
             <el-table :data="filterlogData" stripe height="300px" style="width: 100%">
               <el-table-column label="版本">
                 <template slot-scope="scope">
                   <span style="margin-right: 5px">{{ scope.row.Version }}</span>
-                  <i v-show="scope.row.Version" class="iconfont icon-warn" style="cursor:pointer;" title="查看版本更新信息" @click="handleClickVersion(scope.row)"></i>
+                  <i v-show="scope.row.Version && scope.row.Status == 4" class="iconfont icon-warn" style="cursor:pointer;" title="查看版本更新信息" @click="handleClickVersion(scope.row)"></i>
                 </template>
               </el-table-column>
               <el-table-column prop="AcceptTime" label="上传时间"></el-table-column>
@@ -73,9 +74,10 @@ export default {
     },
     handleClick(item) {
       console.log(item);
+      let url = item.Url.match(/(\/image-service\S*)$/g)?item.Url.match(/(\/image-service\S*)$/g)[0]:''
       if (item.Url) {
         let a = document.createElement("a");
-        a.href = item.Url;
+        a.href = url;
         a.download =`${this.modelFolderName}${item.FloorName}模型文件v${item.Version}.rvt`;
         a.click();
       } else {