Browse Source

修改建筑楼层

zhangyu 4 years ago
parent
commit
509e409a7b

+ 14 - 4
src/views/manage/build/components/AddFloorDialog/index.vue

@@ -18,11 +18,11 @@
                         <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
                     </el-upload>
                 </el-form-item>
-                <el-form-item label="revit版本:">
+                <!-- <el-form-item label="revit版本:">
                     <el-select v-model="form.revitVersion" placeholder="请选择">
                         <el-option v-for="item in revitVersionList" :key="`revit-${item.value}`" :label="item.label" :value="item.value"></el-option>
                     </el-select>
-                </el-form-item>
+                </el-form-item> -->
                 <el-form-item label="模型所属楼层:">
                     <div class="floorModle">
                         <el-select v-model="form.floorTypeVal" placeholder="请选择">
@@ -43,6 +43,12 @@
                         </el-select>
                     </div>
                 </el-form-item>
+                <el-form-item label="楼层顺序码:">
+                    <el-input-number
+                        :controls="false"
+                        v-model="form.floorSequenceID"
+                    ></el-input-number>
+                </el-form-item>
                 <el-form-item label="备注信息:">
                     <el-input type="textarea" v-model="form.desc"></el-input>
                 </el-form-item>
@@ -107,6 +113,7 @@ export default class extends Vue {
         haveInterlayer: false, //是否有夹层
         file: null, //上传文件
         floorNum: 1, //楼层
+        floorSequenceID: 1, //楼层顺序码
     };
     // 上传楼层列表
     private fileList = [];
@@ -164,6 +171,8 @@ export default class extends Vue {
             this.$message.error("模型文件不能为空!");
         } else if (!this.form.revitVersion) {
             this.$message.error("revit版本不能为空!");
+        } else if (this.form.floorSequenceID === undefined || this.form.floorSequenceID === null) {
+            this.$message.error("楼层顺序码不能为空!");
         } else {
             let FloorName: string | null = null;
             // 根据是否有夹层拼接楼层名
@@ -200,7 +209,7 @@ export default class extends Vue {
                 };
                 const res = await modelFileUpload(data);
                 //  创建成功
-                if (res.ModelId && res.UploadId) {
+                if (res.Result === "success" && res.ModelId && res.UploadId) {
                     this.$emit("uploadModelFile", {
                         modelId: res.ModelId,
                         uploadId: res.UploadId,
@@ -208,7 +217,7 @@ export default class extends Vue {
                     });
                     this.handleClose();
                 } else {
-                    this.$message.info("准备分片上传模型文件接口失败!");
+                    this.$message.info(`准备分片上传模型文件接口失败!失败原因:${res.Message}`);
                 }
             }
         }
@@ -261,6 +270,7 @@ export default class extends Vue {
                 haveInterlayer: false, //是否有夹层
                 file: null, //上传文件
                 floorNum: 1, //楼层
+                floorSequenceID: 1, //楼层顺序码
             };
         }
     }

+ 1 - 1
src/views/manage/build/components/FloorTable/index.vue

@@ -8,7 +8,7 @@
             height="100%"
             :header-cell-style="{ background: '#d9d9d9', color: '#2b2b2b', height: '41px' }"
         >
-            <el-table-column prop="FloorName" align="center" label="楼层本地名" width="100"></el-table-column>
+            <el-table-column prop="localName" align="center" label="楼层本地名" width="100"></el-table-column>
             <el-table-column prop="Version" label="版本号" align="center"></el-table-column>
             <!-- <el-table-column label="版本号">
                 <template slot-scope="scope">

+ 4 - 4
src/views/manage/build/components/RepliceModel/index.vue

@@ -20,11 +20,11 @@
                         <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
                     </el-upload>
                 </el-form-item>
-                <el-form-item label="revit版本:">
+                <!-- <el-form-item label="revit版本:">
                     <el-select v-model="form.revitVersion" placeholder="请选择">
                         <el-option v-for="item in revitVersionList" :key="`revit-${item.value}`" :label="item.label" :value="item.value"></el-option>
                     </el-select>
-                </el-form-item>
+                </el-form-item> -->
                 <el-form-item label="选择模型文件替换原因:">
                     <ul>
                         <li>
@@ -137,7 +137,7 @@ export default class extends Vue {
                 UserId: this.userId,
             };
             const res = await modelFileUpload(data);
-            if (res.UploadId && res.ModelId) {
+            if (res.Result === "success" && res.UploadId && res.ModelId) {
                 this.$emit("uploadModelFile", {
                     modelId: res.ModelId,
                     uploadId: res.UploadId,
@@ -145,7 +145,7 @@ export default class extends Vue {
                 });
                 this.handleClose();
             } else {
-                this.$message.info("准备分片上传模型文件接口失败!");
+                this.$message.info(`准备分片上传模型文件接口失败!失败原因:${res.Message}`);
             }
         }
     }

+ 13 - 17
src/views/manage/build/index.vue

@@ -32,7 +32,7 @@
                                         width="40"
                                         height="40"
                                     ></i>
-                                    <span :title="item.localName">{{ item.localName }}</span>
+                                    <span :title="item.Name">{{ item.Name }}</span>
                                 </li>
                             </el-scrollbar>
                         </ul>
@@ -113,8 +113,7 @@
 <script lang="ts">
 import { Vue, Component, Watch } from "vue-property-decorator";
 import { UserModule } from "@/store/modules/user";
-import { queryFloorList, queryModel } from "@/api/modelapi";
-import { buildingQuery, floorQuery } from "@/api/datacenter";
+import { queryModel, queryFloorList } from "@/api/modelapi";
 import Bus from "@/utils/bus";
 import FloorTable from "./components/FloorTable/index.vue"; //右侧list表
 import AddFloorDialog from "./components/AddFloorDialog/index.vue"; //新增楼层弹窗
@@ -161,8 +160,8 @@ export default class extends Vue {
      */
     private openFolder(index: number, item: any): void {
         this.choiceIndex = index + 1;
-        this.currentFolderId = item.id;
-        this.currentFolderName = item.localName;
+        this.currentFolderId = item.Id;
+        this.currentFolderName = item.Name;
         // 获取模型文件夹对应得楼层文件
         this.queryFloorFile(this.currentFolderId);
     }
@@ -194,15 +193,14 @@ export default class extends Vue {
     private async queryModel(): Promise<void> {
         this.navigationBuild = [];
         this.loading = true;
-        const res = await buildingQuery({ Orders: "Name asc" });
-        // const res = await queryModel({ Orders: "Name asc" });
-        this.navigationBuild = res.content;
+        const res = await queryModel({ Orders: "Name asc" });
+        this.navigationBuild = res.Content;
         this.loading = false;
         if (this.navigationBuild.length) {
             //默认选择第一个文件夹
             this.choiceIndex = 1;
-            this.currentFolderName = this.navigationBuild[0].localName;
-            this.currentFolderId = this.navigationBuild[0].id;
+            this.currentFolderName = this.navigationBuild[0].Name;
+            this.currentFolderId = this.navigationBuild[0].Id;
             this.queryFloorFile(this.currentFolderId);
         } else {
             this.tableData = [];
@@ -227,14 +225,12 @@ export default class extends Vue {
             this.tableData = [];
             this.tableLoading = true;
             let params = {
-                filters: `buildingId='${currentFolderId}'`,
-                pageNumber: 1,
-                pageSize: 1000,
+                Filters: `FolderId='${currentFolderId}'`,
+                PageNumber: 1,
+                PageSize: 1000,
             };
-            const res = await floorQuery(params);
-            debugger
-            // const res = await queryFloorList(params);
-            this.tableData = res.content;
+            const res = await queryFloorList(params);
+            this.tableData = res.Content;
             this.tableLoading = false;
         }
     }

+ 164 - 14
src/views/project/index.vue

@@ -1,12 +1,42 @@
 <template>
-    <div>
-        <p>用户信息接口userinfo:</p>
-        <p>name:{{ name }}</p>
-        <p>
-            roles:
-            <span v-for="role in roles" :key="role">{{ role }}</span>
-        </p>
-
+    <div class="project-box">
+        <el-row style="padding-bottom: 16px">
+            <el-input placeholder="请输入关键字" style="width: 240px" clearable @keyup.enter.native="ChangeKeyWord(keyWord)" v-model="keyWord">
+                <i slot="prefix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="ChangeKeyWord(keyWord)"></i>
+            </el-input>
+            <el-button style="float: right" @click="addProject">添加项目</el-button>
+        </el-row>
+        <div class="saga-brand-group">
+            <ul class="saga-brand-list">
+                <li
+                    class="saga-brand-item"
+                    :class="{ 'brand-new': item.new }"
+                    v-for="item in projectList"
+                    :key="item.id"
+                    :title="item.name"
+                    @click="handleClickBrand(item)"
+                >
+                    <div class="saga-brand-name">
+                        <p class="saga-brand-zhName">{{ item.name }}</p>
+                        <p class="saga-brand-enName" :title="item.name">{{ item.name }}</p>
+                    </div>
+                    <div class="saga-brand-logo">
+                        <el-image
+                            style="width: 52px; height: 52px"
+                            :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.logo}`"
+                            fit="fill"
+                        >
+                            <div slot="error" class="image-slot">
+                                <img src="@/assets/404-images/404.png" alt="" style="width: 100%" />
+                            </div>
+                        </el-image>
+                    </div>
+                </li>
+                <li class="pick"></li>
+                <li class="pick"></li>
+                <li class="pick"></li>
+            </ul>
+        </div>
     </div>
 </template>
 
@@ -14,20 +44,140 @@
 import { Component, Vue } from "vue-property-decorator";
 import { UserModule } from "../../store/modules/user";
 
-
 @Component({
     name: "index",
 })
 export default class extends Vue {
-    get name() {
-        return UserModule.name;
+    private keyWord = "";
+    private projectList: any = [
+        {
+            id: "1",
+            name: "龙岗万达",
+            logo: "",
+        },
+        {
+            id: "2",
+            name: "龙岗万达",
+            logo: "",
+        },
+        {
+            id: "3",
+            name: "龙岗万达",
+            logo: "",
+        },
+        {
+            id: "4",
+            name: "龙岗万达",
+            logo: "",
+        },
+        {
+            id: "5",
+            name: "龙岗万达",
+            logo: "",
+        },
+        {
+            id: "6",
+            name: "龙岗万达",
+            logo: "",
+        },
+    ];
+
+    get projectId() {
+        return UserModule.projectId;
     }
 
-    get roles() {
-        return UserModule.roles;
+    /**
+     * 检索项目
+     * @param 检索关键字
+     */
+    private ChangeKeyWord(keyWord: string) {
+        console.log(keyWord);
+    }
+
+    /**
+     * 添加项目
+     */
+    private addProject() {
+        console.log("添加项目");
     }
 }
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
+.project-box {
+    padding: 0 16px;
+    .saga-brand-group {
+        .saga-brand-list {
+            display: flex;
+            flex-direction: row;
+            flex-wrap: wrap;
+            justify-content: space-between;
+            .saga-brand-item {
+                width: 380px;
+                height: 247px;
+                // margin-right: 17px;
+                margin-bottom: 16px;
+                cursor: pointer;
+                box-sizing: border-box;
+                background-color: #fff;
+                border-radius: 4px;
+                border: 1px solid #e4e5e7;
+                transition: all 0.1s linear 0.01s;
+                .saga-brand-name {
+                    display: inline-block;
+                    width: 133px;
+                    height: 100%;
+                    margin-right: 5px;
+                    font-size: 14px;
+                    line-height: 22px;
+                    .saga-brand-zhName {
+                        height: 44px;
+                        display: -webkit-box;
+                        -webkit-box-orient: vertical;
+                        -webkit-line-clamp: 2;
+                        overflow: hidden;
+                    }
+                    .saga-brand-enName {
+                        color: #8d9399;
+                        margin-top: 4px;
+                        height: 22px;
+                        overflow: hidden;
+                        white-space: nowrap;
+                        text-overflow: ellipsis;
+                    }
+                }
+                .saga-brand-logo {
+                    width: 52px;
+                    height: 52px;
+                    display: inline-block;
+                    vertical-align: top;
+                    ::v-deep .image-slot {
+                        font-size: 30px;
+                        display: flex;
+                        justify-content: center;
+                        align-items: center;
+                        width: 100%;
+                        height: 100%;
+                        background: #f5f7fa;
+                        color: #909399;
+                    }
+                }
+            }
+            .pick {
+                width: 380px;
+                height: 1px;
+            }
+            .saga-brand-item.brand-new {
+                border: 1px solid rgba(58, 141, 222, 0.6);
+            }
+            .saga-brand-item:hover {
+                box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+                transform: translate(0, -5px);
+            }
+            .saga-brand-item:nth-child(4n) {
+                margin-right: 0;
+            }
+        }
+    }
+}
 </style>

+ 2 - 2
vue.config.js

@@ -33,14 +33,14 @@ module.exports = {
                 changeOrigin: true
             },
             "/modelapi": {
-                target: "http://39.102.40.239:8080",
+                target: "http://192.168.64.17:28890",
                 changeOrigin: true,
                 pathRewrite: {
                     "^/modelapi": "/revit-algorithm"
                 }
             },
             "/message-center": {
-                target: "http://39.102.40.239:8080",
+                target: "http://192.168.64.17:28890",
                 changeOrigin: true
             },
             "/image-service": {