Bladeren bron

添加版本文件信息

zhangyu 5 jaren geleden
bovenliggende
commit
3a4e80a994

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

@@ -14,7 +14,7 @@
       <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="查看版本更新信息"></i>
+          <i v-show="scope.row.Version" 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>
@@ -45,11 +45,16 @@
         </template>
       </el-table-column>
     </el-table>
+    <version-dialog :dialogVisible.sync="dialogVisible" :modelFile="modelFile" ref="addSpaceDialog"></version-dialog>
   </div>
 </template>
 <script>
 import { mapGetters } from "vuex";
+import versionDialog from "@/components/model/file/versionDialog";
 export default {
+  components: {
+    versionDialog
+  },
   props: {
     tableData: Array,
     persentList: Array,
@@ -57,7 +62,9 @@ export default {
   },
   data() {
     return {
-      maxHeight: 0
+      maxHeight: 0,
+      dialogVisible: false,
+      modelFile: null
     };
   },
   computed: {
@@ -68,6 +75,11 @@ export default {
     queryModelLog(item) {
       this.$emit("openModelLog", item);
     },
+    // 查看版本信息
+    handleClickVersion(item) {
+      this.modelFile = item;
+      this.dialogVisible = true;
+    },
     // 替换日志
     repliaceModel(item) {
       if (item.Status != 4 && item.Status != 21) {

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

@@ -9,7 +9,7 @@
               <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="查看版本更新信息"></i>
+                  <i v-show="scope.row.Version" 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>
@@ -27,11 +27,16 @@
         </el-tabs>
       </div>
     </el-dialog>
+    <version-dialog :dialogVisible.sync="dialog" :modelFile="modelFile" ref="addSpaceDialog"></version-dialog>
   </div>
 </template>
 <script>
 import request from "@/api/model/file.js";
+import versionDialog from "@/components/model/file/versionDialog";
 export default {
+  components: {
+    versionDialog
+  },
   props: {
     modelLogVisible: Boolean,
     modelFolderName: String,
@@ -41,7 +46,9 @@ export default {
     return {
       dialogVisible: false, //是否显示该弹窗
       activeName: "first", //默认选择上传日志
-      tableData: [] //列表数据
+      tableData: [], //列表数据
+      dialog: false,
+      modelFile: null,
     };
   },
   computed: {
@@ -56,6 +63,11 @@ export default {
     }
   },
   methods: {
+    // 查看版本信息
+    handleClickVersion(item) {
+      this.modelFile = item;
+      this.dialog = true;
+    },
     handleClose(done) {
       this.$emit("CloseModelLogDia");
     },

+ 54 - 0
src/components/model/file/versionDialog.vue

@@ -0,0 +1,54 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialog" :before-close="handleClose" width="900px" id="">
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="handleClose">取 消</el-button>
+      <el-button size="small" type="primary">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import request from "@/api/model/file.js";
+export default {
+  components: {
+
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"]),
+    dialog() {
+      return this.dialogVisible;
+    }
+  },
+  data() {
+    return {
+      title: "版本文件信息",
+    }
+  },
+  props: {
+    dialogVisible: Boolean,
+    modelFile: Object,
+  },
+  mounted() { },
+  methods: {
+    // 关闭弹窗
+    handleClose() {
+      this.$emit("update:dialogVisible", false);
+    },
+  },
+  watch: {
+    dialogVisible: {
+      handler() {
+        if (this.dialogVisible) {
+          // this.tableData = [];
+          // this.getTableData();
+        }
+      },
+      immediate: true
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+
+</style>