Explorar o código

‘添加模型数据’

zhangyu %!s(int64=4) %!d(string=hai) anos
pai
achega
121e136fbb

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

@@ -27,6 +27,12 @@
                     ></i>
                 </template>
             </el-table-column> -->
+            <el-table-column prop="OriginalName" label="模型文件名" width="240" align="center"></el-table-column>
+            <el-table-column label="模型文件大小" align="center">
+                <template slot-scope="scope">
+                    <span>{{ scope.row.Size | sizeFilter }}</span>
+                </template>
+            </el-table-column>
             <el-table-column prop="AcceptTime" label="时间" width="240" align="center"></el-table-column>
             <el-table-column prop="UserName" label="上传人"></el-table-column>
             <el-table-column prop="address" align="center" label="操作" width="240">
@@ -84,6 +90,11 @@ import { UserModule } from "@/store/modules/user";
 import { ElTable } from "element-ui/types/table";
 @Component({
     name: "FloorTable",
+    filters: {
+        sizeFilter: (size: number): string => {
+            return `${(size / 1024 / 1024).toFixed()}M`
+        }
+    },
     components: {},
 })
 export default class extends Vue {

+ 22 - 2
src/views/project/index.vue

@@ -7,7 +7,19 @@
             <el-button style="float: right" @click="addProject">添加项目</el-button>
         </el-row>
         <div class="saga-brand-group">
-            <ul class="saga-brand-list">
+            <el-row :gutter="12">
+                <el-col :span="6" v-for="item in projectList" :key="item.id">
+                    <el-card shadow="always" :body-style="{ padding: '0px' }">
+                        <el-image style="width: 100%; height: 187px" src="https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png" :fit="fit"></el-image>
+                        <div style="padding: 14px">
+                            <div class="bottom clearfix">
+                                <time class="time">{{ item.name }}</time>
+                            </div>
+                        </div>
+                    </el-card>
+                </el-col>
+            </el-row>
+            <!-- <ul class="saga-brand-list">
                 <li
                     class="saga-brand-item"
                     :class="{ 'brand-new': item.new }"
@@ -35,7 +47,7 @@
                 <li class="pick"></li>
                 <li class="pick"></li>
                 <li class="pick"></li>
-            </ul>
+            </ul> -->
         </div>
     </div>
 </template>
@@ -105,8 +117,16 @@ export default class extends Vue {
 
 <style lang="scss" scoped>
 .project-box {
+    height: 100%;
     padding: 0 16px;
     .saga-brand-group {
+        height: calc(100% - 48px);
+        overflow-y: auto;
+        overflow-x: hidden;
+        ::v-deep .el-col {
+            margin-bottom: 12px;
+        }
+
         .saga-brand-list {
             display: flex;
             flex-direction: row;