|
@@ -240,7 +240,7 @@ export default {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
request.queryFloorList(data, res => {
|
|
|
res.Content.map(item => {
|
|
|
- Object.assign(item, { isDown: false, precent: 0 });
|
|
|
+ Object.assign(item, { isDown:false, precent: 0 });
|
|
|
});
|
|
|
this.tableData = res.Content;
|
|
|
this.loading = false;
|
|
@@ -273,6 +273,7 @@ export default {
|
|
|
},
|
|
|
// 上传模型文件
|
|
|
uploadModelFIle(data) {
|
|
|
+
|
|
|
// 在列表中添加
|
|
|
this.ceshiList.push({
|
|
|
Id: data.FloorModelId,
|
|
@@ -318,8 +319,9 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
- res => {
|
|
|
- if (res.code === "200") {
|
|
|
+ (val) => {
|
|
|
+ if (val.Result.Result === "success") {
|
|
|
+ this.ceshiList = [];
|
|
|
this.$message({
|
|
|
message: "文件上传成功",
|
|
|
type: "success"
|
|
@@ -331,6 +333,10 @@ export default {
|
|
|
},
|
|
|
//更新模型文件;
|
|
|
updateModelFile(data) {
|
|
|
+ this.ceshiList.push({
|
|
|
+ Id:data.FloorModelId,
|
|
|
+ precent:0
|
|
|
+ })
|
|
|
// 修改isdown得值
|
|
|
this.tableData.map(item => {
|
|
|
if (item.Id == data.FloorModelId) {
|
|
@@ -348,17 +354,23 @@ export default {
|
|
|
total = res.total; //文件大小
|
|
|
this.$nextTick(() => {
|
|
|
let precent = Math.round((loaded / total) * 100);
|
|
|
- this.$refs.floorTable.filterTag(data.FloorModelId, precent);
|
|
|
+ // this.$refs.floorTable.filterTag(data.FloorModelId, precent);
|
|
|
+ this.ceshiList.map(item => {
|
|
|
+ if (item.Id == data.FloorModelId) {
|
|
|
+ item.precent = precent
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
- res => {
|
|
|
- if (res.code === "200") {
|
|
|
- this.$message({
|
|
|
- message: "文件上传成功",
|
|
|
- type: "success"
|
|
|
- });
|
|
|
+ (val) => {
|
|
|
+ if (val.Result.Result === "success") {
|
|
|
+ this.ceshiList = [];
|
|
|
+ this.$message({
|
|
|
+ message: "文件上传成功",
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
);
|
|
|
},
|
|
|
//查看模型日志
|