Commit 4f391983 by liuyong

修改bug

1 parent 496ed499
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
} }
} }
}) })
this.addPaletteFunctions(item.arciBelongId, item.arciBelongName, false, fns); this.addPaletteFunctions(item.arciBelongId, item.arciBelongName, true, fns);
}); });
......
...@@ -435,3 +435,19 @@ export function getTotalZiChanJiaGouTable(params) { ...@@ -435,3 +435,19 @@ export function getTotalZiChanJiaGouTable(params) {
export function queryMindData(params) { export function queryMindData(params) {
return post('/network/archi-vw-detail/fdBmdTree/', params); return post('/network/archi-vw-detail/fdBmdTree/', params);
} }
// 演进策略和路线
export function queryEvoluteFunAndLine(params) {
return post('/network/arc-at-ev-road/', params);
}
// 演进策略和路线的批量删除,批量发布,批量取消发布
export function evoluteFunAndLineDeleteReleaseCancel(params) {
return post('/network/arc-at-ev-road/updBatch', params);
}
// 演进策略和路线的删除,编辑,单个发布,单个取消发布
export function evoluteFunAndLineDeleteMore(params) {
return post('/network/arc-at-ev-road/upd', params);
}
// 演进策略和路线的新增
export function evoluteFunAndLineAdd(params) {
return post('/network/arc-at-ev-road/ad', params);
}
\ No newline at end of file
...@@ -145,6 +145,16 @@ const routes = [ ...@@ -145,6 +145,16 @@ const routes = [
name: 'logManage', name: 'logManage',
component: () => import('@/views/log-manage/index.vue'), component: () => import('@/views/log-manage/index.vue'),
}, },
{
path: '/main/archiEvoluteLine',//架构演进路线资产管理
name: 'archiEvoluteLine',
component: () => import('@/views/archi-evolute-line/index.vue'),
},
{
path: '/main/archiIntelligenceSearch',//总体架构资产智能搜索
name: 'archiIntelligenceSearch',
component: () => import('@/views/archi-intelligence-search/index.vue'),
},
] ]
} }
] ]
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
<img src="@/assets/main/3img.png" alt=""> <img src="@/assets/main/3img.png" alt="">
<span style="margin-left: 5px;">现状架构资产管理</span> <span style="margin-left: 5px;">现状架构资产管理</span>
</div> </div>
<div class="menu_1_item_subtitle"> <div class="menu_1_item_subtitle" @click="jumpPage('总体架构资产设计与维护', '总体架构资产维护', '架构演进路线资产管理')">
<img src="@/assets/main/3img.png" alt=""> <img src="@/assets/main/3img.png" alt="">
<span style="margin-left: 5px;">架构演进路线资产管理</span> <span style="margin-left: 5px;">架构演进路线资产管理</span>
</div> </div>
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<img src="@/assets/main/3img.png" alt=""> <img src="@/assets/main/3img.png" alt="">
<span style="margin-left: 5px;">总体架构资产可视化展示</span> <span style="margin-left: 5px;">总体架构资产可视化展示</span>
</div> </div>
<div class="menu_1_item_subtitle"> <div class="menu_1_item_subtitle" @click="jumpPage('总体架构资产设计与维护', '总体架构资产维护', '总体架构资产智能搜索')">
<img src="@/assets/main/3img.png" alt=""> <img src="@/assets/main/3img.png" alt="">
<span style="margin-left: 5px;">总体架构资产智能搜索</span> <span style="margin-left: 5px;">总体架构资产智能搜索</span>
</div> </div>
...@@ -548,6 +548,14 @@ ...@@ -548,6 +548,14 @@
this.$router.push( '/main/currentAssetsList', () => {}, () => {} ); this.$router.push( '/main/currentAssetsList', () => {}, () => {} );
this.visible1 = false; this.visible1 = false;
break; break;
case '架构演进路线资产管理':
this.$router.push( '/main/archiEvoluteLine', () => {}, () => {} );
this.visible1 = false;
break;
case '总体架构资产智能搜索':
this.$router.push( '/main/archiIntelligenceSearch', () => {}, () => {} );
this.visible1 = false;
break;
case '在线文档编制': case '在线文档编制':
this.$router.push( '/main/doc-demo', () => {}, () => {} ); this.$router.push( '/main/doc-demo', () => {}, () => {} );
break; break;
......
<template>
<div class="archiEvoluteLine">
<div class="table_container">
<div class="search_menu">
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">演进项</span>
<el-select v-model="searchParams.evolutionItem" placeholder="请选择" class="search_item">
<el-option v-for="item in yanJingXiang" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table">
<img class="btn_icon" src="@/assets/archi-ele-list/search.png" alt="" />
<p>查询</p>
</div>
<div class="reset_btn" @click="reset">
<img class="btn_icon" src="@/assets/archi-ele-list/reset.png" alt="" />
<p>重置</p>
</div>
</div>
</div>
<div class="search_btn">
<el-button type="primary" size="medium" icon="el-icon-document-add" @click="addItem">新建</el-button>
<el-button type="primary" size="medium" icon="el-icon-delete" @click="deleteMore">删除</el-button>
<!-- <div class="version_btn" @click="releaseMore">
<img class="btn_icon" src="@/assets/archi-ele-list/version.png" alt="" />
<p>发布</p>
</div>
<div class="cancel_version_btn" @click="cancelReleaseMore">
<img class="btn_icon" src="@/assets/archi-ele-list/version.png" alt="" />
<p>取消发布</p>
</div> -->
</div>
<el-tabs v-model="activeTabs" @tab-click="handleClick">
<el-tab-pane label="演进策略" name="演进策略">
<el-table :height="tableHeight" @selection-change="select_table_rows1" v-loading="loading1" :data="tableData1" 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 prop="evolutionItem_" label="演进项" align="center"></el-table-column>
<el-table-column prop="nowArchi" label="现状架构" align="center"></el-table-column>
<el-table-column prop="targetArchi" label="目标架构" align="center"></el-table-column>
<el-table-column prop="evolutionContent" label="演进策略" align="center"></el-table-column>
<el-table-column label="发布状态" align="center">
<template slot-scope="scope">
<div v-if="scope.row.state == 0">已停用</div>
<div v-else-if="scope.row.state == 1">已发布</div>
<div v-else>暂存</div>
</template>
</el-table-column>
<el-table-column label="操作" width="320" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" type="primary" size="mini" @click="editItem(scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button icon="el-icon-upload2" type="primary" size="mini" @click="cancelReleaseItem(scope.row)" v-if="scope.row.state == 1">取消发布</el-button>
<el-button icon="el-icon-upload2" type="primary" size="mini" @click="releaseItem(scope.row)" v-if="scope.row.state != 1">发布</el-button>
<el-button class="shanChu_btn" icon="el-icon-delete" size="mini" @click="deleteItem(scope.row)" :disabled="scope.row.state == 1">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="演进路线" name="演进路线">
<el-table :height="tableHeight" @selection-change="select_table_rows2" v-loading="loading2" :data="tableData2" 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 prop="evolutionItem_" label="演进项" align="center"></el-table-column>
<el-table-column prop="nowArchi" label="现状架构" align="center"></el-table-column>
<el-table-column prop="targetArchi" label="目标架构" align="center"></el-table-column>
<el-table-column prop="evolutionContent" label="演进路线" align="center"></el-table-column>
<el-table-column label="发布状态" align="center">
<template slot-scope="scope">
<div v-if="scope.row.state == 0">已停用</div>
<div v-else-if="scope.row.state == 1">已发布</div>
<div v-else>暂存</div>
</template>
</el-table-column>
<el-table-column label="操作" width="320" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<el-button icon="el-icon-edit" type="primary" size="mini" @click="editItem(scope.row)" :disabled="scope.row.state == 1">编辑</el-button>
<el-button icon="el-icon-upload2" type="primary" size="mini" @click="cancelReleaseItem(scope.row)" v-if="scope.row.state == 1">取消发布</el-button>
<el-button icon="el-icon-upload2" type="primary" size="mini" @click="releaseItem(scope.row)" v-if="scope.row.state != 1">发布</el-button>
<el-button class="shanChu_btn" icon="el-icon-delete" size="mini" @click="deleteItem(scope.row)" :disabled="scope.row.state == 1">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="pager.sizes"
:page-size="pager.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager.total">
</el-pagination>
</div>
<el-dialog
:title="is_add_edit == 'add' ? '新建'+activeTabs : '编辑'+activeTabs"
:visible.sync="add_dialog"
:center="false"
:close-on-click-modal="false"
width="60%">
<el-form :model="ruleForm" :rules="rules" ref="form" style="margin-left: 20px;">
<el-form-item label="演进项:" prop="let1" style="margin-left: 17px;">
<el-select clearable placeholder="请选择" v-model="ruleForm.let1">
<el-option v-for="item in yanJingXiang" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item class="cross1" label="现状架构:" prop="let2">
<el-input v-no-backslash type="textarea" :rows="3" maxlength="200" show-word-limit placeholder="请输入内容" v-model="ruleForm.let2"></el-input>
</el-form-item>
<el-form-item class="cross1" label="目标架构:" prop="let3">
<el-input v-no-backslash type="textarea" :rows="3" maxlength="200" show-word-limit placeholder="请输入内容" v-model="ruleForm.let3"></el-input>
</el-form-item>
<el-form-item
class="cross1"
:label="activeTabs+':'"
:rules="[
{ required: true, message: '请输入' + activeTabs, trigger: 'blur' },
]"
prop="let4">
<el-input v-no-backslash type="textarea" :rows="3" maxlength="200" show-word-limit placeholder="请输入内容" v-model="ruleForm.let4"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" v-debounce:click="release_dialog">发布</el-button>
<el-button class="greenButton" v-debounce:click="save_dialog">保存</el-button>
<el-button @click="add_dialog = false">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
queryEvoluteFunAndLine,
getDianXingAnLiSelectData,
evoluteFunAndLineDeleteReleaseCancel,
evoluteFunAndLineDeleteMore,
evoluteFunAndLineAdd
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
export default {
name: 'ArchiEvoluteLine',
components: {
},
data() {
return {
ruleForm: {
let1: null,
let2: null,
let3: null,
let4: null,
},
rules: {
let1: [
{ required: true, message: '请选择演进项', trigger: 'change' },
],
let2: [
{ required: true, message: '请输入现状架构', trigger: 'blur' },
],
let3: [
{ required: true, message: '请输入目标架构', trigger: 'blur' },
],
},
add_dialog: false,
activeTabs: '演进策略',
tableData1: [],
tableData2: [],
query_item3: null,
query_item4: null,
loading1: false,
loading2: false,
search_select1: [],
pager: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20 //总条数
},
tableHeight: null,
searchParams: {
evolutionItem: null,
},
yanJingXiang: [],
is_add_edit: 'add',
selectRow1: [],
selectRow2: [],
editId: null,
};
},
mounted(){
window.addEventListener('resize', () => {
this.set_table_height();
})
this.set_table_height();
this.get_table();
this.get_yan_jing_xiang_select().then(res => {
this.yanJingXiang = res;
})
},
methods: {
selectable(row) {//表格勾选框禁用
if(row.state == 1 || row.state == 0) {
return false; // 禁用
} else {
return true; //不禁用
}
},
select_table_rows1(data){//表格的勾选
this.selectRow1 = data;
},
select_table_rows2(data){//表格的勾选
this.selectRow2 = data;
},
addItem() {//新建
this.add_dialog = true;
this.is_add_edit = 'add';
this.$nextTick(() => {
this.$refs.form.resetFields();
this.ruleForm.let1 = null;
this.ruleForm.let2 = null;
this.ruleForm.let3 = null;
this.ruleForm.let4 = null;
});
},
editItem(row) {//编辑
this.is_add_edit = 'edit';
this.add_dialog = true;
this.editId = row.evolutionId;
this.ruleForm.let1 = String(row.evolutionItem);
this.ruleForm.let2 = row.nowArchi;
this.ruleForm.let3 = row.targetArchi;
this.ruleForm.let4 = row.evolutionContent;
},
release_dialog() {//发布
this.$refs.form.validate(valid => {
if(valid) {
const params = {
evolutionItem: this.ruleForm.let1,
nowArchi: this.ruleForm.let2,
targetArchi: this.ruleForm.let3,
evolutionContent: this.ruleForm.let4,
evolutionType: this.activeTabs == '演进策略' ? 1 : 2,
state: 1,
};
const requestParams = this.is_add_edit == 'add' ? params : { ...params, evolutionId: this.editId };
if(this.is_add_edit == 'add') {
evoluteFunAndLineAdd(requestParams).then(res => {
if(res.code == 200) {
this.add_dialog = false;
this.get_table();
Message({
type: 'success',
message: '发布成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}else {
evoluteFunAndLineDeleteMore(requestParams).then(res => {
if(res.code == 200) {
this.add_dialog = false;
this.get_table();
Message({
type: 'success',
message: '发布成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}
}else {
return false;
}
});
},
save_dialog() {//保存
this.$refs.form.validate(valid => {
if(valid) {
const params = {
evolutionItem: this.ruleForm.let1,
nowArchi: this.ruleForm.let2,
targetArchi: this.ruleForm.let3,
evolutionContent: this.ruleForm.let4,
evolutionType: this.activeTabs == '演进策略' ? 1 : 2,
state: 2,
};
const requestParams = this.is_add_edit == 'add' ? params : { ...params, evolutionId: this.editId };
if(this.is_add_edit == 'add') {
evoluteFunAndLineAdd(requestParams).then(res => {
if(res.code == 200) {
this.add_dialog = false;
this.get_table();
Message({
type: 'success',
message: '保存成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}else {
evoluteFunAndLineDeleteMore(requestParams).then(res => {
if(res.code == 200) {
this.add_dialog = false;
this.get_table();
Message({
type: 'success',
message: '保存成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
});
}
}else {
return false;
}
});
},
releaseItem(row) {//表格发布
MessageBox.confirm('确定发布?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
evolutionId: row.evolutionId,
state: 1
}
evoluteFunAndLineDeleteMore(params).then(res => {
if(res.code == 200) {
this.get_table();
Message({
type: 'success',
message: '发布成功!'
});
}else{
Message({
type: 'error',
message: res.msg
});
}
});
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
},
cancelReleaseItem(row) {//表格取消发布
MessageBox.confirm('确定取消发布?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
evolutionId: row.evolutionId,
state: 0
}
evoluteFunAndLineDeleteMore(params).then(res => {
if(res.code == 200) {
this.get_table();
Message({
type: 'success',
message: '取消发布成功!'
});
}else{
Message({
type: 'error',
message: res.msg
});
}
});
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
},
deleteItem(row) {//表格删除
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
const params = {
evolutionId: row.evolutionId,
delFlag: 1
}
evoluteFunAndLineDeleteMore(params).then(res => {
if(res.code == 200) {
this.get_table();
Message({
type: 'success',
message: '删除成功!'
});
}else{
Message({
type: 'error',
message: res.msg
});
}
});
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
},
deleteMore() {//批量删除
if(this.activeTabs == '演进策略') {
if(this.selectRow1.length == 0) {
Message({
type: 'error',
message: '请选择至少一条数据!'
});
}else {
let evolutionId = [];
this.selectRow1.forEach(item => {
evolutionId.push(item.evolutionId);
});
const params = {
evolutionId: evolutionId,
batchConstant: 'del'
}
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
evoluteFunAndLineDeleteReleaseCancel(params).then(res => {
if(res.code == 200) {
this.get_table();
Message({
type: 'success',
message: '删除成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
}
}else {
if(this.selectRow2.length == 0) {
Message({
type: 'error',
message: '请选择至少一条数据!'
});
}else {
let evolutionId = [];
this.selectRow2.forEach(item => {
evolutionId.push(item.evolutionId);
});
const params = {
evolutionId: evolutionId,
batchConstant: 'del'
}
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
customClass: 'messageClass',
confirmButtonClass: 'confirmClass',
type: 'warning'
}).then(() => {
evoluteFunAndLineDeleteReleaseCancel(params).then(res => {
if(res.code == 200) {
this.get_table();
Message({
type: 'success',
message: '删除成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}).catch(() => {
Message({
type: 'info',
message: '已取消'
});
});
}
}
},
// releaseMore() {//批量发布
// if(this.activeTabs == '演进策略') {
// if(this.selectRow1.length == 0) {
// Message({
// type: 'error',
// message: '请选择至少一条数据!'
// });
// }else {
// let evolutionId = [];
// this.selectRow1.forEach(item => {
// evolutionId.push(item.evolutionId);
// });
// const params = {
// evolutionId: evolutionId,
// batchConstant: 'rel'
// }
// MessageBox.confirm('确定发布?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// customClass: 'messageClass',
// confirmButtonClass: 'confirmClass',
// type: 'warning'
// }).then(() => {
// evoluteFunAndLineDeleteReleaseCancel(params).then(res => {
// if(res.code == 200) {
// this.get_table();
// Message({
// type: 'success',
// message: '发布成功!'
// });
// }else {
// Message({
// type: 'error',
// message: res.msg
// });
// }
// })
// }).catch(() => {
// Message({
// type: 'info',
// message: '已取消'
// });
// });
// }
// }else {
// if(this.selectRow2.length == 0) {
// Message({
// type: 'error',
// message: '请选择至少一条数据!'
// });
// }else {
// let evolutionId = [];
// this.selectRow2.forEach(item => {
// evolutionId.push(item.evolutionId);
// });
// const params = {
// evolutionId: evolutionId,
// batchConstant: 'rel'
// }
// MessageBox.confirm('确定发布?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// customClass: 'messageClass',
// confirmButtonClass: 'confirmClass',
// type: 'warning'
// }).then(() => {
// evoluteFunAndLineDeleteReleaseCancel(params).then(res => {
// if(res.code == 200) {
// this.get_table();
// Message({
// type: 'success',
// message: '发布成功!'
// });
// }else {
// Message({
// type: 'error',
// message: res.msg
// });
// }
// })
// }).catch(() => {
// Message({
// type: 'info',
// message: '已取消'
// });
// });
// }
// }
// },
// cancelReleaseMore() {//批量取消发布
// if(this.activeTabs == '演进策略') {
// if(this.selectRow1.length == 0) {
// Message({
// type: 'error',
// message: '请选择至少一条数据!'
// });
// }else {
// let evolutionId = [];
// this.selectRow1.forEach(item => {
// evolutionId.push(item.evolutionId);
// });
// const params = {
// evolutionId: evolutionId,
// batchConstant: 'off'
// }
// MessageBox.confirm('确定取消发布?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// customClass: 'messageClass',
// confirmButtonClass: 'confirmClass',
// type: 'warning'
// }).then(() => {
// evoluteFunAndLineDeleteReleaseCancel(params).then(res => {
// if(res.code == 200) {
// this.get_table();
// Message({
// type: 'success',
// message: '发布成功!'
// });
// }else {
// Message({
// type: 'error',
// message: res.msg
// });
// }
// })
// }).catch(() => {
// Message({
// type: 'info',
// message: '已取消'
// });
// });
// }
// }else {
// if(this.selectRow2.length == 0) {
// Message({
// type: 'error',
// message: '请选择至少一条数据!'
// });
// }else {
// let evolutionId = [];
// this.selectRow2.forEach(item => {
// evolutionId.push(item.evolutionId);
// });
// const params = {
// evolutionId: evolutionId,
// batchConstant: 'off'
// }
// MessageBox.confirm('确定取消发布?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// customClass: 'messageClass',
// confirmButtonClass: 'confirmClass',
// type: 'warning'
// }).then(() => {
// evoluteFunAndLineDeleteReleaseCancel(params).then(res => {
// if(res.code == 200) {
// this.get_table();
// Message({
// type: 'success',
// message: '发布成功!'
// });
// }else {
// Message({
// type: 'error',
// message: res.msg
// });
// }
// })
// }).catch(() => {
// Message({
// type: 'info',
// message: '已取消'
// });
// });
// }
// }
// },
get_yan_jing_xiang_select() {//演进项下拉
const params = {
key: "evolution_item"
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then(res => {
if(res.code == 200) {
resolve(res.data);
}
})
})
},
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 - 120 + 'px';
},
search_table() {//搜索
this.pager.current = 1;
this.get_table();
},
reset() {//重置
this.searchParams.evolutionItem = null;
},
// 每页条数改变
handleSizeChange(val) {
this.pager.current = 1;
this.pager.size = val;
this.get_table();
},
//当前页码改变
handleCurrentChange(val) {
this.pager.current = val;
this.get_table();
},
handleClick(tab) {
this.get_table();
},
get_table() {//查询表格数据
if(this.activeTabs == '演进策略') {
this.loading1 = true;
}else {
this.loading2 = true;
}
const params = {
evolutionItem: this.searchParams.evolutionItem,
evolutionType: this.activeTabs == '演进策略' ? 1 : 2,
current: this.pager.current,
pageSize: this.pager.size,
};
queryEvoluteFunAndLine(params).then(res => {
if(res.code == 200) {
this.get_yan_jing_xiang_select().then(res2 => {
res.data.records.map(item3 => {
let result1 = res2.find(item2 => item2.value == item3.evolutionItem);
item3['evolutionItem_'] = result1 ? result1.label : '';
});
if(this.activeTabs == '演进策略') {
this.loading1 = false;
this.tableData1 = res.data.records;
}else {
this.loading2 = false;
this.tableData2 = res.data.records;
}
this.pager.current = res.data.current;
this.pager.total = res.data.total;
this.pager.size = res.data.size;
})
}
});
},
}
}
</script>
<style>
.confirmClass{
background-color: #0D867F !important;
}
.el-message-box__content{
padding: 60px 15px 60px 15px;
}
</style>
<style scoped>
/deep/ .el-dialog__title{
color: #fff;
}
/deep/ .el-dialog__close {
color: #fff;
}
/deep/ .el-dialog__header{
background-color: #0D867F;
text-align: left;
}
/deep/ .cross1 .el-form-item__content{
width: 89.5% !important;
}
.el-form-item{
display: flex;
}
.greenButton{
background-color: #0D867F;
color: #fff;
}
.version_btn{
display: flex;
align-items: center;
justify-content: center;
width: 84px;
height: 32px;
background: rgba(13,134,127,0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0D867F;
cursor: pointer;
margin-left: 15px;
}
.cancel_version_btn{
display: flex;
align-items: center;
justify-content: center;
width: 104px;
height: 32px;
background: rgba(13,134,127,0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0D867F;
cursor: pointer;
margin-left: 15px;
}
.archiEvoluteLine{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.el-button--primary{
background: rgba(13,134,127,0.1);
color: #0D867F;
border: 0;
}
/deep/ .el-input-group__append{
background-color: #0D867F;
color: #fff;
cursor: pointer;
}
/deep/.el-tabs__item.is-active{
color: #0D867F;
}
/deep/ .el-tabs__item:hover{
color: #0D867F;
}
.search_btn{
width: 100%;
display: flex;
margin-top: 30px;
margin-bottom: 10px;
}
.search_menu{
display: flex;
justify-content: space-between;
}
.search_menu_item_container{
display: flex;
align-items: center;
}
.search_menu_btn_container{
display: flex;
align-items: center;
}
.search_menu_item{
display: flex;
align-items: center;
width: 344px;
}
.search_title{
/* width: 20%; */
flex-shrink: 0;
margin-right: 15px;
}
.search_item{
width: 60%;
}
.query_btn{
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13,134,127,1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0D867F;
font-size: 14px;
color: #fff;
margin-right: 10px;
cursor: pointer;
}
.shanChu_btn{
color: #DD6A15;
background-color: #F8EBE2;
}
.reset_btn{
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(244,244,244,1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #ccc;
font-size: 14px;
color: #666;
cursor: pointer;
}
.btn_icon{
margin-right: 10px;
}
.table_container{
width: 97%;
height: calc(100% - 40px);
margin-top: 20px;
}
.el-pagination{
margin-top: 30px;
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active{
background-color: #0D867F;
}
</style>
\ No newline at end of file
<template>
<template>
<div class="archiEvoluteLine">
<div class="table_container">
<div class="search_menu">
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">演进项</span>
<el-select v-model="searchParams.conformCount" placeholder="请选择" class="search_item">
<el-option v-for="item in fuHeDu" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
</div>
<div class="search_menu_btn_container">
<div class="query_btn" @click="search_table">
<img class="btn_icon" src="@/assets/archi-ele-list/search.png" alt="" />
<p>查询</p>
</div>
<div class="reset_btn" @click="reset">
<img class="btn_icon" src="@/assets/archi-ele-list/reset.png" alt="" />
<p>重置</p>
</div>
</div>
</div>
<div class="search_btn">
<el-button type="primary" size="medium" icon="el-icon-document-add">新建</el-button>
<el-button type="primary" size="medium" icon="el-icon-delete">删除</el-button>
<div class="version_btn">
<img class="btn_icon" src="@/assets/archi-ele-list/version.png" alt="" />
<p>发布</p>
</div>
<div class="cancel_version_btn">
<img class="btn_icon" src="@/assets/archi-ele-list/version.png" alt="" />
<p>取消发布</p>
</div>
</div>
<el-table :height="tableHeight" v-loading="loading" :data="tableData" stripe border>
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="deptName" label="单位" align="center"></el-table-column>
<el-table-column prop="startTime" label="统计时间" align="center"></el-table-column>
<el-table-column prop="policyName" label="政策名称" align="center"></el-table-column>
<el-table-column prop="policyContent" label="政策描述" align="center"></el-table-column>
<el-table-column prop="conformCount" label="符合度" align="center">
<template slot-scope="scope">
<div>
{{ scope.row.conformCount }}%
</div>
</template>
</el-table-column>
<el-table-column prop="usefulCount" label="应用数量" align="center"></el-table-column>
<el-table-column prop="remark" label="备注" align="center"></el-table-column>
</el-table>
<!-- <el-pagination
background
layout="prev, pager, next"
:total="50">
</el-pagination> -->
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pager.current"
:page-sizes="pager.sizes"
:page-size="pager.size"
layout="total, sizes, prev, pager, next, jumper"
:total="pager.total">
</el-pagination>
</div>
</div>
</template>
<script>
import {
getJiShuZhengCeGuanLianShiYongTable,
getDianXingAnLiSelectData
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
export default {
name: 'ArchiEvoluteLine',
components: {
},
data() {
return {
tableData: [],
query_item3: null,
query_item4: null,
loading: false,
search_select1: [],
pager: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20 //总条数
},
tableHeight: null,
searchParams: {
policyName: null,
conformCount: null,
},
fuHeDu: []
};
},
mounted(){
window.addEventListener('resize', () => {
this.set_table_height();
})
this.set_table_height();
this.get_table();
this.get_fu_he_du_select().then(res => {
this.fuHeDu = res;
})
},
methods: {
get_fu_he_du_select() {//符合度下拉
const params = {
key: "tech_compliance"
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then(res => {
if(res.code == 200) {
resolve(res.data);
}
})
})
},
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';
},
search_table() {//搜索
this.pager.current = 1;
this.get_table();
},
reset() {//重置
this.searchParams.policyName = null;
this.searchParams.conformCount = null;
},
// 每页条数改变
handleSizeChange(val) {
this.pager.current = 1;
this.pager.size = val;
this.get_table();
},
//当前页码改变
handleCurrentChange(val) {
this.pager.current = val;
this.get_table();
},
get_table() {//查询表格数据
this.loading = true;
const params = {
"policyName": this.searchParams.policyName,
"conformCount": this.searchParams.conformCount,
"current": this.pager.current,
"pageSize": this.pager.size,
};
getJiShuZhengCeGuanLianShiYongTable(params).then(res => {
this.loading = false;
console.log(res)
// res.records.map(item => {
// const startTime_year = String(new Date(item.startTime).getFullYear());
// const startTime_month = String(new Date(item.startTime).getMonth() + 1);
// let startTime_day = String(new Date(item.startTime).getDay());
// startTime_day = startTime_day.length == 1 ? '0' + startTime_day : startTime_day;
// item['startTime_'] = startTime_year + '-' + startTime_month + '-' + startTime_day;
// });
// this.get_fu_he_du_select().then(res2 => {
// res.records.map(item3 => {
// let result1 = res2.find(item2 => item2.value == item3.conformCount);
// item3['conformCount_'] = result1 ? result1.label : '';
// });
// this.tableData = res.records;
// })
this.tableData = res.records;
this.pager.current = res.current;
this.pager.total = res.total;
this.pager.size = res.size;
// if(res.code == 200) {
// this.loading = false;
// console.log(res)
// // this.tableData = res.
// }
});
},
}
}
</script>
<style>
.confirmClass{
background-color: #0D867F !important;
}
.el-message-box__content{
padding: 60px 15px 60px 15px;
}
</style>
<style scoped>
.version_btn{
display: flex;
align-items: center;
justify-content: center;
width: 84px;
height: 32px;
background: rgba(13,134,127,0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0D867F;
cursor: pointer;
margin-left: 15px;
}
.cancel_version_btn{
display: flex;
align-items: center;
justify-content: center;
width: 104px;
height: 32px;
background: rgba(13,134,127,0.1);
border-radius: 6px 6px 6px 6px;
/* border: 1px solid #0D867F; */
font-size: 14px;
color: #0D867F;
cursor: pointer;
margin-left: 15px;
}
.archiEvoluteLine{
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
}
.el-button--primary{
background: rgba(13,134,127,0.1);
color: #0D867F;
border: 0;
}
/deep/ .el-input-group__append{
background-color: #0D867F;
color: #fff;
cursor: pointer;
}
.search_btn{
width: 100%;
display: flex;
margin-top: 50px;
margin-bottom: 20px;
}
.search_menu{
display: flex;
justify-content: space-between;
margin-bottom: 50px;
}
.search_menu_item_container{
display: flex;
align-items: center;
}
.search_menu_btn_container{
display: flex;
align-items: center;
}
.search_menu_item{
display: flex;
align-items: center;
width: 344px;
}
.search_title{
/* width: 20%; */
flex-shrink: 0;
margin-right: 15px;
}
.search_item{
width: 60%;
}
.query_btn{
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(13,134,127,1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #0D867F;
font-size: 14px;
color: #fff;
margin-right: 10px;
cursor: pointer;
}
.reset_btn{
display: flex;
align-items: center;
justify-content: center;
width: 76px;
height: 32px;
background: rgba(244,244,244,1);
border-radius: 6px 6px 6px 6px;
border: 1px solid #ccc;
font-size: 14px;
color: #666;
cursor: pointer;
}
.btn_icon{
margin-right: 10px;
}
.table_container{
width: 97%;
height: calc(100% - 40px);
margin-top: 20px;
}
.el-pagination{
margin-top: 30px;
}
/deep/ .el-pagination.is-background .el-pager li:not(.disabled).active{
background-color: #0D867F;
}
</style>
\ No newline at end of file
<template>
<div class="archiIntelligenceSearch">
<div class="left_container"></div>
<div class="right_container"></div>
</div>
</template>
<script>
import {
getJiShuZhengCeJieGouHuaTable,
addJiShuZhengCeJieGouHuaTable,
editJiShuZhengCeJieGouHuaTable,
getDianXingAnLiSelectData,
deleteAllJiShuZhengCeJieGouHua,
exportJiShuZhengCeJieGouHuaTable
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
export default {
name: 'ArchiIntelligenceSearch',
data() {
return {
};
},
mounted(){
},
methods: {
}
}
</script>
<style>
</style>
<style scoped>
.archiIntelligenceSearch{
width: 100%;
height: 100%;
display: flex;
}
.left_container{
width: 300px;
height: 100%;
}
.right_container{
width: calc(100% - 300px);
height: 100%;
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!