|
@@ -86,7 +86,7 @@
|
|
|
|
|
|
<!-- 上传 模具0 时 -->
|
|
<!-- 上传 模具0 时 -->
|
|
<el-dropdown trigger="click" style="float: right;" v-show="activeTab == 0 && update == 1">
|
|
<el-dropdown trigger="click" style="float: right;" v-show="activeTab == 0 && update == 1">
|
|
- <el-button size="mini" type="primary" :loading="uploading[0]">
|
|
|
|
|
|
+ <el-button size="mini" type="primary" :loading="uploading">
|
|
上传
|
|
上传
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
</el-button>
|
|
</el-button>
|
|
@@ -134,7 +134,7 @@
|
|
:limit="5"
|
|
:limit="5"
|
|
style="float:right;"
|
|
style="float:right;"
|
|
>
|
|
>
|
|
- <el-button size="mini" type="primary" :loading="uploading[1]">上传</el-button>
|
|
|
|
|
|
+ <el-button size="mini" type="primary" :loading="uploading">上传</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
|
|
|
|
<!-- 更新4 -->
|
|
<!-- 更新4 -->
|
|
@@ -453,7 +453,7 @@
|
|
<div v-if="this.activeFileName != null">
|
|
<div v-if="this.activeFileName != null">
|
|
申请单:<a :href="this.fileUrl" :download="this.activeFileName"><el-link type="primary">{{this.activeFileName}}</el-link></a>
|
|
申请单:<a :href="this.fileUrl" :download="this.activeFileName"><el-link type="primary">{{this.activeFileName}}</el-link></a>
|
|
</div>
|
|
</div>
|
|
- </br>
|
|
|
|
|
|
+ <br>
|
|
<div v-if="this.fileUrl2 != null">
|
|
<div v-if="this.fileUrl2 != null">
|
|
报废单:<a :href="this.fileUrl2" :download="this.fileUrl2Name"><el-link type="primary">{{this.fileUrl2Name}}</el-link></a>
|
|
报废单:<a :href="this.fileUrl2" :download="this.fileUrl2Name"><el-link type="primary">{{this.fileUrl2Name}}</el-link></a>
|
|
</div>
|
|
</div>
|
|
@@ -462,7 +462,7 @@
|
|
<div v-if="this.part2dFile != null">
|
|
<div v-if="this.part2dFile != null">
|
|
2D:<a :href="this.part2dFile.fileUrl" :download="this.part2dFile.fileName"><el-link type="primary">{{this.part2dFile.fileName}}</el-link></a>
|
|
2D:<a :href="this.part2dFile.fileUrl" :download="this.part2dFile.fileName"><el-link type="primary">{{this.part2dFile.fileName}}</el-link></a>
|
|
</div>
|
|
</div>
|
|
- </br>
|
|
|
|
|
|
+ <br>
|
|
<div v-if="this.part2dFile != null">
|
|
<div v-if="this.part2dFile != null">
|
|
3D:<a :href="this.part3dFile.fileUrl" :download="this.part3dFile.fileName"><el-link type="primary">{{this.part3dFile.fileName}}</el-link></a>
|
|
3D:<a :href="this.part3dFile.fileUrl" :download="this.part3dFile.fileName"><el-link type="primary">{{this.part3dFile.fileName}}</el-link></a>
|
|
</div>
|
|
</div>
|
|
@@ -488,7 +488,7 @@
|
|
</el-upload>
|
|
</el-upload>
|
|
</p>
|
|
</p>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
- <el-button @click="discardUpload" :loading="uploading[3]">确定</el-button>
|
|
|
|
|
|
+ <el-button @click="discardUpload" :loading="uploading">确定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
@@ -496,10 +496,10 @@
|
|
<el-dialog title="零件文档上传" v-if="centerDialog4Visible" :visible.sync="centerDialog4Visible" width="450px" :before-close="clearFileRecord2">
|
|
<el-dialog title="零件文档上传" v-if="centerDialog4Visible" :visible.sync="centerDialog4Visible" width="450px" :before-close="clearFileRecord2">
|
|
<p style="color:#ccc;">文件命名规则:零件编号+2D/3D 如 LJ001+2D.dwg</p>
|
|
<p style="color:#ccc;">文件命名规则:零件编号+2D/3D 如 LJ001+2D.dwg</p>
|
|
<el-upload ref="upload4" action="uploadFile" :http-request="uploadPartFile" :show-file-list="true" :before-remove="beforeRemove" multiple>
|
|
<el-upload ref="upload4" action="uploadFile" :http-request="uploadPartFile" :show-file-list="true" :before-remove="beforeRemove" multiple>
|
|
- <el-button size="small" type="primary" :loading="uploading[2]">上传</el-button>
|
|
|
|
|
|
+ <el-button size="small" type="primary" :loading="uploading">上传</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
- <el-button @click="uploadFilePart">确定</el-button>
|
|
|
|
|
|
+ <el-button @click="uploadFilePart" :loading="uploading">确定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
@@ -602,7 +602,7 @@
|
|
name: "",
|
|
name: "",
|
|
life: ""
|
|
life: ""
|
|
},
|
|
},
|
|
- uploading:[false, false, false, false],
|
|
|
|
|
|
+ uploading: false,
|
|
editParts: {
|
|
editParts: {
|
|
id: 0,
|
|
id: 0,
|
|
number: "",
|
|
number: "",
|
|
@@ -1088,6 +1088,7 @@
|
|
|
|
|
|
//文件上传
|
|
//文件上传
|
|
uploadFile(params) {
|
|
uploadFile(params) {
|
|
|
|
+ this.uploading = true;
|
|
var fileObj = params.file;
|
|
var fileObj = params.file;
|
|
var form = new FormData();
|
|
var form = new FormData();
|
|
form.append("file", fileObj);
|
|
form.append("file", fileObj);
|
|
@@ -1111,12 +1112,14 @@
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ this.uploading = false;
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
this.$message({
|
|
this.$message({
|
|
message: error,
|
|
message: error,
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
|
|
+ this.uploading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1336,6 +1339,7 @@
|
|
},
|
|
},
|
|
|
|
|
|
uploadFilePart() {
|
|
uploadFilePart() {
|
|
|
|
+ this.uploading = true;
|
|
var fileObj = this.files;
|
|
var fileObj = this.files;
|
|
var form = new FormData();
|
|
var form = new FormData();
|
|
for(var i in fileObj){
|
|
for(var i in fileObj){
|
|
@@ -1358,6 +1362,7 @@
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ this.uploading = false;
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
this.centerDialog4Visible = false;
|
|
this.centerDialog4Visible = false;
|
|
@@ -1365,12 +1370,14 @@
|
|
message: error,
|
|
message: error,
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
|
|
+ this.uploading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
//报废文件上传
|
|
//报废文件上传
|
|
discardUpload() {
|
|
discardUpload() {
|
|
if (this.files2[0] != null && this.files2[1] != null) {
|
|
if (this.files2[0] != null && this.files2[1] != null) {
|
|
|
|
+ this.uploading = true;
|
|
var form = new FormData();
|
|
var form = new FormData();
|
|
form.append("file", this.files2[0]);
|
|
form.append("file", this.files2[0]);
|
|
form.append("file2", this.files2[1]);
|
|
form.append("file2", this.files2[1]);
|
|
@@ -1395,12 +1402,14 @@
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
+ this.uploading = false;
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
this.$message({
|
|
this.$message({
|
|
message: error,
|
|
message: error,
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
|
|
+ this.uploading = false;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
console.log(this.files2);
|
|
console.log(this.files2);
|