Commit c8c7293e by Thews

20231219wangwansu

1 parent f77c23bb
...@@ -247,5 +247,9 @@ export function getDocPoolList(params) { ...@@ -247,5 +247,9 @@ export function getDocPoolList(params) {
} }
// 新建总体架构资产文档 // 新建总体架构资产文档
export function getDocPoolAdd(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 @@ ...@@ -38,7 +38,7 @@
</div> </div>
<div class="search_btn"> <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-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> </div>
<!-- <el-table :height="tableHeight" @selection-change="select_table_rows" v-loading="loading" :data="tableData" stripe border> --> <!-- <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> <el-table :height="tableHeight" v-loading="loading" :data="tableData" stripe border>
...@@ -109,6 +109,7 @@ import { ...@@ -109,6 +109,7 @@ import {
getDocPoolList, getDocPoolList,
getDocPoolAdd, getDocPoolAdd,
getDianXingAnLiSelectData, getDianXingAnLiSelectData,
getDocPoolExcel,
} from '@/api/index.js'; } from '@/api/index.js';
import { MessageBox, Message } from 'element-ui'; import { MessageBox, Message } from 'element-ui';
import $ from 'jquery'; import $ from 'jquery';
...@@ -244,13 +245,14 @@ export default { ...@@ -244,13 +245,14 @@ export default {
}); });
}else{ }else{
// 新建保存 // 新建保存
getTypicalExampleAdd(this.formData).then(res => { getDocPoolAdd(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success("保存成功"); this.$message.success("保存成功");
this.add_dialog = false; this.add_dialog = false;
this.getList(); this.getList();
}else{ }else{
this.add_dialog = false; this.add_dialog = false;
console.log(res);
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}); });
...@@ -313,6 +315,17 @@ export default { ...@@ -313,6 +315,17 @@ export default {
startTime: '', 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() {//案例类型下拉 getFileTypeSelect() {//案例类型下拉
const params = { const params = {
......
...@@ -141,8 +141,6 @@ ...@@ -141,8 +141,6 @@
<script> <script>
import { import {
getDianXingAnLiSelectData, getDianXingAnLiSelectData,
exportFileDianXingAnLiSelectData,
getTypicalExampleList, getTypicalExampleList,
getTypicalExampleAdd, getTypicalExampleAdd,
getTypicalExampleUpdate, getTypicalExampleUpdate,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!