|
@@ -107,6 +107,7 @@
|
|
|
<script>
|
|
|
import { mapGetters } from "vuex";
|
|
|
import request from "@/api/model/file.js";
|
|
|
+import Bus from '@/utils/bus.js'
|
|
|
import dasBoard from "@/views/dasboard/index";
|
|
|
import modelLog from "@/components/model/file/modelLog"; //模型日志弹窗
|
|
|
import repliceModel from "@/components/model/file/replaceModelDialog"; //替换模型弹窗
|
|
@@ -261,40 +262,42 @@ export default {
|
|
|
* @param currentFolderId 当前选择的文件夹id
|
|
|
*/
|
|
|
queryFloorFile(currentFolderId) {
|
|
|
- let data = {
|
|
|
- FolderId: currentFolderId,
|
|
|
- ProjectId: this.projectId
|
|
|
- };
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
- request.queryFloorList(data, res => {
|
|
|
- res.Content.map(item => {
|
|
|
- /**
|
|
|
- * @info: 状态显示说明
|
|
|
- * 0: 上传中(上传的用户可操作:中止)
|
|
|
- * 1: 等待检查
|
|
|
- * 10: 模型检查中
|
|
|
- * 11: 未通过检查
|
|
|
- * 2、20、21: 正常(所有用户可操作:下载、查看历史)
|
|
|
- * 3、31、4: 正常(所有用户可操作:下载、替换、查看历史)
|
|
|
- */
|
|
|
- if (item.Status == 2 || item.Status == 20 || item.Status == 21 || item.Status == 3 || item.Status == 31 || item.Status == 4) {
|
|
|
- Object.assign(item, { isDown: false, precent: 0 });
|
|
|
- } else {
|
|
|
- Object.assign(item, { isDown: true, precent: 100 });
|
|
|
- if (this.persentList.length != 0) {
|
|
|
- this.persentList.forEach(pItem => {
|
|
|
- if (item.Id == pItem.Id) {
|
|
|
- Object.assign(item, { isDown: true, precent: pItem.precent?pItem.precent:0 });
|
|
|
- }
|
|
|
- });
|
|
|
+ if(currentFolderId){
|
|
|
+ let data = {
|
|
|
+ FolderId: currentFolderId,
|
|
|
+ ProjectId: this.projectId
|
|
|
+ };
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ request.queryFloorList(data, res => {
|
|
|
+ res.Content.map(item => {
|
|
|
+ /**
|
|
|
+ * @info: 状态显示说明
|
|
|
+ * 0: 上传中(上传的用户可操作:中止)
|
|
|
+ * 1: 等待检查
|
|
|
+ * 10: 模型检查中
|
|
|
+ * 11: 未通过检查
|
|
|
+ * 2、20、21: 正常(所有用户可操作:下载、查看历史)
|
|
|
+ * 3、31、4: 正常(所有用户可操作:下载、替换、查看历史)
|
|
|
+ */
|
|
|
+ if (item.Status == 2 || item.Status == 20 || item.Status == 21 || item.Status == 3 || item.Status == 31 || item.Status == 4) {
|
|
|
+ Object.assign(item, { isDown: false, precent: 0 });
|
|
|
+ } else {
|
|
|
+ Object.assign(item, { isDown: true, precent: 100 });
|
|
|
+ if (this.persentList.length != 0) {
|
|
|
+ this.persentList.forEach(pItem => {
|
|
|
+ if (item.Id == pItem.Id) {
|
|
|
+ Object.assign(item, { isDown: true, precent: pItem.precent?pItem.precent:0 });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
+ });
|
|
|
+ this.tableData = res.Content;
|
|
|
+ this.loading = false;
|
|
|
+ resolve();
|
|
|
});
|
|
|
- this.tableData = res.Content;
|
|
|
- this.loading = false;
|
|
|
- resolve();
|
|
|
});
|
|
|
- });
|
|
|
+ }
|
|
|
},
|
|
|
//添加楼层文件
|
|
|
addFloorFile() {
|
|
@@ -553,6 +556,9 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.queryModel();
|
|
|
+ Bus.$on('modelStatusChange', message => {
|
|
|
+ this.queryFloorFile(this.currentFolderId);
|
|
|
+ })
|
|
|
// 十秒刷新次楼层列表
|
|
|
// setInterval(()=>{
|
|
|
// this.queryFloorFile(this.currentFolderId)
|