|
@@ -110,7 +110,7 @@
|
|
|
<a :href="scope.row.fileUrl" :download="scope.row.fileName">
|
|
|
<el-button size="small" @click="download(scope.row.id)">下载</el-button>
|
|
|
</a>
|
|
|
- <el-button size="small" type="danger">删除</el-button>
|
|
|
+ <el-button size="small" @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -138,9 +138,10 @@
|
|
|
<el-table-column label="操作" width="300" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
- <el-button size="small">浏览</el-button>
|
|
|
- <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
- <el-button size="small" type="danger">删除</el-button>
|
|
|
+ <a :href="scope.row.fileUrl" :download="scope.row.fileName">
|
|
|
+ <el-button size="small" @click="download(scope.row.id)">下载</el-button>
|
|
|
+ </a>
|
|
|
+ <el-button size="small" @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -168,9 +169,10 @@
|
|
|
<el-table-column label="操作" width="300" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
- <el-button size="small">浏览</el-button>
|
|
|
- <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
- <el-button size="small" type="danger">删除</el-button>
|
|
|
+ <a :href="scope.row.fileUrl" :download="scope.row.fileName">
|
|
|
+ <el-button size="small" @click="download(scope.row.id)">下载</el-button>
|
|
|
+ </a>
|
|
|
+ <el-button size="small" @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -198,9 +200,10 @@
|
|
|
<el-table-column label="操作" width="300" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
- <el-button size="small">浏览</el-button>
|
|
|
- <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
- <el-button size="small" type="danger">删除</el-button>
|
|
|
+ <a :href="scope.row.fileUrl" :download="scope.row.fileName">
|
|
|
+ <el-button size="small" @click="download(scope.row.id)">下载</el-button>
|
|
|
+ </a>
|
|
|
+ <el-button size="small" @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -228,9 +231,10 @@
|
|
|
<el-table-column label="操作" width="300" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
- <el-button size="small">浏览</el-button>
|
|
|
- <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
- <el-button size="small" type="danger">删除</el-button>
|
|
|
+ <a :href="scope.row.fileUrl" :download="scope.row.fileName">
|
|
|
+ <el-button size="small" @click="download(scope.row.id)">下载</el-button>
|
|
|
+ </a>
|
|
|
+ <el-button size="small" @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -258,9 +262,10 @@
|
|
|
<el-table-column label="操作" width="300" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<el-button size="small" @click="checkOpen(scope.row.id, scope.row.fileName)">审批</el-button>
|
|
|
- <el-button size="small">浏览</el-button>
|
|
|
- <el-button size="small" @click="download(scope.row.fileUrl)">下载</el-button>
|
|
|
- <el-button size="small" type="danger">删除</el-button>
|
|
|
+ <a :href="scope.row.fileUrl" :download="scope.row.fileName">
|
|
|
+ <el-button size="small" @click="download(scope.row.id)">下载</el-button>
|
|
|
+ </a>
|
|
|
+ <el-button size="small" @click="deleteFile(scope.row.id)" type="danger">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -410,7 +415,7 @@ export default {
|
|
|
this.activeFileName = name;
|
|
|
this.centerDialogVisible = true;
|
|
|
},
|
|
|
- //审批
|
|
|
+ //审批文件
|
|
|
check(adoption) {
|
|
|
this.http.post(
|
|
|
this.port.mold.moldFileCheck,
|
|
@@ -424,6 +429,7 @@ export default {
|
|
|
message: "审批成功",
|
|
|
type: "success"
|
|
|
});
|
|
|
+ this.getDocument();
|
|
|
} else {
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
@@ -475,6 +481,35 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
);
|
|
|
+ },
|
|
|
+ //文件删除
|
|
|
+ deleteFile(fileId) {
|
|
|
+ this.http.post(
|
|
|
+ this.port.mold.moldFileDelete,
|
|
|
+ {
|
|
|
+ id: fileId
|
|
|
+ },
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: "删除成功",
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.getDocument();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
},
|
|
|
created() {
|