Commit b6e6f7e1 by Thews

20231219汪皖苏

1 parent 8a58e079
...@@ -237,7 +237,7 @@ export function getTypicalExampleDel(params) { ...@@ -237,7 +237,7 @@ export function getTypicalExampleDel(params) {
} }
// 典型案例导出 // 典型案例导出
export function getTypicalExampleExcel(params) { export function getTypicalExampleExcel(params) {
return post('/excel/etTc', params); return download('/excel/etTc', params);
} }
// 总体架构资产文档库 // 总体架构资产文档库
...@@ -247,5 +247,5 @@ export function getDocPoolList(params) { ...@@ -247,5 +247,5 @@ export function getDocPoolList(params) {
} }
// 新建总体架构资产文档 // 新建总体架构资产文档
export function getDocPoolAdd(params) { export function getDocPoolAdd(params) {
return post('/kl-doc-pool/cDocPool', params); return download('/kl-doc-pool/cDocPool', params);
} }
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">文档类型</span> <span class="search_title">文档类型</span>
<el-select v-model="params.fileType" placeholder="请选择" class="search_item"> <el-select v-model="params.fileType" placeholder="请选择" class="search_item">
<el-option v-for="item in search_select1" :key="item.belongId" :label="item.name" :value="item.belongId"></el-option> <el-option v-for="item in selectData1" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> </el-select>
</div> </div>
<div class="search_menu_item"> <div class="search_menu_item">
...@@ -36,11 +36,12 @@ ...@@ -36,11 +36,12 @@
</div> </div>
</div> </div>
<div class="search_btn"> <div class="search_btn">
<el-button @click="add" type="primary" size="medium" icon="el-icon-document-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">导出</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-column type="selection" width="55" :selectable="selectable"></el-table-column> <el-table :height="tableHeight" v-loading="loading" :data="tableData" stripe border>
<!-- <el-table-column type="selection" width="55" :selectable="selectable"></el-table-column> -->
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column> <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="fileName" label="文档名称" align="center"></el-table-column> <el-table-column prop="fileName" label="文档名称" align="center"></el-table-column>
<el-table-column prop="fileType" label="文档类型" align="center"></el-table-column> <el-table-column prop="fileType" label="文档类型" align="center"></el-table-column>
...@@ -96,8 +97,8 @@ ...@@ -96,8 +97,8 @@
</el-form> </el-form>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button class="greenButton">确定</el-button> <el-button class="greenButton" @click="operate('create')">确定</el-button>
<el-button >取消</el-button> <el-button @click="add_dialog = false">取消</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -105,18 +106,9 @@ ...@@ -105,18 +106,9 @@
<script> <script>
import { import {
query_jia_gou_yuan_su_guan_xi_table,
add_jia_gou_ceng_ci,
query_jia_gou_ceng_ci,
add_jia_gou_gui_shu,
query_jia_gou_gui_shu,
delete_jia_gou_gui_shu,
add_jia_gou_yuan_su,
version_release_jia_gou_gui_shu,
edit_jia_gou_yuan_su,
getDocPoolList, getDocPoolList,
getDocPoolAdd, getDocPoolAdd,
getDianXingAnLiSelectData,
} 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';
...@@ -141,8 +133,32 @@ export default { ...@@ -141,8 +133,32 @@ export default {
query_item3: null, query_item3: null,
query_item4: null, query_item4: null,
loading: false, loading: false,
selectTable: [], selectData1: [
search_select1: [], {
label: "元模型",
value: 1,
},
{
label: "业务架构",
value: 2,
},
{
label: "应用架构",
value: 3,
},
{
label: "数据架构",
value: 4,
},
{
label: "技术架构",
value: 5,
},
{
label: "安全架构",
value: 6,
},
],
params: { params: {
current: 1, current: 1,
pageSize: 10, pageSize: 10,
...@@ -168,6 +184,8 @@ export default { ...@@ -168,6 +184,8 @@ export default {
// 初始化查询列表 // 初始化查询列表
this.getList(); this.getList();
// 获取元素列表
// this.getFileTypeSelect();
}, },
methods: { methods: {
// 查询列表 // 查询列表
...@@ -179,31 +197,130 @@ export default { ...@@ -179,31 +197,130 @@ export default {
} }
}); });
}, },
set_table_height() {//动态设置表格高度 // 重置
const table_container_height = $(".table_container").height(); reset() {
const search_menu_height = $(".search_menu").height(); this.params = {
const search_btn_height = $(".search_btn").outerHeight(true); current: 1,
this.tableHeight = table_container_height - search_menu_height - search_btn_height - 90 + 'px'; pageSize: 10,
}, startTime: "",
selectable(row) {//表格勾选框禁用 endTime: "",
if(row.state == 1) { fileName: "",
return false; // 禁用 fileType: "",
} else { };
return true; //不禁用
}
}, },
select_table_rows(data){//表格的勾选 // 所有操作
this.selectTable = data; operate(type,item){
this.openType = type;
if (type == "add") {
this.add_dialog = true;
this.title = "新建案例";
this.resetForm();
}else if (type == "edit") {
this.add_dialog = true;
this.title = "编辑案例";
this.formData = item;
}else if (type == "create") {
if (this.formData.ktcId) {
// 编辑保存
getTypicalExampleUpdate(this.formData).then(res => {
console.log(this.formData,res);
if (res.code == 200) {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}else{
// 新建保存
getTypicalExampleAdd(this.formData).then(res => {
if (res.code == 200) {
this.$message.success("保存成功");
this.add_dialog = false;
this.getList();
}else{
this.add_dialog = false;
this.$message.error(res.msg);
}
});
}
}else if (type == "del") {
// 删除
this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
let params = {
ids: [item.ktcId],
};
getTypicalExampleDel(params).then(res => {
if (res.code == 200) {
this.$message.success("删除成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}else if (type == "delMultiple") {
if (this.selectList.length <= 0) {
this.$message.error("请选择一项进行删除");
return;
}
let params = {
ids: [],
};
this.selectList.map(item => {
params.ids.push(item.ktcId)
})
this.$confirm("确认批量删除吗", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
getTypicalExampleDel(params).then(res => {
if (res.code == 200) {
this.$message.success("批量删除成功");
this.getList();
}else{
this.$message.error(res.msg);
}
});
}).catch(() => {
});
}
}, },
add() {//新建按钮 // 新建清空表单
this.add_dialog = true; resetForm(){
this.formData = {
tcName: '',
tcType: '',
prjType: '',
buildContent: '',
problemType: '',
problemLevel: '',
problemContent: '',
archiDetail: "",
}
}, },
reset() {//重置
this.query_item1 = null; getFileTypeSelect() {//案例类型下拉
this.query_item3 = null; const params = {
this.query_item4 = null; key: "kl_file_type"
}
getDianXingAnLiSelectData(params).then(res => {
if(res.code == 200) {
this.selectData1 = res.data;
console.log(this.selectData1);
}
})
}, },
// 每页条数改变 // 每页条数改变
handleSizeChange(val) { handleSizeChange(val) {
this.pager.current = 1; this.pager.current = 1;
...@@ -215,6 +332,20 @@ export default { ...@@ -215,6 +332,20 @@ export default {
this.pager.current = val; this.pager.current = val;
this.getList(); this.getList();
}, },
set_table_height() {//动态设置表格高度
const table_container_height = $(".table_container").height();
const search_menu_height = $(".search_menu").height();
const search_btn_height = $(".search_btn").outerHeight(true);
this.tableHeight = table_container_height - search_menu_height - search_btn_height - 90 + 'px';
},
selectable(row) {//表格勾选框禁用
if(row.state == 1) {
return false; // 禁用
} else {
return true; //不禁用
}
},
} }
} }
</script> </script>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!