Commit 09730595 by liuyong

修改画布

1 parent 3e31709b
...@@ -266,7 +266,7 @@ export function getETPManageAdd(params) { ...@@ -266,7 +266,7 @@ export function getETPManageAdd(params) {
} }
// 编辑专家人才库 // 编辑专家人才库
export function getETPManageUpdate(params) { export function getETPManageUpdate(params) {
return post('/kl-talent-pool/updKlTalentPool', params); return post('/kl-talent-pool/updKlTalent', params);
} }
// 删除专家人才库 // 删除专家人才库
export function getETPManageDel(params) { export function getETPManageDel(params) {
...@@ -274,15 +274,15 @@ export function getETPManageDel(params) { ...@@ -274,15 +274,15 @@ export function getETPManageDel(params) {
} }
// 批量删除专家人才库 // 批量删除专家人才库
export function getETPManageDelBatch(params) { export function getETPManageDelBatch(params) {
return post('/kl-talent-pool/updKlTalentPoolBatch', params); return post('/kl-talent-pool/updKlTalentBatch', params);
} }
// 专家库名称下拉 // 专家库名称下拉
export function getETPManagePoolName(params) { export function getETPManagePoolName(params) {
return post('/kl-talent-pool/gtklPoolName', params); return post('/kl-talent-pool/gtTalentPool', params);
} }
// 新增专家库名称 // 新增专家库名称
export function getETPManagePoolNameAdd(params) { export function getETPManagePoolNameAdd(params) {
return post('/kl-talent-pool/adklPoolName', params); return post('/kl-talent-pool/adTalentPool', params);
} }
...@@ -405,6 +405,10 @@ export function exportZhiChanJiaGou(params) { ...@@ -405,6 +405,10 @@ export function exportZhiChanJiaGou(params) {
} }
// 资产架构,导入 // 资产架构,导入
export function importZhiChanJiaGou(params) { export function importZhiChanJiaGou(params) {
return download('/network/framework/easyExeclImport', params); return post('/network/framework/easyExeclImport', params);
}
// 日志管理,列表
export function queryLogManageTable(params) {
return post('/network/sysEventLog/', params);
} }
...@@ -106,7 +106,7 @@ const routes = [ ...@@ -106,7 +106,7 @@ const routes = [
// component: () => import('@/views/YuanMoXingGuanLi/YuanMoXingGuanLiTable/index.vue'), // component: () => import('@/views/YuanMoXingGuanLi/YuanMoXingGuanLiTable/index.vue'),
// }, // },
{ {
path: '/main/etp-Manage',//架构元素管理 path: '/main/etp-Manage',//专家人才库
name: 'etp-Manage', name: 'etp-Manage',
component: () => import('@/views/etpManage/index.vue'), component: () => import('@/views/etpManage/index.vue'),
}, },
...@@ -140,6 +140,11 @@ const routes = [ ...@@ -140,6 +140,11 @@ const routes = [
name: 'currentAssetsList', name: 'currentAssetsList',
component: () => import('@/views/current-assets-list/index.vue'), component: () => import('@/views/current-assets-list/index.vue'),
}, },
{
path: '/main/logManage',//日志管理
name: 'logManage',
component: () => import('@/views/log-manage/index.vue'),
},
] ]
} }
] ]
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</div> </div>
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">组件类型</span> <span class="search_title">组件类型</span>
<el-select filterable remote :remote-method="queryZuJianLeiXingSelect" v-model="searchParams.archiAssetType" clearable placeholder="请选择" class="search_item"> <el-select filterable remote :remote-method="queryZuJianLeiXingSelect" v-model="searchParams.archiEleId" clearable placeholder="请选择" class="search_item">
<el-option v-for="item in zuJianLeiXingSelect" :key="item.elementId" :label="item.elementName" :value="item.elementId"></el-option> <el-option v-for="item in zuJianLeiXingSelect" :key="item.elementId" :label="item.elementName" :value="item.elementId"></el-option>
</el-select> </el-select>
...@@ -57,10 +57,10 @@ ...@@ -57,10 +57,10 @@
<p>导入</p> <p>导入</p>
</div> </div>
<!-- <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 class="import_btn" @click="exportFile" style="margin-left: 0;"> <!-- <div class="import_btn" @click="exportFile" style="margin-left: 0;">
<img class="btn_icon" src="@/assets/tech-politics-fabric/export.png" alt="" /> <img class="btn_icon" src="@/assets/tech-politics-fabric/export.png" alt="" />
<p>导出</p> <p>导出</p>
</div> </div> -->
<div class="import_btn" @click="openDownloadTemplateDialog" style="margin-left: 0;width: 100px;"> <div class="import_btn" @click="openDownloadTemplateDialog" style="margin-left: 0;width: 100px;">
<img class="btn_icon" src="@/assets/tech-politics-fabric/export.png" alt="" /> <img class="btn_icon" src="@/assets/tech-politics-fabric/export.png" alt="" />
<p>模版下载</p> <p>模版下载</p>
...@@ -70,8 +70,8 @@ ...@@ -70,8 +70,8 @@
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></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="assetName" label="架构组件名称" width="300" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="assetName" label="架构组件名称" width="300" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="archiAssetType" label="组件类型" align="center"></el-table-column> <el-table-column prop="eleName" label="组件类型" align="center"></el-table-column>
<el-table-column prop="parentAssetName" label="上级架构组件名称" width=" 300" :show-overflow-tooltip="true" align="center"></el-table-column> <el-table-column prop="parentAssetName" label="上级架构组件名称" width="300" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="createMan" label="创建人" align="center"></el-table-column> <el-table-column prop="createMan" label="创建人" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column label="操作" width="200" align="center"> <el-table-column label="操作" width="200" align="center">
...@@ -153,15 +153,15 @@ ...@@ -153,15 +153,15 @@
:center="false" :center="false"
:close-on-click-modal="false" :close-on-click-modal="false"
width="60%"> width="60%">
<el-form :model="ruleForm" ref="form2" style=""> <el-form :model="ruleForm2" ref="form2" :rules="rules2" style="">
<div class="form_item_container"> <div class="form_item_container">
<el-form-item label="上级节点:" prop="let2"> <el-form-item label="上级节点:" prop="let1">
<el-select clearable placeholder="请选择" v-model="ruleForm2.let1"> <el-select clearable placeholder="请选择" v-model="ruleForm2.let1">
<el-option v-for="item in shangJiJieDianSelect" :key="item.assetId" :label="item.assetName" :value="item.assetId"></el-option> <el-option v-for="item in shangJiJieDianSelect" :key="item.assetId" :label="item.assetName" :value="item.assetId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="组件类型:" prop="let3"> <el-form-item label="组件类型:" prop="let2">
<el-select v-model="ruleForm2.let2" @change="ZuJianLeiXingSelectChange" filterable remote :remote-method="queryZuJianLeiXingSelect" clearable placeholder="请选择"> <el-select v-model="ruleForm2.let2" filterable remote :remote-method="queryZuJianLeiXingSelect" clearable placeholder="请选择">
<el-option v-for="item in zuJianLeiXingSelect" :key="item.elementId" :label="item.elementName" :value="item.elementId"></el-option> <el-option v-for="item in zuJianLeiXingSelect" :key="item.elementId" :label="item.elementName" :value="item.elementId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -176,7 +176,6 @@ ...@@ -176,7 +176,6 @@
</template> </template>
<script> <script>
import Drawio from '@/components/drawio.vue';
import { import {
getArchiViewManage, getArchiViewManage,
getZiChanJiaGouTable, getZiChanJiaGouTable,
...@@ -196,7 +195,7 @@ ...@@ -196,7 +195,7 @@
export default { export default {
name: 'BusiAssetslist', name: 'BusiAssetslist',
components: { components: {
Drawio
}, },
watch: { watch: {
}, },
...@@ -224,11 +223,20 @@ ...@@ -224,11 +223,20 @@
{ required: true, message: '请选择节点类型', trigger: 'change' }, { required: true, message: '请选择节点类型', trigger: 'change' },
], ],
}, },
rules2: {
let1: [
{ required: true, message: '请选择上级节点', trigger: 'change' },
],
let2: [
{ required: true, message: '请选择组件类型', trigger: 'change' },
],
},
searchParams: { searchParams: {
assetName: null, assetName: null,
createMan: null, createMan: null,
archiAssetType: null, archiEleId: null,
assetConstant: null, assetConstant: null,
archiAssetTypeId: null,
}, },
treeData: [ treeData: [
{ {
...@@ -306,13 +314,13 @@ ...@@ -306,13 +314,13 @@
archiAssetState: 1, archiAssetState: 1,
archiBelongId: this.ruleForm.archiBelongId, archiBelongId: this.ruleForm.archiBelongId,
assetConstant: this.searchParams.assetConstant, assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
archiEleId: this.ruleForm.let3, archiEleId: this.ruleForm.let3,
assetName: this.ruleForm.let1, assetName: this.ruleForm.let1,
assetId: this.is_add_edit == 'add' ? null : this.editId, assetId: this.is_add_edit == 'add' ? null : this.editId,
parentAssetId: this.ruleForm.let2, parentAssetId: this.ruleForm.let2,
parentAssetName: parentAssetName, parentAssetName: parentAssetName,
isShow: this.ruleForm.let5 == '显示' ? 1 : 0, isShow: this.ruleForm.let5 == '显示' ? 1 : 0,
assetConstant: this.searchParams.assetConstant,
fieldsValue: fieldsValue, fieldsValue: fieldsValue,
assetCode: assetCode, assetCode: assetCode,
eleName: eleName eleName: eleName
...@@ -362,7 +370,7 @@ ...@@ -362,7 +370,7 @@
reset() {//重置 reset() {//重置
this.searchParams.assetName = null; this.searchParams.assetName = null;
this.searchParams.createMan = null; this.searchParams.createMan = null;
this.searchParams.archiAssetType = null; this.searchParams.archiEleId = null;
}, },
// 每页条数改变 // 每页条数改变
handleSizeChange(val) { handleSizeChange(val) {
...@@ -379,8 +387,9 @@ ...@@ -379,8 +387,9 @@
const params = { const params = {
"assetName": this.searchParams.assetName, "assetName": this.searchParams.assetName,
"createMan": this.searchParams.createMan, "createMan": this.searchParams.createMan,
"archiAssetType": this.searchParams.archiAssetType, "archiEleId": this.searchParams.archiEleId,
"assetConstant": this.searchParams.assetConstant, "assetConstant": this.searchParams.assetConstant,
"archiAssetTypeId": this.searchParams.archiAssetTypeId,
"current": this.pager.current, "current": this.pager.current,
"pageSize": this.pager.size, "pageSize": this.pager.size,
}; };
...@@ -526,6 +535,7 @@ ...@@ -526,6 +535,7 @@
const params = { const params = {
assetId: assetIdArray, assetId: assetIdArray,
assetConstant: this.searchParams.assetConstant, assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
}; };
MessageBox.confirm('确定删除?', '提示', { MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
...@@ -561,49 +571,58 @@ ...@@ -561,49 +571,58 @@
inpEle.type = "file"; inpEle.type = "file";
inpEle.style.display = "none"; inpEle.style.display = "none";
inpEle.addEventListener("change", event => { inpEle.addEventListener("change", event => {
console.log(event.target.files[0]); // console.log(event.target.files[0]);
var formData = new FormData(); var formData = new FormData();
formData.append("file", event.target.files[0]); formData.append("file", event.target.files[0]);
formData.append("typeCode", this.searchParams.assetConstant); formData.append("typeCode", this.searchParams.assetConstant);
importZhiChanJiaGou(formData).then(res => { importZhiChanJiaGou(formData).then(res => {
console.log(res); if(res.code == 200) {
// let blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); this.get_table();
// let url = URL.createObjectURL(blob); Message({
// let link = document.createElement('a'); type: 'success',
// link.href = url; message: '导入成功!'
// document.body.appendChild(link); });
// link.click(); }
}); });
}); });
inpEle.click(); inpEle.click();
}, },
exportFile() {//导出
},
openDownloadTemplateDialog() {//打开模版下载窗口 openDownloadTemplateDialog() {//打开模版下载窗口
this.templateDialog = true; this.templateDialog = true;
this.$nextTick(() => {
this.$refs.form2.resetFields();
this.ruleForm2.let1 = null; this.ruleForm2.let1 = null;
this.ruleForm2.let2 = null; this.ruleForm2.let2 = null;
});
}, },
saveTemplateDialog() {//下载模版 saveTemplateDialog() {//下载模版
let parentName; this.$refs.form2.validate(valid => {
if(this.ruleForm2.let1) { if(valid) {
const items = this.shangJiJieDianSelect.find(item => item.assetId == this.ruleForm2.let1); const items = this.shangJiJieDianSelect.find(item => item.assetId == this.ruleForm2.let1);
parentName = items.assetName; let parentName = items.assetName;
}
const params = { const params = {
parentId: this.ruleForm2.let1, parentId: this.ruleForm2.let1,
parentName: parentName, parentName: parentName,
typeId: this.ruleForm2.let2 typeId: this.ruleForm2.let2
} }
// const params = {
// parentId: '1',
// parentName: '应用架构A',
// typeId: 149
// }
exportZhiChanJiaGou(params).then(res => { exportZhiChanJiaGou(params).then(res => {
console.log(res); let blob = new Blob([res], { type: 'application/octet-stream' });
// let blob = new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }); let url = URL.createObjectURL(blob);
// let url = URL.createObjectURL(blob); let link = document.createElement('a');
// let link = document.createElement('a'); link.href = url;
// link.href = url; link.download = '模版文件.xls';
// document.body.appendChild(link); document.body.appendChild(link);
// link.click(); link.click();
this.templateDialog = false;
});
}
}); });
}, },
deleteItem(row){//删除 deleteItem(row){//删除
...@@ -617,6 +636,7 @@ ...@@ -617,6 +636,7 @@
const params = { const params = {
assetId: [row.assetId], assetId: [row.assetId],
assetConstant: this.searchParams.assetConstant, assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
} }
deleteMoreZiChanJiaGouTable(params).then(res => { deleteMoreZiChanJiaGouTable(params).then(res => {
if(res.code == 200) { if(res.code == 200) {
...@@ -652,6 +672,7 @@ ...@@ -652,6 +672,7 @@
return; return;
}else { }else {
this.searchParams.assetConstant = data.assetConstant; this.searchParams.assetConstant = data.assetConstant;
this.searchParams.archiAssetTypeId = data.viewId;
this.getShangJiJieDianSelect(data.assetConstant, data.archiBelongId); this.getShangJiJieDianSelect(data.assetConstant, data.archiBelongId);
this.archiBelongId = data.archiBelongId; this.archiBelongId = data.archiBelongId;
this.getZuJianLeiXingSelect(null, this.archiBelongId); this.getZuJianLeiXingSelect(null, this.archiBelongId);
...@@ -708,6 +729,7 @@ ...@@ -708,6 +729,7 @@
this.treeData[0].subList = res.data; this.treeData[0].subList = res.data;
this.ruleForm.archiBelongId = res.data[0].subList[0].archiBelongId; this.ruleForm.archiBelongId = res.data[0].subList[0].archiBelongId;
this.searchParams.assetConstant = res.data[0].subList[0].assetConstant; this.searchParams.assetConstant = res.data[0].subList[0].assetConstant;
this.searchParams.archiAssetTypeId = res.data[0].subList[0].viewId;
this.getShangJiJieDianSelect(res.data[0].subList[0].assetConstant, res.data[0].subList[0].archiBelongId); this.getShangJiJieDianSelect(res.data[0].subList[0].assetConstant, res.data[0].subList[0].archiBelongId);
this.getZuJianLeiXingSelect(null, this.ruleForm.archiBelongId); this.getZuJianLeiXingSelect(null, this.ruleForm.archiBelongId);
this.get_table(); this.get_table();
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<div class="search_menu_item_container"> <div class="search_menu_item_container">
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">专家库名称</span> <span class="search_title">专家库名称</span>
<el-input v-model="params.ktpName" placeholder="请输入内容" class="search_item"></el-input> <el-input v-model="params.talentPoolName" placeholder="请输入内容" class="search_item"></el-input>
</div> </div>
<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.ktagId" placeholder="请选择" clearable class="search_item"> <el-select v-model="params.tagId" placeholder="请选择" clearable class="search_item">
<el-option v-for="(item,idnex) in selectData3" :key="idnex" :label="item.label" :value="item.value" ></el-option> <el-option v-for="(item,idnex) in selectData3" :key="idnex" :label="item.label" :value="item.value" ></el-option>
</el-select> </el-select>
</div> </div>
...@@ -40,17 +40,17 @@ ...@@ -40,17 +40,17 @@
<!-- <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column> --> <!-- <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column> -->
<el-table-column type="selection" width="55"></el-table-column> <el-table-column type="selection" width="55"></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="ktpName" label="专家库名称" align="center"> <!-- <el-table-column prop="talentPoolName" label="专家库名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span >{{dicObj.name[scope.row.ktpName] == null ? (scope.row.ktpName):dicObj.name[scope.row.ktpName]}}</span> <span >{{dicObj.name[scope.row.talentPoolName] == null ? (scope.row.talentPoolName):dicObj.name[scope.row.talentPoolName]}}</span>
</template> </template>
</el-table-column> --> </el-table-column> -->
<el-table-column prop="ktpName" label="专家库名称" align="center"></el-table-column> <el-table-column prop="talentPoolName" label="专家库名称" align="center"></el-table-column>
<el-table-column prop="deptName" label="单位" width="150" align="center"></el-table-column> <el-table-column prop="deptName" label="单位" width="150" align="center"></el-table-column>
<el-table-column prop="talentName" label="专家名称" align="center"></el-table-column> <el-table-column prop="talentName" label="专家名称" align="center"></el-table-column>
<el-table-column prop="" width="250" label="专业标签" align="center"> <el-table-column prop="" width="250" label="专业标签" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tagName"><el-tag v-for="(item,index) in scope.row.ktagIdlist" :key="index" v-show="dicObj.ktagId[item.ktagId]">{{dicObj.ktagId[item.ktagId]}}</el-tag></div> <div class="tagName"><el-tag v-for="(item,index) in scope.row.ktagIdlist" :key="index" v-show="dicObj.tagId[item.tagId]">{{dicObj.tagId[item.tagId]}}</el-tag></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="level" label="专家级别" align="center"> <el-table-column prop="level" label="专家级别" align="center">
...@@ -99,8 +99,13 @@ ...@@ -99,8 +99,13 @@
</div> </div>
<div class="dialog_form_item"> <div class="dialog_form_item">
<div class="dialog_form_item_title">专家库名称</div> <div class="dialog_form_item_title">专家库名称</div>
<el-select v-model="formData.ktpName" placeholder="请选择" clearable class="search_item"> <el-select v-model="formData.talentPoolName" placeholder="请选择" clearable class="search_item">
<el-option v-for="(item,idnex) in selectData1" :key="idnex" :label="item.ktpName" :value="item.ktpName" ></el-option> <el-input placeholder="请输入内容" v-model="add_select1_value">
<div slot="append" @click="add_select1">
新增
</div>
</el-input>
<el-option v-for="(item,idnex) in selectData1" :key="idnex" :label="item.talentPoolName" :value="item.talentPoolName" ></el-option>
</el-select> </el-select>
</div> </div>
<div class="dialog_form_item"> <div class="dialog_form_item">
...@@ -160,6 +165,7 @@ import { ...@@ -160,6 +165,7 @@ import {
getETPManagePoolNameAdd, getETPManagePoolNameAdd,
} from "@/api/index.js"; } from "@/api/index.js";
import $ from 'jquery'; import $ from 'jquery';
import { MessageBox, Message } from 'element-ui';
export default { export default {
...@@ -177,7 +183,7 @@ export default { ...@@ -177,7 +183,7 @@ export default {
openType: "", openType: "",
formData: { formData: {
deptName: "", deptName: "",
ktpName: "", talentPoolName: "",
talentName: "", talentName: "",
klTaglist: [], klTaglist: [],
level: "", level: "",
...@@ -188,8 +194,8 @@ export default { ...@@ -188,8 +194,8 @@ export default {
params: { params: {
current: 1, current: 1,
pageSize: 10, pageSize: 10,
ktpName: "", talentPoolName: "",
ktagId: "", tagId: "",
state: "", state: "",
}, },
labelList: [], labelList: [],
...@@ -209,7 +215,7 @@ export default { ...@@ -209,7 +215,7 @@ export default {
2: "中级", 2: "中级",
3: "高级", 3: "高级",
}, },
ktagId: { tagId: {
1: "设备", 1: "设备",
2: "信息化", 2: "信息化",
3: "技术", 3: "技术",
...@@ -252,7 +258,7 @@ export default { ...@@ -252,7 +258,7 @@ export default {
radioName: "", radioName: "",
search_select1: [], search_select1: [],
tableHeight: null, tableHeight: null,
add_select1_value: ''
}; };
}, },
mounted() { mounted() {
...@@ -290,8 +296,8 @@ export default { ...@@ -290,8 +296,8 @@ export default {
this.params = { this.params = {
current: 1, current: 1,
pageSize: 10, pageSize: 10,
ktpName: "", talentPoolName: "",
ktagId: "", tagId: "",
state: "", state: "",
} }
}, },
...@@ -321,12 +327,12 @@ export default { ...@@ -321,12 +327,12 @@ export default {
this.title = "编辑专家人才库"; this.title = "编辑专家人才库";
this.resetForm(); this.resetForm();
this.formData = item; this.formData = item;
// this.formData.ktpName = Number(this.formData.ktpName); // this.formData.talentPoolName = Number(this.formData.talentPoolName);
this.formData.state = String(this.formData.state); this.formData.state = String(this.formData.state);
this.formData.level = String(this.formData.level); this.formData.level = String(this.formData.level);
this.formData.klTaglist = []; this.formData.klTaglist = [];
this.formData.ktagIdlist.forEach(item => { this.formData.ktagIdlist.forEach(item => {
this.labelList.push(String(item.ktagId)); this.labelList.push(String(item.tagId));
}); });
}else if (type == "create") { }else if (type == "create") {
this.selectData3.forEach(item1 => { this.selectData3.forEach(item1 => {
...@@ -334,7 +340,7 @@ export default { ...@@ -334,7 +340,7 @@ export default {
if (item1.value == item2) { if (item1.value == item2) {
this.formData.klTaglist.push( this.formData.klTaglist.push(
{ {
ktagId: item1.value, tagId: item1.value,
ktagName: item1.label, ktagName: item1.label,
} }
) )
...@@ -342,7 +348,7 @@ export default { ...@@ -342,7 +348,7 @@ export default {
} }
}) })
}) })
if (this.formData.ktpId) { if (this.formData.talentId) {
// 编辑保存 // 编辑保存
getETPManageUpdate(this.formData).then(res => { getETPManageUpdate(this.formData).then(res => {
if (res.code == 200) { if (res.code == 200) {
...@@ -374,6 +380,7 @@ export default { ...@@ -374,6 +380,7 @@ export default {
this.$confirm("确认删除吗", "提示", { this.$confirm("确认删除吗", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
confirmButtonClass: 'confirmClass',
type: "warning" type: "warning"
}).then(() => { }).then(() => {
getETPManageUpdate(this.formData).then(res => { getETPManageUpdate(this.formData).then(res => {
...@@ -392,15 +399,16 @@ export default { ...@@ -392,15 +399,16 @@ export default {
return; return;
} }
let params = { let params = {
ktpId: [], talentId: [],
}; };
this.selectList.map(item => { this.selectList.map(item => {
params.ktpId.push(item.ktpId) params.talentId.push(item.talentId)
}) })
this.$confirm("确认批量删除吗", "提示", { this.$confirm("确认批量删除吗", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
confirmButtonClass: 'confirmClass',
type: "warning" type: "warning"
}).then(() => { }).then(() => {
getETPManageDelBatch(params).then(res => { getETPManageDelBatch(params).then(res => {
...@@ -419,7 +427,7 @@ export default { ...@@ -419,7 +427,7 @@ export default {
resetForm(){ resetForm(){
this.formData = { this.formData = {
deptName: "", deptName: "",
ktpName: "", talentPoolName: "",
talentName: "", talentName: "",
klTaglist: [], klTaglist: [],
level: "", level: "",
...@@ -439,7 +447,20 @@ export default { ...@@ -439,7 +447,20 @@ export default {
// link.click(); // link.click();
// }) // })
}, },
add_select1() {//新增专家库名称
const params = {
talentPoolName: this.add_select1_value
}
getETPManagePoolNameAdd(params).then(res => {
if(res.code == 200) {
Message({
type: 'success',
message: '新增成功!'
});
this.getSelect1();
}
})
},
getSelect1() {//专家库下来 getSelect1() {//专家库下来
getETPManagePoolName().then(res => { getETPManagePoolName().then(res => {
if(res.code == 200) { if(res.code == 200) {
...@@ -501,7 +522,20 @@ export default { ...@@ -501,7 +522,20 @@ export default {
} }
</script> </script>
<style>
.confirmClass{
background-color: #0D867F !important;
}
.el-message-box__content{
padding: 60px 15px 60px 15px;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .el-input-group__append{
background-color: #0D867F;
color: #fff;
cursor: pointer;
}
.etpManage{ .etpManage{
width: 100%; width: 100%;
height: 100%; height: 100%;
......
<template>
<div class="logManage">
<div class="table_container">
<div style="display:flex;">
<div class="search_items_container">
<el-form :model="ruleForm" ref="form" style="">
<div class="form_item_container">
<el-form-item label="日志类型" prop="let1">
<el-select v-model="ruleForm.let1" placeholder="请选择">
<el-option v-for="item in selectData1" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="日志级别" prop="let2">
<el-select v-model="ruleForm.let2" placeholder="请选择">
<el-option v-for="item in selectData2" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="结果" prop="let3">
<el-select v-model="ruleForm.let3" placeholder="请选择">
<el-option v-for="item in selectData3" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="时间" prop="let4">
<el-date-picker
style="width: 208px;"
v-model="ruleForm.let4"
type="date"
clearable
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
<el-form-item label="事件类型" prop="let5">
<el-select v-model="ruleForm.let5" placeholder="请选择">
<el-option v-for="item in selectData4" :key="item.value" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="用户名" prop="let6">
<el-input v-no-backslash maxlength="100" v-model="ruleForm.let6" placeholder="请输入内容" class="search_item"></el-input>
</el-form-item>
</div>
</el-form>
</div>
<div style="width: 16%;">
<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>
<i class="el-icon-arrow-right" style="cursor: pointer;width: 100px;"></i>
</div>
</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="username" label="用户名" align="center"></el-table-column>
<el-table-column prop="ipAddr" label="IP地址" align="center"></el-table-column>
<el-table-column label="结果" align="center">
<template slot-scope="scope">
{{ scope.row.result == '1' ? '成功' : '失败' }}
</template>
</el-table-column>
<el-table-column prop="eventType_" label="事件类型" align="center"></el-table-column>
<el-table-column prop="eventContent" label="事件内容" width="300" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="logType_" label="日志类型" align="center"></el-table-column>
<el-table-column prop="logLev_" label="日志级别" align="center"></el-table-column>
<el-table-column prop="createTime" label="时间" align="center"></el-table-column>
</el-table>
<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 {
queryLogManageTable,
getDianXingAnLiSelectData
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import $ from 'jquery';
export default {
name: 'LogManage',
components: {
},
data() {
return {
ruleForm: {
let1: null,
let2: null,
let3: null,
let4: null,
let5: null,
let6: null,
},
tableData: [],
loading: false,
pager: {
current: 1,
sizes: [10, 20, 50, 100, 200],
size: 10,
total: 20 //总条数
},
tableHeight: null,
fuHeDu: [],
selectData1: [
{ name: '系统日志', value: '0' },
{ name: '业务日志', value: '1' },
],
selectData2: [
{ name: '低', value: '0' },
{ name: '中', value: '1' },
{ name: '高', value: '2' },
],
selectData3: [
{ name: '失败', value: '0' },
{ name: '成功', value: '1' },
],
selectData4: [
{ name: '新增', value: '1' },
{ name: '修改', value: '2' },
{ name: '删除', value: '3' },
{ name: '查询', value: '4' },
{ name: '授权', value: '5' },
{ name: '导出', value: '6' },
{ name: '导入', value: '7' },
{ name: '登录', value: '8' },
{ name: '其他', value: '0' },
],
};
},
mounted(){
window.addEventListener('resize', () => {
this.set_table_height(140);
})
this.set_table_height(140);
this.get_table();
this.get_fu_he_du_select().then(res => {
this.fuHeDu = res;
});
let status = 0;
$(".el-icon-arrow-right").click(() => {
if(status == 0) {
$(".search_items_container").css('height', "auto");
$(".el-icon-arrow-right").addClass('rotateClass');
status = 1;
this.set_table_height(205);
}else {
$(".search_items_container").css('height', "60px");
$(".el-icon-arrow-right").removeClass('rotateClass');
status = 0;
this.set_table_height(140);
}
})
},
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(data) {//动态设置表格高度
const table_container_height = $(".table_container").height();
this.tableHeight = table_container_height - data + 'px';
},
search_table() {//搜索
this.pager.current = 1;
this.get_table();
},
reset() {//重置
this.ruleForm.let1 = null;
this.ruleForm.let2 = null;
this.ruleForm.let3 = null;
this.ruleForm.let4 = null;
this.ruleForm.let5 = null;
this.ruleForm.let6 = 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 = {
"logType": this.ruleForm.let1,
"logLev": this.ruleForm.let2,
"result": this.ruleForm.let3,
"time": this.ruleForm.let4,
"eventType": this.ruleForm.let5,
"username": this.ruleForm.let6,
"current": this.pager.current,
"pageSize": this.pager.size,
};
queryLogManageTable(params).then(res => {
if(res.code == 200) {
res.data.records.map(item => {
const result = this.selectData4.find(item2 => item2.value == item.eventType);
item['eventType_'] = result ? result.name : null;
const result2 = this.selectData1.find(item2 => item2.value == item.logType);
item['logType_'] = result2 ? result2.name : null;
const result3 = this.selectData2.find(item2 => item2.value == item.logLev);
item['logLev_'] = result3 ? result3.name : null;
})
this.loading = false;
this.tableData = 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>
.search_items_container{
height: 60px;
width: 83%;
/* border: 2px solid red; */
}
.form_item_container{
display: flex;
flex-wrap: wrap;
}
.el-form-item{
display: flex;
width: 24%;
}
/deep/ .el-form-item__label{
width: 160px;
}
.rotateClass{
transform: rotate(90deg);
}
.logManage{
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;
align-items: center;
margin-bottom: 30px;
}
.search_menu2{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
display: none;
}
.more_search{
display: flex;
align-items: center;
}
.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: 70px;
text-align: right;
flex-shrink: 0;
margin-right: 15px;
}
.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
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!