Commit 9e19a3f6 by liuyong

修改画布

1 parent d39c0456
......@@ -4,40 +4,40 @@
Sidebar.prototype.addArchimate3Palette = function()
{
// 20231206wangwansu 上面是原本的版本
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Application');
// this.addArchimate3ApplicationPalette();
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Business');
// this.addArchimate3BusinessPalette();
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Composite');
// this.addArchimate3CompositePalette();
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Implementation and Migration');
// this.addArchimate3ImplementationAndMigrationPalette();
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Motivation');
// this.addArchimate3MotivationPalette();
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Physical');
// this.addArchimate3PhysicalPalette();
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Relationships');
// this.addArchimate3RelationshipsPalette();
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Strategy');
// this.addArchimate3StrategyPalette();
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Technology');
// this.addArchimate3TechnologyPalette();
// this.setCurrentSearchEntryLibrary();
// 20231206wangwansu 下面是修改的版本
// 业务架构
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Business');
this.addArchimate3BusinessPalette();
// 应用架构
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Application');
this.addArchimate3ApplicationPalette();
// 关系架构
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Business');
this.addArchimate3BusinessPalette();
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Composite');
this.addArchimate3CompositePalette();
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Implementation and Migration');
this.addArchimate3ImplementationAndMigrationPalette();
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Motivation');
this.addArchimate3MotivationPalette();
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Physical');
this.addArchimate3PhysicalPalette();
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Relationships');
this.addArchimate3RelationshipsPalette();
// 技术架构
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Strategy');
this.addArchimate3StrategyPalette();
this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Technology');
this.addArchimate3TechnologyPalette();
this.setCurrentSearchEntryLibrary();
// 20231206wangwansu 下面是修改的版本
// 业务架构
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Business');
// this.addArchimate3BusinessPalette();
// // 应用架构
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Application');
// this.addArchimate3ApplicationPalette();
// // 关系架构
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Relationships');
// this.addArchimate3RelationshipsPalette();
// // 技术架构
// this.setCurrentSearchEntryLibrary('archimate3', 'archimate3Technology');
// this.addArchimate3TechnologyPalette();
// this.setCurrentSearchEntryLibrary();
};
Sidebar.prototype.addArchimate3ApplicationPalette = function()
......
......@@ -2193,8 +2193,8 @@ Sidebar.prototype.createTitle = function(label)
console.log(label)
//二次开发,设置样式--------------------开始
if(label == '架构元素关系') {
elt.style.borderTop = '2px solid #ccc';
elt.style.borderBottom = '2px solid #ccc';
// elt.style.borderTop = '2px solid #ccc';
// elt.style.borderBottom = '2px solid #ccc';
}else if(label == '安全架构'){
// elt.style.borderTop = '2px solid #ccc';
}else {
......
......@@ -393,7 +393,7 @@ export function queryZiChanJiaGouShangJiJieDian(params) {
}
// 资产架构,组件类型
export function queryZiChanJiaGouZuJianLeiXing(params) {
return post('/network/ele/archi-ele-list', params);
return post('/network/ma-ml-dicy/archiDicyList', params);
}
// 资产架构,组件类型选择后查询表单
export function queryZuJianLeiXingBelongForm(params) {
......@@ -407,8 +407,27 @@ export function exportZhiChanJiaGou(params) {
export function importZhiChanJiaGou(params) {
return post('/network/framework/easyExeclImport', params);
}
// 资产架构,关联资产
export function queryGuanLianZiChanSelect(params) {
return post('/network/arc-ast-cn/assetList', params);
}
// 日志管理,列表
export function queryLogManageTable(params) {
return post('/network/sysEventLog/', params);
}
// 日志管理,存储上限
export function queryLogManageStorageUpper(params) {
return post('/network/dictDetail/details', params);
}
// 日志管理,总记录
export function queryLogManageAllLog(params) {
return post('/network/sysEventLog/getTjCount', params);
}
// 现状资产架构,表格
export function getCurrentZiChanJiaGouTable(params) {
return post('/network/arc-ast-now/', params);
}
// 现状资产架构,表格
export function getTotalZiChanJiaGouTable(params) {
return post('/network/arc-ast-tot/', params);
}
(function (r) { if (typeof exports === "object" && typeof module !== "undefined") { module.exports = r() } else if (typeof define === "function" && define.amd) { define([], r) } else { var e; if (typeof window !== "undefined") { e = window } else if (typeof global !== "undefined") { e = global } else if (typeof self !== "undefined") { e = self } else { e = this } e.base64js = r() } })(function () { var r, e, n; return function () { function d(a, f, i) { function u(n, r) { if (!f[n]) { if (!a[n]) { var e = "function" == typeof require && require; if (!r && e) return e(n, !0); if (v) return v(n, !0); var t = new Error("Cannot find module '" + n + "'"); throw t.code = "MODULE_NOT_FOUND", t } var o = f[n] = { exports: {} }; a[n][0].call(o.exports, function (r) { var e = a[n][1][r]; return u(e || r) }, o, o.exports, d, a, f, i) } return f[n].exports } for (var v = "function" == typeof require && require, r = 0; r < i.length; r++)u(i[r]); return u } return d }()({ "/": [function (r, e, n) { "use strict"; n.byteLength = f; n.toByteArray = i; n.fromByteArray = p; var u = []; var v = []; var d = typeof Uint8Array !== "undefined" ? Uint8Array : Array; var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; for (var o = 0, a = t.length; o < a; ++o) { u[o] = t[o]; v[t.charCodeAt(o)] = o } v["-".charCodeAt(0)] = 62; v["_".charCodeAt(0)] = 63; function c(r) { var e = r.length; if (e % 4 > 0) { throw new Error("Invalid string. Length must be a multiple of 4") } var n = r.indexOf("="); if (n === -1) n = e; var t = n === e ? 0 : 4 - n % 4; return [n, t] } function f(r) { var e = c(r); var n = e[0]; var t = e[1]; return (n + t) * 3 / 4 - t } function h(r, e, n) { return (e + n) * 3 / 4 - n } function i(r) { var e; var n = c(r); var t = n[0]; var o = n[1]; var a = new d(h(r, t, o)); var f = 0; var i = o > 0 ? t - 4 : t; var u; for (u = 0; u < i; u += 4) { e = v[r.charCodeAt(u)] << 18 | v[r.charCodeAt(u + 1)] << 12 | v[r.charCodeAt(u + 2)] << 6 | v[r.charCodeAt(u + 3)]; a[f++] = e >> 16 & 255; a[f++] = e >> 8 & 255; a[f++] = e & 255 } if (o === 2) { e = v[r.charCodeAt(u)] << 2 | v[r.charCodeAt(u + 1)] >> 4; a[f++] = e & 255 } if (o === 1) { e = v[r.charCodeAt(u)] << 10 | v[r.charCodeAt(u + 1)] << 4 | v[r.charCodeAt(u + 2)] >> 2; a[f++] = e >> 8 & 255; a[f++] = e & 255 } return a } function s(r) { return u[r >> 18 & 63] + u[r >> 12 & 63] + u[r >> 6 & 63] + u[r & 63] } function l(r, e, n) { var t; var o = []; for (var a = e; a < n; a += 3) { t = (r[a] << 16 & 16711680) + (r[a + 1] << 8 & 65280) + (r[a + 2] & 255); o.push(s(t)) } return o.join("") } function p(r) { var e; var n = r.length; var t = n % 3; var o = []; var a = 16383; for (var f = 0, i = n - t; f < i; f += a) { o.push(l(r, f, f + a > i ? i : f + a)) } if (t === 1) { e = r[n - 1]; o.push(u[e >> 2] + u[e << 4 & 63] + "==") } else if (t === 2) { e = (r[n - 2] << 8) + r[n - 1]; o.push(u[e >> 10] + u[e >> 4 & 63] + u[e << 2 & 63] + "=") } return o.join("") } }, {}] }, {}, [])("/") });
......@@ -4,7 +4,6 @@ import axios from 'axios';
import router from '../router/index.js';
import { Message, MessageBox, Loading } from 'element-ui';
axios.defaults.timeout = 300000;
axios.defaults.baseURL = process.env.VUE_APP_BASE_URL;
......
<template>
<div class="archiAssetManage">
<div class="busiAssetslist">
<div class="left_container">
<el-tree
class="filter-tree"
:data="treeData"
:highlight-current="true"
:props="{ children: 'children', label: 'name', id: 'belongId' }"
:props="{ children: 'subList', label: 'viewName', id: 'viewId' }"
default-expand-all
node-key="belongId"
node-key="viewId"
:default-expanded-keys="treeDefaultExpand"
:current-node-key="currentNodekey"
@node-click="treeClick"
ref="tree">
......@@ -26,7 +27,7 @@
</div>
<div class="search_menu_item">
<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-select>
......@@ -56,17 +57,21 @@
<p>导入</p>
</div>
<!-- <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="" />
<p>导出</p>
</div> -->
<div class="import_btn" @click="openDownloadTemplateDialog" style="margin-left: 0;width: 100px;">
<img class="btn_icon" src="@/assets/tech-politics-fabric/export.png" alt="" />
<p>模版下载</p>
</div>
</div>
<el-table :height="tableHeight" @selection-change="select_table_rows" v-loading="loading" :data="tableData" stripe border>
<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 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="parentAssetName" label="上级架构组件名称" width=" 300" :show-overflow-tooltip="true" 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="createMan" 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">
......@@ -103,12 +108,12 @@
</el-form-item>
<el-form-item label="上级节点:" prop="let2">
<el-select @change="selectFun" clearable placeholder="请选择" v-model="ruleForm.let2">
<el-select clearable placeholder="请选择" v-model="ruleForm.let2">
<el-option v-for="item in shangJiJieDianSelect" :key="item.assetId" :label="item.assetName" :value="item.assetId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="组件类型:" prop="let3">
<el-select @change="ZuJianLeiXingSelectChange" filterable remote :remote-method="queryZuJianLeiXingSelect" clearable placeholder="请选择" v-model="ruleForm.let3">
<el-select @change="zuJianLeiXingSelectChange" filterable remote :remote-method="queryZuJianLeiXingSelect" clearable placeholder="请选择" v-model="ruleForm.let3">
<el-option v-for="item in zuJianLeiXingSelect" :key="item.elementId" :label="item.elementName" :value="item.elementId"></el-option>
</el-select>
</el-form-item>
......@@ -121,16 +126,21 @@
<el-radio label="隐藏"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item class="dynamicFormClass" v-for="(item, index) in ruleForm.dynamicForm" :key="index" :label="item.cnName+':'" :prop="item.fieldName">
<el-form-item label="关联资产:" prop="let6">
<!-- <el-select clearable placeholder="请选择" v-model="ruleForm.let6">
<el-option v-for="item in guanLianZiChanSelect" :key="item.assetId" :label="item.assetName" :value="item.assetId"></el-option>
</el-select> -->
</el-form-item>
<el-form-item class="dynamicFormClass" v-for="(item, index) in ruleForm.dynamicForm_" :key="index" :label="item.cnName+':'">
<template v-if="item.controlType == 0">
<el-input placeholder="请输入内容" v-no-backslash v-model="item.defaultValue" maxlength="100"></el-input>
<el-input placeholder="请输入内容" v-no-backslash v-model="item.value_" maxlength="100"></el-input>
</template>
<template v-else-if="item.controlType == 1">
<el-input placeholder="请输入内容" v-no-backslash v-model="item.defaultValue" type="textarea" :rows="3" maxlength="200" show-word-limit></el-input>
<el-input placeholder="请输入内容" v-no-backslash v-model="item.value_" type="textarea" :rows="3" maxlength="200" show-word-limit></el-input>
</template>
<template v-else>
<el-select clearable v-model="item.defaultValue">
<el-option v-for="item2 in item.propertyValue" :key="item2.elementId" :label="item2.elementName" :value="item.elementId"></el-option>
<el-select class="selectComponent" v-model="item.value_" clearable>
<el-option v-for="item2 in item.dictArray_" :key="item2.id" :label="item2.label" :value="item2.id"></el-option>
</el-select>
</template>
</el-form-item>
......@@ -141,40 +151,76 @@
<el-button @click="cancelDialog">取消</el-button>
</span>
</el-dialog>
<el-dialog
title="模版下载"
:visible.sync="templateDialog"
:center="false"
:close-on-click-modal="false"
width="60%">
<el-form :model="ruleForm2" ref="form2" :rules="rules2" style="">
<div class="form_item_container">
<el-form-item label="上级节点:" prop="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-select>
</el-form-item>
<el-form-item label="组件类型:" prop="let2">
<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-select>
</el-form-item>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="saveTemplateDialog">确定</el-button>
<el-button @click="templateDialog = false">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Drawio from '@/components/drawio.vue';
import {
query_jia_gou_gui_shu,
getZiChanJiaGouTable,
editAndDeleteZiChanJiaGouTable,
getArchiViewManage,
getTotalZiChanJiaGouTable,
editZiChanJiaGouTable,
deleteMoreZiChanJiaGouTable,
addMoreZiChanJiaGouTable,
queryZiChanJiaGouShangJiJieDian,
queryZiChanJiaGouZuJianLeiXing,
queryZuJianLeiXingBelongForm
queryZuJianLeiXingBelongForm,
exportZhiChanJiaGou,
getDianXingAnLiSelectData,
importZhiChanJiaGou,
queryGuanLianZiChanSelect
} from '@/api/index.js';
import $ from 'jquery';
import { MessageBox, Message } from 'element-ui';
export default {
name: 'ArchiAssetManage',
name: 'BusiAssetslist',
components: {
Drawio
},
watch: {
},
data() {
return {
templateDialog: false,
ruleForm2: {
let1: null,
let2: null,
},
ruleForm: {
let1: null,
let2: null,
let3: null,
let4: 0,
let5: '显示',
dynamicForm: []
let6: '',
dynamicForm_: [],
archiBelongId: null,
},
rules: {
let1: [
......@@ -184,17 +230,26 @@
{ required: true, message: '请选择节点类型', trigger: 'change' },
],
},
rules2: {
let1: [
{ required: true, message: '请选择上级节点', trigger: 'change' },
],
let2: [
{ required: true, message: '请选择组件类型', trigger: 'change' },
],
},
searchParams: {
assetName: null,
createMan: null,
archiAssetType: null,
archiEleId: null,
assetConstant: null,
archiAssetTypeId: null,
},
treeData: [
{
belongId: '1',
name: '总体架构资产',
children: []
viewId: 0,
viewName: '架构视图管理',
subList: []
}
],
tableHeight: null,
......@@ -211,8 +266,10 @@
currentNodekey: null,
is_add_edit: 'add',
zuJianLeiXingSelect: [],
belongId: null,
shangJiJieDianSelect: [],
treeDefaultExpand: [],
editId: null,
guanLianZiChanSelect: []
};
},
mounted(){
......@@ -223,17 +280,96 @@
this.set_table_height();
},
methods: {
getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单
const params = {
assetName: assetName,
assetConstant: this.searchParams.assetConstant
}
queryGuanLianZiChanSelect(params).then(res => {
console.log(res)
});
},
saveDialog() {//弹框保存
this.$refs.form.validate(valid => {
if(valid) {
console.log(this.ruleForm)
// this.addDialog = false;
// console.log(this.ruleForm);
let parentAssetName, assetCode, fieldsValue = [], eleName;
if(this.ruleForm.let2 && this.shangJiJieDianSelect.length > 0) {
const items = this.shangJiJieDianSelect.find(item => item.assetId == this.ruleForm.let2);
parentAssetName = items.assetName;
assetCode = items.parentCode;
}
const items2 = this.zuJianLeiXingSelect.find(item => item.elementId == this.ruleForm.let3);
eleName = items2.elementName;
if(this.ruleForm.dynamicForm_.length > 0) {
this.ruleForm.dynamicForm_.forEach(item => {
fieldsValue.push({
cnName: item.cnName,
value_: item.value_,
controlType: item.controlType,
dictKey: item.dictKey ? item.dictKey : null
})
})
}else {
fieldsValue = [{}];
}
const params = {
archiAssetState: 1,
archiStage: 2,
archiBelongId: this.ruleForm.archiBelongId,
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
archiEleId: this.ruleForm.let3,
assetName: this.ruleForm.let1,
assetId: this.is_add_edit == 'add' ? null : this.editId,
parentAssetId: this.ruleForm.let2,
parentAssetName: parentAssetName,
isShow: this.ruleForm.let5 == '显示' ? 1 : 0,
fieldsValue: fieldsValue,
assetCode: assetCode,
eleName: eleName
}
if(this.is_add_edit == 'add') {
addMoreZiChanJiaGouTable(params).then(res => {
if(res.code == 200) {
this.addDialog = false;
this.get_table();
Message({
type: 'success',
message: '新增成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}else {
editZiChanJiaGouTable(params).then(res => {
if(res.code == 200) {
this.addDialog = false;
this.get_table();
Message({
type: 'success',
message: '编辑成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}
}
});
},
cancelDialog() {//弹框取消
this.addDialog = false;
},
// selectable(row) {//表格勾选框禁用
// if(row.state == 1 || row.state == 0) {
......@@ -249,7 +385,7 @@
reset() {//重置
this.searchParams.assetName = null;
this.searchParams.createMan = null;
this.searchParams.archiAssetType = null;
this.searchParams.archiEleId = null;
},
// 每页条数改变
handleSizeChange(val) {
......@@ -266,13 +402,14 @@
const params = {
"assetName": this.searchParams.assetName,
"createMan": this.searchParams.createMan,
"archiAssetType": this.searchParams.archiAssetType,
"archiEleId": this.searchParams.archiEleId,
"assetConstant": this.searchParams.assetConstant,
"archiAssetTypeId": this.searchParams.archiAssetTypeId,
"current": this.pager.current,
"pageSize": this.pager.size,
};
this.loading = true;
getZiChanJiaGouTable(params).then(res => {
getTotalZiChanJiaGouTable(params).then(res => {
if(res.code == 200) {
this.loading = false;
this.pager.current = res.data.current;
......@@ -280,7 +417,10 @@
this.pager.size = res.data.size;
this.tableData = res.data.records;
}else {
this.tableData = [];
Message({
type: 'error',
message: res.msg
});
}
})
},
......@@ -294,30 +434,60 @@
this.ruleForm.let3 = null;
this.ruleForm.let4 = 0;
this.ruleForm.let5 = '显示';
this.ruleForm.dynamicForm = [];
this.ruleForm.dynamicForm_ = [];
});
},
editItem(row){//编辑
this.addDialog = true;
this.is_add_edit = 'edit';
},
selectFun(data) {//上级节点选择
console.log(data)
console.log(this.shangJiJieDianSelect)
this.ruleForm.let1 = row.assetName;
this.ruleForm.let2 = row.parentAssetId ? String(row.parentAssetId) : null;
this.ruleForm.let3 = row.archiEleId;
this.ruleForm.let4 = row.sort;
this.ruleForm.let5 = row.isShow == 1 ? '显示' : '隐藏';
this.editId = row.assetId;
let fieldsValue = row.fieldsValue;
if(fieldsValue.length == 4) {
this.ruleForm.dynamicForm_ = [];
}else {
let fieldsValue_ = JSON.parse(fieldsValue);
fieldsValue_.map(item => {
if(item.dictKey) {
this.get_key(item.dictKey).then(res2 => {
this.$set(item, 'dictArray_', res2);
})
}
});
this.ruleForm.dynamicForm_ = fieldsValue_;
}
},
getShangJiJieDianSelect(archiType, belongId) {//上级节点下拉框值
getShangJiJieDianSelect(assetConstant, archiBelongId) {//上级节点下拉框值
const params = {
archiType: archiType,
parentAssetId: belongId,
archiType: assetConstant,
parentAssetId: archiBelongId,
};
queryZiChanJiaGouShangJiJieDian(params).then(res => {
if(res.code == 200) {
console.log('上级节点')
console.log(res.data)
this.shangJiJieDianSelect = res.data;
}
})
},
ZuJianLeiXingSelectChange(data) {//组件类型选择后
get_key(key) {//查询字典
const params = {
key: key
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then(res => {
if(res.code == 200) {
resolve(res.data);
}
})
})
},
zuJianLeiXingSelectChange(data) {//组件类型选择后
const params = {
type: '1',
typeId: data,
......@@ -325,10 +495,18 @@
queryZuJianLeiXingBelongForm(params).then(res => {
if(res.code == 200) {
if(res.data.length > 0) {
this.ruleForm.dynamicForm = res.data;
res.data.map(item => {
if(item.controlType == 2) {
this.get_key(item.dictKey).then(res2 => {
this.$set(item, 'dictArray_', res2);
})
}
item['value_'] = '';
});
console.log(res.data)
this.ruleForm.dynamicForm_ = res.data;
}else {
this.ruleForm.dynamicForm = [];
this.ruleForm.dynamicForm_ = [];
}
}
})
......@@ -342,13 +520,18 @@
this.getZuJianLeiXingSelect(null);
}
},
getZuJianLeiXingSelect(elementName) {//组件类型下拉框值
getZuJianLeiXingSelect(elementName, archiBelongId) {//组件类型下拉框值
const params = {
state: '1',
type: '1',
elementName: elementName,
archiBelongId: this.belongId,
archiBelongId: archiBelongId
};
queryZiChanJiaGouZuJianLeiXing(params).then(res => {
if(res.code == 200) {
console.log('组件类型')
console.log(res.data)
this.zuJianLeiXingSelect = res.data;
}else {
Message({
......@@ -372,6 +555,7 @@
const params = {
assetId: assetIdArray,
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
};
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
......@@ -407,12 +591,59 @@
inpEle.type = "file";
inpEle.style.display = "none";
inpEle.addEventListener("change", event => {
console.log(event.target.files[0]);
// console.log(event.target.files[0]);
var formData = new FormData();
formData.append("file", event.target.files[0]);
formData.append("typeCode", this.searchParams.assetConstant);
importZhiChanJiaGou(formData).then(res => {
if(res.code == 200) {
this.get_table();
Message({
type: 'success',
message: '导入成功!'
});
}
});
});
inpEle.click();
},
exportFile() {//导出
openDownloadTemplateDialog() {//打开模版下载窗口
this.templateDialog = true;
this.$nextTick(() => {
this.$refs.form2.resetFields();
this.ruleForm2.let1 = null;
this.ruleForm2.let2 = null;
});
},
saveTemplateDialog() {//下载模版
this.$refs.form2.validate(valid => {
if(valid) {
const items = this.shangJiJieDianSelect.find(item => item.assetId == this.ruleForm2.let1);
let parentName = items.assetName;
const params = {
parentId: this.ruleForm2.let1,
parentName: parentName,
typeId: this.ruleForm2.let2
}
// const params = {
// parentId: '1',
// parentName: '应用架构A',
// typeId: 149
// }
exportZhiChanJiaGou(params).then(res => {
let blob = new Blob([res], { type: 'application/octet-stream' });
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.download = '模版文件.xls';
document.body.appendChild(link);
link.click();
this.templateDialog = false;
});
}
});
},
deleteItem(row){//删除
MessageBox.confirm('确定删除?', '提示', {
......@@ -425,6 +656,7 @@
const params = {
assetId: [row.assetId],
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
}
deleteMoreZiChanJiaGouTable(params).then(res => {
if(res.code == 200) {
......@@ -456,57 +688,73 @@
this.tableHeight = right_container_height - 260 + 'px';
},
treeClick(data) {//左侧树点击
if(data.children) {
if(data.subList) {
return;
}else {
this.searchParams.assetConstant = data.assetConstant;
this.getShangJiJieDianSelect(data.archiType, data.belongId);
this.belongId = data.belongId;
this.getZuJianLeiXingSelect(null, this.belongId);
this.searchParams.archiAssetTypeId = data.viewId;
this.getShangJiJieDianSelect(data.assetConstant, data.archiBelongId);
this.archiBelongId = data.archiBelongId;
this.getZuJianLeiXingSelect(null, this.archiBelongId);
this.get_table();
}
},
getTreeData() {//查询左侧树
query_jia_gou_gui_shu({}).then(res => {
getArchiViewManage({}).then(res => {
if(res.code == 200) {
this.treeData[0].children = res.data;
this.currentNodekey = res.data[0].belongId;
this.treeDefaultExpand = [res.data[0].viewId];
this.currentNodekey = res.data[0].subList[0].viewId;
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey);
});
res.data.map(item => {
switch(item.name){
switch(item.viewName){
case '安全架构':
item['assetConstant'] = 'safe';
item['archiType'] = 'ARCHI_SAFE';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_SAFE';
item2['archiBelongId'] = 5;
})
break;
case '技术架构':
item['assetConstant'] = 'tech';
item['archiType'] = 'ARCHI_TECHNOLOGY';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_TECHNOLOGY';
item2['archiBelongId'] = 4;
})
break;
case '数据架构':
item['assetConstant'] = 'data';
item['archiType'] = 'ARCHI_DATA';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_DATA';
item2['archiBelongId'] = 3;
})
break;
case '应用架构':
item['assetConstant'] = 'app';
item['archiType'] = 'ARCHI_APPLICATION';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_APPLICATION';
item2['archiBelongId'] = 2;
})
break;
case '业务架构':
item['assetConstant'] = 'busi';
item['archiType'] = 'ARCHI_BUSINESS';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_BUSINESS';
item2['archiBelongId'] = 1;
})
break;
}
})
this.searchParams.assetConstant = res.data[0].assetConstant;
this.getShangJiJieDianSelect(res.data[0].archiType, res.data[0].belongId);
this.belongId = res.data[0].belongId;
this.getZuJianLeiXingSelect(null, this.belongId);
this.treeData[0].subList = res.data;
this.ruleForm.archiBelongId = res.data[0].subList[0].archiBelongId;
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.getZuJianLeiXingSelect(null, this.ruleForm.archiBelongId);
this.getGuanLianZiChanSelectData(null);
this.get_table();
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey);
});
}else {
......@@ -525,6 +773,11 @@
}
</style>
<style scoped>
.filter-tree{
width: 300px;
height: 100%;
overflow-y: auto;
}
.dynamicFormClass{
width: 100% !important;
}
......@@ -582,7 +835,7 @@
/deep/ .is-leaf {
background-color: rgb(245,246,250) !important;
}
.archiAssetManage{
.busiAssetslist{
width: 100%;
/* height: calc(100% - 20px); */
height: 100%;
......
......@@ -113,7 +113,7 @@
</el-select>
</el-form-item>
<el-form-item label="组件类型:" prop="let3">
<el-select @change="ZuJianLeiXingSelectChange" filterable remote :remote-method="queryZuJianLeiXingSelect" clearable placeholder="请选择" v-model="ruleForm.let3">
<el-select @change="zuJianLeiXingSelectChange" filterable remote :remote-method="queryZuJianLeiXingSelect" clearable placeholder="请选择" v-model="ruleForm.let3">
<el-option v-for="item in zuJianLeiXingSelect" :key="item.elementId" :label="item.elementName" :value="item.elementId"></el-option>
</el-select>
</el-form-item>
......@@ -126,6 +126,11 @@
<el-radio label="隐藏"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="关联资产:" prop="let6">
<!-- <el-select clearable placeholder="请选择" v-model="ruleForm.let6">
<el-option v-for="item in guanLianZiChanSelect" :key="item.assetId" :label="item.assetName" :value="item.assetId"></el-option>
</el-select> -->
</el-form-item>
<el-form-item class="dynamicFormClass" v-for="(item, index) in ruleForm.dynamicForm_" :key="index" :label="item.cnName+':'">
<template v-if="item.controlType == 0">
<el-input placeholder="请输入内容" v-no-backslash v-model="item.value_" maxlength="100"></el-input>
......@@ -187,7 +192,8 @@
queryZuJianLeiXingBelongForm,
exportZhiChanJiaGou,
getDianXingAnLiSelectData,
importZhiChanJiaGou
importZhiChanJiaGou,
queryGuanLianZiChanSelect
} from '@/api/index.js';
import $ from 'jquery';
import { MessageBox, Message } from 'element-ui';
......@@ -212,6 +218,7 @@
let3: null,
let4: 0,
let5: '显示',
let6: '',
dynamicForm_: [],
archiBelongId: null,
},
......@@ -262,6 +269,7 @@
shangJiJieDianSelect: [],
treeDefaultExpand: [],
editId: null,
guanLianZiChanSelect: []
};
},
mounted(){
......@@ -272,6 +280,15 @@
this.set_table_height();
},
methods: {
getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单
const params = {
assetName: assetName,
assetConstant: this.searchParams.assetConstant
}
queryGuanLianZiChanSelect(params).then(res => {
console.log(res)
});
},
saveDialog() {//弹框保存
this.$refs.form.validate(valid => {
if(valid) {
......@@ -288,16 +305,6 @@
eleName = items2.elementName;
if(this.ruleForm.dynamicForm_.length > 0) {
if(this.is_add_edit == 'add') {
this.ruleForm.dynamicForm_.forEach(item => {
fieldsValue.push({
cnName: item.fieldName,
value_: item.value_,
controlType: item.controlType,
dictKey: item.dictKey ? item.dictKey : null
})
})
}else {
this.ruleForm.dynamicForm_.forEach(item => {
fieldsValue.push({
cnName: item.cnName,
......@@ -306,12 +313,12 @@
dictKey: item.dictKey ? item.dictKey : null
})
})
}
}else {
fieldsValue = [{}];
}
const params = {
archiAssetState: 1,
archiAssetState: 2,
archiStage: 1,
archiBelongId: this.ruleForm.archiBelongId,
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
......@@ -330,6 +337,10 @@
if(res.code == 200) {
this.addDialog = false;
this.get_table();
Message({
type: 'success',
message: '新增成功!'
});
}else {
Message({
type: 'error',
......@@ -342,6 +353,10 @@
if(res.code == 200) {
this.addDialog = false;
this.get_table();
Message({
type: 'success',
message: '编辑成功!'
});
}else {
Message({
type: 'error',
......@@ -402,7 +417,10 @@
this.pager.size = res.data.size;
this.tableData = res.data.records;
}else {
this.tableData = [];
Message({
type: 'error',
message: res.msg
});
}
})
},
......@@ -420,11 +438,10 @@
});
},
editItem(row){//编辑
console.log(row)
this.addDialog = true;
this.is_add_edit = 'edit';
this.ruleForm.let1 = row.assetName;
this.ruleForm.let2 = String(row.parentAssetId);
this.ruleForm.let2 = row.parentAssetId ? String(row.parentAssetId) : null;
this.ruleForm.let3 = row.archiEleId;
this.ruleForm.let4 = row.sort;
this.ruleForm.let5 = row.isShow == 1 ? '显示' : '隐藏';
......@@ -470,7 +487,7 @@
})
})
},
ZuJianLeiXingSelectChange(data) {//组件类型选择后
zuJianLeiXingSelectChange(data) {//组件类型选择后
const params = {
type: '1',
typeId: data,
......@@ -486,6 +503,7 @@
}
item['value_'] = '';
});
console.log(res.data)
this.ruleForm.dynamicForm_ = res.data;
}else {
this.ruleForm.dynamicForm_ = [];
......@@ -502,10 +520,12 @@
this.getZuJianLeiXingSelect(null);
}
},
getZuJianLeiXingSelect(elementName) {//组件类型下拉框值
getZuJianLeiXingSelect(elementName, archiBelongId) {//组件类型下拉框值
const params = {
state: '1',
type: '1',
elementName: elementName,
archiBelongId: this.ruleForm.archiBelongId,
archiBelongId: archiBelongId
};
queryZiChanJiaGouZuJianLeiXing(params).then(res => {
if(res.code == 200) {
......@@ -732,6 +752,7 @@
this.searchParams.archiAssetTypeId = res.data[0].subList[0].viewId;
this.getShangJiJieDianSelect(res.data[0].subList[0].assetConstant, res.data[0].subList[0].archiBelongId);
this.getZuJianLeiXingSelect(null, this.ruleForm.archiBelongId);
this.getGuanLianZiChanSelectData(null);
this.get_table();
......
<template>
<div class="currentAssetsList">
<div class="busiAssetslist">
<div class="left_container">
<el-tree
class="filter-tree"
:data="treeData"
:highlight-current="true"
:props="{ children: 'children', label: 'name', id: 'belongId' }"
:props="{ children: 'subList', label: 'viewName', id: 'viewId' }"
default-expand-all
node-key="belongId"
node-key="viewId"
:default-expanded-keys="treeDefaultExpand"
:current-node-key="currentNodekey"
@node-click="treeClick"
ref="tree">
......@@ -26,7 +27,7 @@
</div>
<div class="search_menu_item">
<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-select>
......@@ -56,17 +57,21 @@
<p>导入</p>
</div>
<!-- <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="" />
<p>导出</p>
</div> -->
<div class="import_btn" @click="openDownloadTemplateDialog" style="margin-left: 0;width: 100px;">
<img class="btn_icon" src="@/assets/tech-politics-fabric/export.png" alt="" />
<p>模版下载</p>
</div>
</div>
<el-table :height="tableHeight" @selection-change="select_table_rows" v-loading="loading" :data="tableData" stripe border>
<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 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="parentAssetName" label="上级架构组件名称" width=" 300" :show-overflow-tooltip="true" 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="createMan" 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">
......@@ -103,12 +108,12 @@
</el-form-item>
<el-form-item label="上级节点:" prop="let2">
<el-select @change="selectFun" clearable placeholder="请选择" v-model="ruleForm.let2">
<el-select clearable placeholder="请选择" v-model="ruleForm.let2">
<el-option v-for="item in shangJiJieDianSelect" :key="item.assetId" :label="item.assetName" :value="item.assetId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="组件类型:" prop="let3">
<el-select @change="ZuJianLeiXingSelectChange" filterable remote :remote-method="queryZuJianLeiXingSelect" clearable placeholder="请选择" v-model="ruleForm.let3">
<el-select @change="zuJianLeiXingSelectChange" filterable remote :remote-method="queryZuJianLeiXingSelect" clearable placeholder="请选择" v-model="ruleForm.let3">
<el-option v-for="item in zuJianLeiXingSelect" :key="item.elementId" :label="item.elementName" :value="item.elementId"></el-option>
</el-select>
</el-form-item>
......@@ -121,16 +126,21 @@
<el-radio label="隐藏"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item class="dynamicFormClass" v-for="(item, index) in ruleForm.dynamicForm" :key="index" :label="item.cnName+':'" :prop="item.fieldName">
<el-form-item label="关联资产:" prop="let6">
<!-- <el-select clearable placeholder="请选择" v-model="ruleForm.let6">
<el-option v-for="item in guanLianZiChanSelect" :key="item.assetId" :label="item.assetName" :value="item.assetId"></el-option>
</el-select> -->
</el-form-item>
<el-form-item class="dynamicFormClass" v-for="(item, index) in ruleForm.dynamicForm_" :key="index" :label="item.cnName+':'">
<template v-if="item.controlType == 0">
<el-input placeholder="请输入内容" v-no-backslash v-model="item.defaultValue" maxlength="100"></el-input>
<el-input placeholder="请输入内容" v-no-backslash v-model="item.value_" maxlength="100"></el-input>
</template>
<template v-else-if="item.controlType == 1">
<el-input placeholder="请输入内容" v-no-backslash v-model="item.defaultValue" type="textarea" :rows="3" maxlength="200" show-word-limit></el-input>
<el-input placeholder="请输入内容" v-no-backslash v-model="item.value_" type="textarea" :rows="3" maxlength="200" show-word-limit></el-input>
</template>
<template v-else>
<el-select clearable v-model="item.defaultValue">
<el-option v-for="item2 in item.propertyValue" :key="item2.elementId" :label="item2.elementName" :value="item.elementId"></el-option>
<el-select class="selectComponent" v-model="item.value_" clearable>
<el-option v-for="item2 in item.dictArray_" :key="item2.id" :label="item2.label" :value="item2.id"></el-option>
</el-select>
</template>
</el-form-item>
......@@ -141,40 +151,76 @@
<el-button @click="cancelDialog">取消</el-button>
</span>
</el-dialog>
<el-dialog
title="模版下载"
:visible.sync="templateDialog"
:center="false"
:close-on-click-modal="false"
width="60%">
<el-form :model="ruleForm2" ref="form2" :rules="rules2" style="">
<div class="form_item_container">
<el-form-item label="上级节点:" prop="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-select>
</el-form-item>
<el-form-item label="组件类型:" prop="let2">
<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-select>
</el-form-item>
</div>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="greenButton" @click="saveTemplateDialog">确定</el-button>
<el-button @click="templateDialog = false">取消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Drawio from '@/components/drawio.vue';
import {
query_jia_gou_gui_shu,
getZiChanJiaGouTable,
editAndDeleteZiChanJiaGouTable,
getArchiViewManage,
getCurrentZiChanJiaGouTable,
editZiChanJiaGouTable,
deleteMoreZiChanJiaGouTable,
addMoreZiChanJiaGouTable,
queryZiChanJiaGouShangJiJieDian,
queryZiChanJiaGouZuJianLeiXing,
queryZuJianLeiXingBelongForm
queryZuJianLeiXingBelongForm,
exportZhiChanJiaGou,
getDianXingAnLiSelectData,
importZhiChanJiaGou,
queryGuanLianZiChanSelect
} from '@/api/index.js';
import $ from 'jquery';
import { MessageBox, Message } from 'element-ui';
export default {
name: 'CurrentAssetsList',
name: 'BusiAssetslist',
components: {
Drawio
},
watch: {
},
data() {
return {
templateDialog: false,
ruleForm2: {
let1: null,
let2: null,
},
ruleForm: {
let1: null,
let2: null,
let3: null,
let4: 0,
let5: '显示',
dynamicForm: []
let6: '',
dynamicForm_: [],
archiBelongId: null,
},
rules: {
let1: [
......@@ -184,17 +230,26 @@
{ required: true, message: '请选择节点类型', trigger: 'change' },
],
},
rules2: {
let1: [
{ required: true, message: '请选择上级节点', trigger: 'change' },
],
let2: [
{ required: true, message: '请选择组件类型', trigger: 'change' },
],
},
searchParams: {
assetName: null,
createMan: null,
archiAssetType: null,
archiEleId: null,
assetConstant: null,
archiAssetTypeId: null,
},
treeData: [
{
belongId: '1',
name: '总体架构资产',
children: []
viewId: 0,
viewName: '架构视图管理',
subList: []
}
],
tableHeight: null,
......@@ -211,8 +266,10 @@
currentNodekey: null,
is_add_edit: 'add',
zuJianLeiXingSelect: [],
belongId: null,
shangJiJieDianSelect: [],
treeDefaultExpand: [],
editId: null,
guanLianZiChanSelect: []
};
},
mounted(){
......@@ -223,17 +280,96 @@
this.set_table_height();
},
methods: {
getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单
const params = {
assetName: assetName,
assetConstant: this.searchParams.assetConstant
}
queryGuanLianZiChanSelect(params).then(res => {
console.log(res)
});
},
saveDialog() {//弹框保存
this.$refs.form.validate(valid => {
if(valid) {
console.log(this.ruleForm)
// this.addDialog = false;
// console.log(this.ruleForm);
let parentAssetName, assetCode, fieldsValue = [], eleName;
if(this.ruleForm.let2 && this.shangJiJieDianSelect.length > 0) {
const items = this.shangJiJieDianSelect.find(item => item.assetId == this.ruleForm.let2);
parentAssetName = items.assetName;
assetCode = items.parentCode;
}
const items2 = this.zuJianLeiXingSelect.find(item => item.elementId == this.ruleForm.let3);
eleName = items2.elementName;
if(this.ruleForm.dynamicForm_.length > 0) {
this.ruleForm.dynamicForm_.forEach(item => {
fieldsValue.push({
cnName: item.cnName,
value_: item.value_,
controlType: item.controlType,
dictKey: item.dictKey ? item.dictKey : null
})
})
}else {
fieldsValue = [{}];
}
const params = {
archiAssetState: 1,
archiStage: 1,
archiBelongId: this.ruleForm.archiBelongId,
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
archiEleId: this.ruleForm.let3,
assetName: this.ruleForm.let1,
assetId: this.is_add_edit == 'add' ? null : this.editId,
parentAssetId: this.ruleForm.let2,
parentAssetName: parentAssetName,
isShow: this.ruleForm.let5 == '显示' ? 1 : 0,
fieldsValue: fieldsValue,
assetCode: assetCode,
eleName: eleName
}
if(this.is_add_edit == 'add') {
addMoreZiChanJiaGouTable(params).then(res => {
if(res.code == 200) {
this.addDialog = false;
this.get_table();
Message({
type: 'success',
message: '新增成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}else {
editZiChanJiaGouTable(params).then(res => {
if(res.code == 200) {
this.addDialog = false;
this.get_table();
Message({
type: 'success',
message: '编辑成功!'
});
}else {
Message({
type: 'error',
message: res.msg
});
}
})
}
}
});
},
cancelDialog() {//弹框取消
this.addDialog = false;
},
// selectable(row) {//表格勾选框禁用
// if(row.state == 1 || row.state == 0) {
......@@ -249,7 +385,7 @@
reset() {//重置
this.searchParams.assetName = null;
this.searchParams.createMan = null;
this.searchParams.archiAssetType = null;
this.searchParams.archiEleId = null;
},
// 每页条数改变
handleSizeChange(val) {
......@@ -266,13 +402,14 @@
const params = {
"assetName": this.searchParams.assetName,
"createMan": this.searchParams.createMan,
"archiAssetType": this.searchParams.archiAssetType,
"archiEleId": this.searchParams.archiEleId,
"assetConstant": this.searchParams.assetConstant,
"archiAssetTypeId": this.searchParams.archiAssetTypeId,
"current": this.pager.current,
"pageSize": this.pager.size,
};
this.loading = true;
getZiChanJiaGouTable(params).then(res => {
getCurrentZiChanJiaGouTable(params).then(res => {
if(res.code == 200) {
this.loading = false;
this.pager.current = res.data.current;
......@@ -280,7 +417,10 @@
this.pager.size = res.data.size;
this.tableData = res.data.records;
}else {
this.tableData = [];
Message({
type: 'error',
message: res.msg
});
}
})
},
......@@ -294,30 +434,60 @@
this.ruleForm.let3 = null;
this.ruleForm.let4 = 0;
this.ruleForm.let5 = '显示';
this.ruleForm.dynamicForm = [];
this.ruleForm.dynamicForm_ = [];
});
},
editItem(row){//编辑
this.addDialog = true;
this.is_add_edit = 'edit';
},
selectFun(data) {//上级节点选择
console.log(data)
console.log(this.shangJiJieDianSelect)
this.ruleForm.let1 = row.assetName;
this.ruleForm.let2 = row.parentAssetId ? String(row.parentAssetId) : null;
this.ruleForm.let3 = row.archiEleId;
this.ruleForm.let4 = row.sort;
this.ruleForm.let5 = row.isShow == 1 ? '显示' : '隐藏';
this.editId = row.assetId;
let fieldsValue = row.fieldsValue;
if(fieldsValue.length == 4) {
this.ruleForm.dynamicForm_ = [];
}else {
let fieldsValue_ = JSON.parse(fieldsValue);
fieldsValue_.map(item => {
if(item.dictKey) {
this.get_key(item.dictKey).then(res2 => {
this.$set(item, 'dictArray_', res2);
})
}
});
this.ruleForm.dynamicForm_ = fieldsValue_;
}
},
getShangJiJieDianSelect(archiType, belongId) {//上级节点下拉框值
getShangJiJieDianSelect(assetConstant, archiBelongId) {//上级节点下拉框值
const params = {
archiType: archiType,
parentAssetId: belongId,
archiType: assetConstant,
parentAssetId: archiBelongId,
};
queryZiChanJiaGouShangJiJieDian(params).then(res => {
if(res.code == 200) {
console.log('上级节点')
console.log(res.data)
this.shangJiJieDianSelect = res.data;
}
})
},
ZuJianLeiXingSelectChange(data) {//组件类型选择后
get_key(key) {//查询字典
const params = {
key: key
}
return new Promise((resolve, reject) => {
getDianXingAnLiSelectData(params).then(res => {
if(res.code == 200) {
resolve(res.data);
}
})
})
},
zuJianLeiXingSelectChange(data) {//组件类型选择后
const params = {
type: '1',
typeId: data,
......@@ -325,10 +495,18 @@
queryZuJianLeiXingBelongForm(params).then(res => {
if(res.code == 200) {
if(res.data.length > 0) {
this.ruleForm.dynamicForm = res.data;
res.data.map(item => {
if(item.controlType == 2) {
this.get_key(item.dictKey).then(res2 => {
this.$set(item, 'dictArray_', res2);
})
}
item['value_'] = '';
});
console.log(res.data)
this.ruleForm.dynamicForm_ = res.data;
}else {
this.ruleForm.dynamicForm = [];
this.ruleForm.dynamicForm_ = [];
}
}
})
......@@ -342,13 +520,18 @@
this.getZuJianLeiXingSelect(null);
}
},
getZuJianLeiXingSelect(elementName) {//组件类型下拉框值
getZuJianLeiXingSelect(elementName, archiBelongId) {//组件类型下拉框值
const params = {
state: '1',
type: '1',
elementName: elementName,
archiBelongId: this.belongId,
archiBelongId: archiBelongId
};
queryZiChanJiaGouZuJianLeiXing(params).then(res => {
if(res.code == 200) {
console.log('组件类型')
console.log(res.data)
this.zuJianLeiXingSelect = res.data;
}else {
Message({
......@@ -372,6 +555,7 @@
const params = {
assetId: assetIdArray,
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
};
MessageBox.confirm('确定删除?', '提示', {
confirmButtonText: '确定',
......@@ -407,12 +591,59 @@
inpEle.type = "file";
inpEle.style.display = "none";
inpEle.addEventListener("change", event => {
console.log(event.target.files[0]);
// console.log(event.target.files[0]);
var formData = new FormData();
formData.append("file", event.target.files[0]);
formData.append("typeCode", this.searchParams.assetConstant);
importZhiChanJiaGou(formData).then(res => {
if(res.code == 200) {
this.get_table();
Message({
type: 'success',
message: '导入成功!'
});
}
});
});
inpEle.click();
},
exportFile() {//导出
openDownloadTemplateDialog() {//打开模版下载窗口
this.templateDialog = true;
this.$nextTick(() => {
this.$refs.form2.resetFields();
this.ruleForm2.let1 = null;
this.ruleForm2.let2 = null;
});
},
saveTemplateDialog() {//下载模版
this.$refs.form2.validate(valid => {
if(valid) {
const items = this.shangJiJieDianSelect.find(item => item.assetId == this.ruleForm2.let1);
let parentName = items.assetName;
const params = {
parentId: this.ruleForm2.let1,
parentName: parentName,
typeId: this.ruleForm2.let2
}
// const params = {
// parentId: '1',
// parentName: '应用架构A',
// typeId: 149
// }
exportZhiChanJiaGou(params).then(res => {
let blob = new Blob([res], { type: 'application/octet-stream' });
let url = URL.createObjectURL(blob);
let link = document.createElement('a');
link.href = url;
link.download = '模版文件.xls';
document.body.appendChild(link);
link.click();
this.templateDialog = false;
});
}
});
},
deleteItem(row){//删除
MessageBox.confirm('确定删除?', '提示', {
......@@ -425,6 +656,7 @@
const params = {
assetId: [row.assetId],
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
}
deleteMoreZiChanJiaGouTable(params).then(res => {
if(res.code == 200) {
......@@ -456,57 +688,73 @@
this.tableHeight = right_container_height - 260 + 'px';
},
treeClick(data) {//左侧树点击
if(data.children) {
if(data.subList) {
return;
}else {
this.searchParams.assetConstant = data.assetConstant;
this.getShangJiJieDianSelect(data.archiType, data.belongId);
this.belongId = data.belongId;
this.getZuJianLeiXingSelect(null, this.belongId);
this.searchParams.archiAssetTypeId = data.viewId;
this.getShangJiJieDianSelect(data.assetConstant, data.archiBelongId);
this.archiBelongId = data.archiBelongId;
this.getZuJianLeiXingSelect(null, this.archiBelongId);
this.get_table();
}
},
getTreeData() {//查询左侧树
query_jia_gou_gui_shu({}).then(res => {
getArchiViewManage({}).then(res => {
if(res.code == 200) {
this.treeData[0].children = res.data;
this.currentNodekey = res.data[0].belongId;
this.treeDefaultExpand = [res.data[0].viewId];
this.currentNodekey = res.data[0].subList[0].viewId;
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey);
});
res.data.map(item => {
switch(item.name){
switch(item.viewName){
case '安全架构':
item['assetConstant'] = 'safe';
item['archiType'] = 'ARCHI_SAFE';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_SAFE';
item2['archiBelongId'] = 5;
})
break;
case '技术架构':
item['assetConstant'] = 'tech';
item['archiType'] = 'ARCHI_TECHNOLOGY';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_TECHNOLOGY';
item2['archiBelongId'] = 4;
})
break;
case '数据架构':
item['assetConstant'] = 'data';
item['archiType'] = 'ARCHI_DATA';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_DATA';
item2['archiBelongId'] = 3;
})
break;
case '应用架构':
item['assetConstant'] = 'app';
item['archiType'] = 'ARCHI_APPLICATION';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_APPLICATION';
item2['archiBelongId'] = 2;
})
break;
case '业务架构':
item['assetConstant'] = 'busi';
item['archiType'] = 'ARCHI_BUSINESS';
item.subList.map(item2 => {
item2['assetConstant'] = 'ARCHI_BUSINESS';
item2['archiBelongId'] = 1;
})
break;
}
})
this.searchParams.assetConstant = res.data[0].assetConstant;
this.getShangJiJieDianSelect(res.data[0].archiType, res.data[0].belongId);
this.belongId = res.data[0].belongId;
this.getZuJianLeiXingSelect(null, this.belongId);
this.treeData[0].subList = res.data;
this.ruleForm.archiBelongId = res.data[0].subList[0].archiBelongId;
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.getZuJianLeiXingSelect(null, this.ruleForm.archiBelongId);
this.getGuanLianZiChanSelectData(null);
this.get_table();
this.$nextTick(() => {
this.$refs.tree.setCurrentKey(this.currentNodekey);
});
}else {
......@@ -525,6 +773,11 @@
}
</style>
<style scoped>
.filter-tree{
width: 300px;
height: 100%;
overflow-y: auto;
}
.dynamicFormClass{
width: 100% !important;
}
......@@ -582,7 +835,7 @@
/deep/ .is-leaf {
background-color: rgb(245,246,250) !important;
}
.currentAssetsList{
.busiAssetslist{
width: 100%;
/* height: calc(100% - 20px); */
height: 100%;
......
......@@ -485,7 +485,6 @@ export default {
getDianXingAnLiSelectData(params).then(res => {
if(res.code == 200) {
this.selectData3 = res.data;
console.log(this.selectData3);
}
})
},
......
......@@ -25,6 +25,7 @@
style="width: 208px;"
v-model="ruleForm.let4"
type="date"
placeholder="请选择"
clearable
value-format="yyyy-MM-dd">
</el-date-picker>
......@@ -87,9 +88,11 @@
<script>
import {
queryLogManageTable,
getDianXingAnLiSelectData
getDianXingAnLiSelectData,
queryLogManageStorageUpper,
queryLogManageAllLog
} from '@/api/index.js';
import { MessageBox, Message } from 'element-ui';
import { MessageBox, Message, Notification } from 'element-ui';
import $ from 'jquery';
export default {
......@@ -166,10 +169,40 @@ export default {
status = 0;
this.set_table_height(140);
}
})
Promise.all([ this.getStorageUpper(), this.getAllLog() ]).then(res2 => {
let number1 = res2[0];
let number2 = res2[1];
Notification({
title: '通知',
dangerouslyUseHTMLString: true,
message: `<div>本系统审计数据存储上限<span style="color: red;">${number1}</span>条,审计日志数据总记录<span style="color: blue;">${number2}</span>条。 </div>`,
position: 'bottom-right',
duration: 5000
});
});
},
methods: {
getStorageUpper() {//存储上限
return new Promise((resolve, reject) => {
queryLogManageStorageUpper({}).then(res => {
if(res.code == 200) {
resolve(res.data.value);
}
})
})
},
getAllLog() {//总记录
return new Promise((resolve, reject) => {
queryLogManageAllLog({}).then(res => {
if(res.code == 200) {
resolve(res.msg);
}
})
});
},
get_fu_he_du_select() {//符合度下拉
const params = {
key: "tech_compliance"
......
......@@ -5,16 +5,16 @@
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">模板名称</span>
<el-input v-no-backslash maxlength="100" v-model="searchParams.tempName" placeholder="请输入内容" class="search_item"></el-input>
<el-input v-no-backslash maxlength="100" v-model="searchParams.tplName" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">模板类型</span>
<el-select clearable v-model="searchParams.tempType" placeholder="请选择" style="width: 210px;">
<el-select clearable v-model="searchParams.tplType" placeholder="请选择" style="width: 210px;">
<el-option label="需求模版" :value="1"></el-option>
<el-option label="概设模版" :value="2"></el-option>
</el-select>
<!-- <el-select v-model="searchParams.tempType" placeholder="请选择" class="search_item">
<el-option v-for="item in moBanLeiXing" :key="item.value" :label="item.tempName" :value="item.value"></el-option>
<!-- <el-select v-model="searchParams.tplType" placeholder="请选择" class="search_item">
<el-option v-for="item in moBanLeiXing" :key="item.value" :label="item.tplName" :value="item.value"></el-option>
</el-select> -->
</div>
<div class="search_menu_item">
......@@ -49,11 +49,11 @@
<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-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="tempName" label="模板名称" align="center"></el-table-column>
<el-table-column prop="tplName" label="模板名称" align="center"></el-table-column>
<el-table-column label="模板类型" align="center">
<template slot-scope="scope">
<span v-if="scope.row.tempType == 1">需求模版</span>
<span v-if="scope.row.tempType == 2">概设模版</span>
<span v-if="scope.row.tplType == 1">需求模版</span>
<span v-if="scope.row.tplType == 2">概设模版</span>
</template>
</el-table-column>
<el-table-column prop="createMan" label="创建人" align="center"></el-table-column>
......@@ -66,7 +66,7 @@
</el-tooltip>
</template>
</el-table-column>
<el-table-column prop="tempRemark" width="200" :show-overflow-tooltip="true" label="备注" align="center"></el-table-column>
<el-table-column prop="tplRemark" width="200" :show-overflow-tooltip="true" label="备注" align="center"></el-table-column>
<el-table-column label="操作" width="260" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
......@@ -204,8 +204,8 @@ export default {
},
tableHeight: null,
searchParams: {
tempName: null,
tempType: null,
tplName: null,
tplType: null,
createTime: null,
},
is_add_edit: 'add',
......@@ -228,10 +228,10 @@ export default {
editItem(row) {//编辑
console.log(row)
this.is_add_edit = 'edit';
this.editId = row.krtId;
this.ruleForm.let1 = row.tempName;
this.ruleForm.let2 = row.tempType;
this.ruleForm.let4 = row.tempRemark;
this.editId = row.tplId;
this.ruleForm.let1 = row.tplName;
this.ruleForm.let2 = row.tplType;
this.ruleForm.let4 = row.tplRemark;
if(row.fileName) {
this.ruleForm.let3 = row.fileId;
this.ruleForm.let5 = row.fileName;
......@@ -273,7 +273,7 @@ export default {
type: 'warning'
}).then(() => {
const params = {
krtId: row.krtId,
tplId: row.tplId,
delFlag: 1
}
editReportTemplateFabric(params).then(res => {
......@@ -302,14 +302,14 @@ export default {
this.$refs.form.validate(valid => {
if(valid) {
const params = {
tempName: this.ruleForm.let1,
tempType: this.ruleForm.let2,
tplName: this.ruleForm.let1,
tplType: this.ruleForm.let2,
fileId: this.ruleForm.let3,
fileName: this.ruleForm.let5,
fileUrl: this.ruleForm.let6,
tempRemark: this.ruleForm.let4,
tplRemark: this.ruleForm.let4,
};
const requestParams = this.is_add_edit == 'add' ? params : { ...params, krtId: this.editId };
const requestParams = this.is_add_edit == 'add' ? params : { ...params, tplId: this.editId };
if(this.is_add_edit == 'add') {
addReportTemplateFabric(requestParams).then(res => {
if(res.code == 200) {
......@@ -390,10 +390,10 @@ export default {
}else {
let krtIdArray = [];
this.selectTable.forEach(item => {
krtIdArray.push(item.krtId);
krtIdArray.push(item.tplId);
});
const params = {
krtId: krtIdArray,
tplId: krtIdArray,
delFlag: 1
};
MessageBox.confirm('确定删除?', '提示', {
......@@ -430,8 +430,8 @@ export default {
this.get_table();
},
reset() {//重置
this.searchParams.tempName = null;
this.searchParams.tempType = null;
this.searchParams.tplName = null;
this.searchParams.tplType = null;
this.searchParams.createTime = null;
},
// 每页条数改变
......@@ -454,8 +454,8 @@ export default {
endTime_ = this.searchParams.createTime[1];
}
const params = {
"tempName": this.searchParams.tempName,
"tempType": this.searchParams.tempType,
"tplName": this.searchParams.tplName,
"tplType": this.searchParams.tplType,
"beginTime": beginTime_,
"endTime": endTime_,
"current": this.pager.current,
......
......@@ -18,7 +18,7 @@
<div class="search_menu_item">
<span class="search_title">模版名称</span>
<el-select clearable v-model="searchParams.tempName" placeholder="请选择" style="width: 210px;">
<el-option v-for="item in moBanMingCheng" :key="item.krtId" :label="item.tempName" :value="item.krtId"></el-option>
<el-option v-for="item in moBanMingCheng" :key="item.tplId" :label="item.tempName" :value="item.tplId"></el-option>
</el-select>
</div>
</div>
......@@ -123,7 +123,7 @@
</el-form-item>
<el-form-item label="模板名称:" prop="let4">
<el-select clearable v-model="ruleForm.let4" placeholder="请选择" style="width: 210px;">
<el-option v-for="item in moBanMingCheng" :key="item.krtId" :label="item.tempName" :value="item.krtId"></el-option>
<el-option v-for="item in moBanMingCheng" :key="item.tplId" :label="item.tempName" :value="item.tplId"></el-option>
</el-select>
</el-form-item>
</div>
......@@ -197,9 +197,9 @@ export default {
tableHeight: null,
moBanMingCheng: [],
is_add_edit: 'add',
tempName_: null,
krtId_: null,
krtCode_: null,
tplName_: null,
linkId_: null,
linkCode_: null,
deptId_: null,
deptCode_: null,
};
......@@ -255,15 +255,15 @@ export default {
this.ruleForm.let1 = row.deptName;
this.ruleForm.let2 = row.appName;
this.ruleForm.let3 = row.projectName;
this.ruleForm.let4 = row.krtId;
this.ruleForm.let4 = row.tplId;
this.add_dialog = true;
this.$nextTick(() => {
this.$refs.form.clearValidate();
});
this.is_add_edit = 'edit';
this.tempName_ = row.tempName;
this.krtId_ = row.krtId;
this.krtCode_ = row.krtCode;
this.tplName_ = row.tplName;
this.linkId_ = row.linkId;
this.linkCode_ = row.linkCode;
this.deptId_ = row.deptId;
this.deptCode_ = row.deptCode;
},
......@@ -279,7 +279,7 @@ export default {
type: 'warning'
}).then(() => {
const params = {
krtlId: row.krtlId,
linkId: row.linkId,
delFlag: 1
}
deleteBaoGaoMoBanGuanLianShiYong(params).then(res => {
......@@ -306,26 +306,26 @@ export default {
ok() {//弹框点击确定
this.$refs.form.validate(valid => {
if(valid) {
let result = this.moBanMingCheng.find(item => item.krtId == this.ruleForm.let4);
const krtCode = result ? result.krtCode : null;
const krtId = result ? result.krtId : null;
const tempName = result ? result.tempName : null;
let result = this.moBanMingCheng.find(item => item.tplId == this.ruleForm.let4);
const tplCode = result ? result.tplCode : null;
const tplId = result ? result.tplId : null;
const tplName = result ? result.tplName : null;
const params1 = {
deptName: 1,
appName: this.ruleForm.let2,
projectName: this.ruleForm.let3,
tempName,
krtCode,
krtId,
tplName,
tplCode,
tplId,
};
const params2 = {
deptName: this.ruleForm.let1,
appName: this.ruleForm.let2,
projectName: this.ruleForm.let3,
tempName: this.tempName_,
krtCode: this.krtCode_,
krtId: this.krtId_,
tplName: this.tplName_,
tplCode: this.tplCode_,
tplId: this.linkId_,
deptId: this.deptId_,
deptCode: this.deptCode_,
};
......@@ -404,10 +404,10 @@ export default {
}else {
let krtlIdArray = [];
this.selectTable.forEach(item => {
krtlIdArray.push(item.krtlId);
krtlIdArray.push(item.linkId);
});
const params = {
krtlId: krtlIdArray,
linkId: krtlIdArray,
delFlag: 1
};
MessageBox.confirm('确定删除?', '提示', {
......
......@@ -5,7 +5,7 @@
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">政策名称</span>
<el-input v-no-backslash v-model="searchParams.tpoName" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
<el-input v-no-backslash v-model="searchParams.policyName" maxlength="100" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item" style="margin-right: 50px;">
<span class="search_title">启用时间</span>
......@@ -60,8 +60,8 @@
<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-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="tpoName" label="政策名称" align="center"></el-table-column>
<el-table-column prop="tepContent" width="140" :show-overflow-tooltip="true" label="政策描述" align="center"></el-table-column>
<el-table-column prop="policyName" label="政策名称" align="center"></el-table-column>
<el-table-column prop="policyContent" width="140" :show-overflow-tooltip="true" label="政策描述" align="center"></el-table-column>
<el-table-column prop="scope_" label="适用范围" align="center"></el-table-column>
<el-table-column prop="deptName" label="发布部门" align="center"></el-table-column>
<el-table-column prop="level_" label="级别" align="center"></el-table-column>
......@@ -74,7 +74,7 @@
<span v-if="scope.row.state == 1">已启用</span>
</template>
</el-table-column>
<el-table-column prop="tepRemark" label="备注" width="140" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column prop="policyRemark" label="备注" width="140" :show-overflow-tooltip="true" align="center"></el-table-column>
<el-table-column label="操作" width="360" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
......@@ -218,7 +218,7 @@ export default {
tableData: [],
add_dialog: false,
searchParams: {
tpoName: null,
policyName: null,
startTime: null,
state: null,
},
......@@ -293,7 +293,7 @@ export default {
endTime_ = this.searchParams.startTime[1];
}
const params = {
"tpoName": this.searchParams.tpoName,
"policyName": this.searchParams.policyName,
"beginTime": beginTime_,
"endTime": endTime_,
"state": this.searchParams.state,
......@@ -310,20 +310,20 @@ export default {
});
},
editItem(row) {//编辑
this.ruleForm.let1 = row.tpoName;
this.ruleForm.let1 = row.policyName;
this.ruleForm.let2 = ''+row.scope;
this.ruleForm.let3 = row.deptName;
this.ruleForm.let4 = ''+row.level;
this.ruleForm.let5 = row.startTime;
this.ruleForm.let6 = row.state;
this.ruleForm.let7 = row.tepContent;
this.ruleForm.let8 = row.tepRemark;
this.ruleForm.let7 = row.policyContent;
this.ruleForm.let8 = row.policyRemark;
this.add_dialog = true;
this.$nextTick(() => {
this.$refs.form.clearValidate();
});
this.is_add_edit = 'edit';
this.editId = row.ktepId;
this.editId = row.policyId;
},
startItem(row){//启用
MessageBox.confirm('确定启用?', '提示', {
......@@ -334,7 +334,7 @@ export default {
type: 'warning'
}).then(() => {
const params = {
ktepId: row.ktepId,
policyId: row.policyId,
state: 1
}
editJiShuZhengCeJieGouHuaTable(params).then(res => {
......@@ -367,7 +367,7 @@ export default {
type: 'warning'
}).then(() => {
const params = {
ktepId: row.ktepId,
policyId: row.policyId,
state: 0
}
editJiShuZhengCeJieGouHuaTable(params).then(res => {
......@@ -400,7 +400,7 @@ export default {
type: 'warning'
}).then(() => {
const params = {
ktepId: row.ktepId,
policyId: row.policyId,
delFlag: 1,
}
editJiShuZhengCeJieGouHuaTable(params).then(res => {
......@@ -428,16 +428,16 @@ export default {
this.$refs.form.validate(valid => {
if(valid) {
const params = {
tpoName: this.ruleForm.let1,
policyName: this.ruleForm.let1,
scope: this.ruleForm.let2,
deptName: this.ruleForm.let3,
level: this.ruleForm.let4,
startTime: this.ruleForm.let5,
state: this.ruleForm.let6,
tepContent: this.ruleForm.let7,
tepRemark: this.ruleForm.let8,
policyContent: this.ruleForm.let7,
policyRemark: this.ruleForm.let8,
};
const requestParams = this.is_add_edit == 'add' ? params : { ...params, ktepId: this.editId };
const requestParams = this.is_add_edit == 'add' ? params : { ...params, policyId: this.editId };
if(this.is_add_edit == 'add') {
addJiShuZhengCeJieGouHuaTable(requestParams).then(res => {
if(res.code == 200) {
......@@ -518,10 +518,10 @@ export default {
}else {
let ktepIdArray = [];
this.selectTable.forEach(item => {
ktepIdArray.push(item.ktepId);
ktepIdArray.push(item.policyId);
});
const params = {
ktepId: ktepIdArray,
policyId: ktepIdArray,
state: 0
};
MessageBox.confirm('确定删除?', '提示', {
......@@ -558,7 +558,7 @@ export default {
this.get_table();
},
reset() {//重置
this.searchParams.tpoName = null;
this.searchParams.policyName = null;
this.searchParams.startTime = null;
this.searchParams.state = null;
},
......@@ -582,7 +582,7 @@ export default {
endTime_ = this.searchParams.startTime[1];
}
const params = {
"tpoName": this.searchParams.tpoName,
"policyName": this.searchParams.policyName,
"beginTime": beginTime_,
"endTime": endTime_,
"state": this.searchParams.state,
......
......@@ -5,7 +5,7 @@
<div class="search_menu_item_container">
<div class="search_menu_item">
<span class="search_title">政策名称</span>
<el-input v-no-backslash maxlength="100" v-model="searchParams.tpoName" placeholder="请输入内容" class="search_item"></el-input>
<el-input v-no-backslash maxlength="100" v-model="searchParams.policyName" placeholder="请输入内容" class="search_item"></el-input>
</div>
<div class="search_menu_item">
<span class="search_title">符合度</span>
......@@ -33,8 +33,8 @@
<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="tpoName" label="政策名称" align="center"></el-table-column>
<el-table-column prop="tpoContent" 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>
......@@ -43,7 +43,7 @@
</template>
</el-table-column>
<el-table-column prop="usefulCount" label="应用数量" align="center"></el-table-column>
<el-table-column prop="ktplRemark" label="备注" align="center"></el-table-column>
<el-table-column prop="remark" label="备注" align="center"></el-table-column>
</el-table>
<!-- <el-pagination
background
......@@ -92,7 +92,7 @@ export default {
},
tableHeight: null,
searchParams: {
tpoName: null,
policyName: null,
conformCount: null,
},
fuHeDu: []
......@@ -131,7 +131,7 @@ export default {
this.get_table();
},
reset() {//重置
this.searchParams.tpoName = null;
this.searchParams.policyName = null;
this.searchParams.conformCount = null;
},
// 每页条数改变
......@@ -148,7 +148,7 @@ export default {
get_table() {//查询表格数据
this.loading = true;
const params = {
"tpoName": this.searchParams.tpoName,
"policyName": this.searchParams.policyName,
"conformCount": this.searchParams.conformCount,
"current": this.pager.current,
"pageSize": this.pager.size,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!