Commit c8c7293e by Thews

20231219wangwansu

1 parent f77c23bb
......@@ -247,5 +247,9 @@ export function getDocPoolList(params) {
}
// 新建总体架构资产文档
export function getDocPoolAdd(params) {
return download('/kl-doc-pool/cDocPool', params);
return post('/kl-doc-pool/cDocPool', params);
}
// 总体架构资产文档导出
export function getDocPoolExcel(params) {
return download('/excel/etDp', params);
}
\ No newline at end of file
......@@ -38,7 +38,7 @@
</div>
<div class="search_btn">
<el-button type="primary" size="medium" icon="el-icon-document-add" @click="operate('add')">新建</el-button>
<el-button type="primary" size="medium" icon="el-icon-plus">导出</el-button>
<el-button type="primary" size="medium" icon="el-icon-plus" @click="exportFile">导出</el-button>
</div>
<!-- <el-table :height="tableHeight" @selection-change="select_table_rows" v-loading="loading" :data="tableData" stripe border> -->
<el-table :height="tableHeight" v-loading="loading" :data="tableData" stripe border>
......@@ -109,6 +109,7 @@ import {
getDocPoolList,
getDocPoolAdd,
getDianXingAnLiSelectData,
getDocPoolExcel,
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
......@@ -244,13 +245,14 @@ export default {
});
}else{
// 新建保存
getTypicalExampleAdd(this.formData).then(res => {
getDocPoolAdd(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
console.log(res);
this.$message.error(res.msg);
}
});
......@@ -313,6 +315,17 @@ export default {
startTime: '',
}
},
// 导出
exportFile() {
getDocPoolExcel(this.params).then(res => {
let blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' });
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
document.body.appendChild(link);
link.click();
})
},
getFileTypeSelect() {//案例类型下拉
const params = {
......
......@@ -141,8 +141,6 @@
<script>
import {
getDianXingAnLiSelectData,
exportFileDianXingAnLiSelectData,
getTypicalExampleList,
getTypicalExampleAdd,
getTypicalExampleUpdate,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!