Commit 0a8dd46d by liuyong

修改三个架构资产

1 parent 1dd4058d
......@@ -427,7 +427,7 @@ export function queryLogManageAllLog(params) {
export function getCurrentZiChanJiaGouTable(params) {
return post('/network/arc-ast-now/', params);
}
// 现状资产架构,表格
// 系统资产架构,表格
export function getTotalZiChanJiaGouTable(params) {
return post('/network/arc-ast-tot/', params);
}
......@@ -28,7 +28,7 @@
<div class="search_menu_item">
<span class="search_title">组件类型</span>
<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.typeId" :label="item.elementName" :value="item.typeId"></el-option>
</el-select>
</div>
......@@ -112,9 +112,9 @@
<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-option v-for="item in zuJianLeiXingSelect" :key="item.elementId" :label="item.elementName" :value="item.elementId"></el-option>
<el-form-item label="关联资产:" prop="let6">
<el-select clearable @change="guanLianZiChanChange" filterable remote :remote-method="queryGuanLianZiChan" placeholder="请选择" multiple v-model="ruleForm.let6">
<el-option v-for="item in guanLianZiChanSelect" :key="String(item.assetId)" :label="item.assetName" :value="item.assetId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="排序:" prop="let4">
......@@ -126,10 +126,13 @@
<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 label="组件类型:" prop="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.typeId" :label="item.elementName" :value="item.typeId"></el-option>
</el-select>
</el-form-item>
<el-form-item class="dynamicFormClass" v-for="(item, index) in ruleForm.dynamicForm0_" :key="index" :label="item.assetName+':'">
<el-input placeholder="请输入内容" v-no-backslash v-model="item.relaName" maxlength="100"></el-input>
</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">
......@@ -167,7 +170,7 @@
</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-option v-for="item in zuJianLeiXingSelect" :key="item.typeId" :label="item.elementName" :value="item.typeId"></el-option>
</el-select>
</el-form-item>
</div>
......@@ -219,8 +222,8 @@
let4: 0,
let5: '显示',
let6: '',
dynamicForm0_: [],
dynamicForm_: [],
archiBelongId: null,
},
rules: {
let1: [
......@@ -239,6 +242,8 @@
],
},
searchParams: {
archiAssetState: 2,
archiStage: 2,
assetName: null,
createMan: null,
archiEleId: null,
......@@ -280,6 +285,32 @@
this.set_table_height();
},
methods: {
queryGuanLianZiChan(data){
if (data !== '') {
setTimeout(() => {
this.getGuanLianZiChanSelectData(data);
}, 200);
}else {
this.getGuanLianZiChanSelectData(null);
}
},
guanLianZiChanChange(data){//关联资产选择后
let dynamicForm0_Array = [];
if(data.length == 0) {
this.ruleForm.dynamicForm0_ = [];
}else {
data.forEach(item => {
const items = this.guanLianZiChanSelect.find(item2 => item2.assetId == item);
dynamicForm0_Array.push({
assetName: items.assetName,
assetId: items.assetId,
relaName: ''
})
})
this.ruleForm.dynamicForm0_ = dynamicForm0_Array;
}
},
getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单
const params = {
assetName: assetName,
......@@ -287,13 +318,15 @@
}
queryGuanLianZiChanSelect(params).then(res => {
console.log(res)
this.guanLianZiChanSelect = res.data;
});
},
saveDialog() {//弹框保存
this.$refs.form.validate(valid => {
if(valid) {
// console.log(this.ruleForm);
let parentAssetName, assetCode, fieldsValue = [], eleName;
let parentAssetName, assetCode, fieldsValue = [], eleName, targetAsset = [];
if(this.ruleForm.let2 && this.shangJiJieDianSelect.length > 0) {
const items = this.shangJiJieDianSelect.find(item => item.assetId == this.ruleForm.let2);
......@@ -301,7 +334,7 @@
assetCode = items.parentCode;
}
const items2 = this.zuJianLeiXingSelect.find(item => item.elementId == this.ruleForm.let3);
const items2 = this.zuJianLeiXingSelect.find(item => item.typeId == this.ruleForm.let3);
eleName = items2.elementName;
if(this.ruleForm.dynamicForm_.length > 0) {
......@@ -316,19 +349,34 @@
}else {
fieldsValue = [{}];
}
if(this.ruleForm.dynamicForm0_.length > 0) {
this.ruleForm.dynamicForm0_.forEach(item => {
targetAsset.push({
assetName: item.assetName,
assetId: item.assetId,
relaName: item.relaName,
})
})
}else {
targetAsset = [{}];
}
console.log(targetAsset)
const params = {
archiAssetState: 1,
archiStage: 2,
archiBelongId: this.ruleForm.archiBelongId,
archiAssetState: 2,
archiStage: 2,
archiBelongId: this.archiBelongId,
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
archiEleId: this.ruleForm.let3,
assetName: this.ruleForm.let1,
sort: this.ruleForm.let4,
assetId: this.is_add_edit == 'add' ? null : this.editId,
parentAssetId: this.ruleForm.let2,
parentAssetName: parentAssetName,
isShow: this.ruleForm.let5 == '显示' ? 1 : 0,
fieldsValue: fieldsValue,
targetAsset: targetAsset,
assetCode: assetCode,
eleName: eleName
}
......@@ -400,6 +448,8 @@
},
get_table() {//查询表格数据
const params = {
"archiAssetState": this.searchParams.archiAssetState,
"archiStage": this.searchParams.archiStage,
"assetName": this.searchParams.assetName,
"createMan": this.searchParams.createMan,
"archiEleId": this.searchParams.archiEleId,
......@@ -434,7 +484,9 @@
this.ruleForm.let3 = null;
this.ruleForm.let4 = 0;
this.ruleForm.let5 = '显示';
this.ruleForm.let6 = null;
this.ruleForm.dynamicForm_ = [];
this.ruleForm.dynamicForm0_ = [];
});
},
editItem(row){//编辑
......@@ -447,7 +499,23 @@
this.ruleForm.let5 = row.isShow == 1 ? '显示' : '隐藏';
this.editId = row.assetId;
let fieldsValue = row.fieldsValue;
let targetAsset = row.targetAsset;
let targetAsset_id = [];
if(targetAsset.length == 4) {
this.ruleForm.dynamicForm0_ = [];
}else {
let targetAsset_ = JSON.parse(targetAsset);
this.ruleForm.dynamicForm0_ = targetAsset_;
targetAsset_.forEach(item => {
targetAsset_id.push(
item.assetId
)
})
console.log(targetAsset_id)
}
this.ruleForm.let6 = targetAsset_id;
if(fieldsValue.length == 4) {
this.ruleForm.dynamicForm_ = [];
}else {
......@@ -462,10 +530,10 @@
this.ruleForm.dynamicForm_ = fieldsValue_;
}
},
getShangJiJieDianSelect(assetConstant, archiBelongId) {//上级节点下拉框值
getShangJiJieDianSelect(assetConstant) {//上级节点下拉框值
const params = {
archiType: assetConstant,
parentAssetId: archiBelongId,
parentAssetId: this.archiBelongId,
};
queryZiChanJiaGouShangJiJieDian(params).then(res => {
if(res.code == 200) {
......@@ -488,28 +556,31 @@
})
},
zuJianLeiXingSelectChange(data) {//组件类型选择后
const params = {
type: '1',
typeId: data,
};
queryZuJianLeiXingBelongForm(params).then(res => {
if(res.code == 200) {
if(res.data.length > 0) {
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_ = [];
if(data) {
const params = {
type: '1',
typeId: data,
};
queryZuJianLeiXingBelongForm(params).then(res => {
if(res.code == 200) {
if(res.data.length > 0) {
res.data.map(item => {
if(item.controlType == 2) {
this.get_key(item.dictKey).then(res2 => {
this.$set(item, 'dictArray_', res2);
})
}
item['value_'] = '';
});
this.ruleForm.dynamicForm_ = res.data;
}else {
this.ruleForm.dynamicForm_ = [];
}
}
}
})
})
}else {
this.ruleForm.dynamicForm_ = [];
}
},
queryZuJianLeiXingSelect(data) {//组件类型搜索
if (data !== '') {
......@@ -520,12 +591,12 @@
this.getZuJianLeiXingSelect(null);
}
},
getZuJianLeiXingSelect(elementName, archiBelongId) {//组件类型下拉框值
getZuJianLeiXingSelect(elementName) {//组件类型下拉框值
const params = {
state: '1',
type: '1',
elementName: elementName,
archiBelongId: archiBelongId
archiBelongId: this.archiBelongId
};
queryZiChanJiaGouZuJianLeiXing(params).then(res => {
if(res.code == 200) {
......@@ -747,11 +818,11 @@
}
})
this.treeData[0].subList = res.data;
this.ruleForm.archiBelongId = res.data[0].subList[0].archiBelongId;
this.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.getZuJianLeiXingSelect(null, this.archiBelongId);
this.getGuanLianZiChanSelectData(null);
this.get_table();
......
......@@ -128,11 +128,11 @@
</el-form-item>
<el-form-item label="元素层级:" prop="let5">
<el-select clearable placeholder="请选择" v-model="ruleForm.let5" style="width: 200px;">
<el-option label="1" :value="1"></el-option>
<el-option label="2" :value="2"></el-option>
<el-option label="3" :value="3"></el-option>
<el-option label="4" :value="4"></el-option>
<el-option label="5" :value="5"></el-option>
<el-option label="L1" :value="1"></el-option>
<el-option label="L2" :value="2"></el-option>
<el-option label="L3" :value="3"></el-option>
<el-option label="L4" :value="4"></el-option>
<el-option label="L5" :value="5"></el-option>
</el-select>
</el-form-item>
<el-form-item class="cross1" label="描述:" prop="let4">
......
......@@ -112,9 +112,9 @@
<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-option v-for="item in zuJianLeiXingSelect" :key="item.typeId" :label="item.elementName" :value="item.typeId"></el-option>
<el-form-item label="关联资产:" prop="let6">
<el-select clearable @change="guanLianZiChanChange" filterable remote :remote-method="queryGuanLianZiChan" placeholder="请选择" multiple v-model="ruleForm.let6">
<el-option v-for="item in guanLianZiChanSelect" :key="String(item.assetId)" :label="item.assetName" :value="item.assetId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="排序:" prop="let4">
......@@ -126,9 +126,9 @@
<el-radio label="隐藏"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="关联资产:" prop="let6">
<el-select clearable @change="guanLianZiChanChange" filterable remote :remote-method="queryGuanLianZiChan" placeholder="请选择" multiple v-model="ruleForm.let6">
<el-option v-for="item in guanLianZiChanSelect" :key="String(item.assetId)" :label="item.assetName" :value="item.assetId"></el-option>
<el-form-item label="组件类型:" prop="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.typeId" :label="item.elementName" :value="item.typeId"></el-option>
</el-select>
</el-form-item>
<el-form-item class="dynamicFormClass" v-for="(item, index) in ruleForm.dynamicForm0_" :key="index" :label="item.assetName+':'">
......@@ -224,7 +224,6 @@
let6: '',
dynamicForm0_: [],
dynamicForm_: [],
archiBelongId: null,
},
rules: {
let1: [
......@@ -243,6 +242,8 @@
],
},
searchParams: {
archiAssetState: 2,
archiStage: 1,
assetName: null,
createMan: null,
archiEleId: null,
......@@ -364,11 +365,12 @@
const params = {
archiAssetState: 2,
archiStage: 1,
archiBelongId: this.ruleForm.archiBelongId,
archiBelongId: this.archiBelongId,
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
archiEleId: this.ruleForm.let3,
assetName: this.ruleForm.let1,
sort: this.ruleForm.let4,
assetId: this.is_add_edit == 'add' ? null : this.editId,
parentAssetId: this.ruleForm.let2,
parentAssetName: parentAssetName,
......@@ -446,6 +448,8 @@
},
get_table() {//查询表格数据
const params = {
"archiAssetState": this.searchParams.archiAssetState,
"archiStage": this.searchParams.archiStage,
"assetName": this.searchParams.assetName,
"createMan": this.searchParams.createMan,
"archiEleId": this.searchParams.archiEleId,
......@@ -526,10 +530,10 @@
this.ruleForm.dynamicForm_ = fieldsValue_;
}
},
getShangJiJieDianSelect(assetConstant, archiBelongId) {//上级节点下拉框值
getShangJiJieDianSelect(assetConstant) {//上级节点下拉框值
const params = {
archiType: assetConstant,
parentAssetId: archiBelongId,
parentAssetId: this.archiBelongId,
};
queryZiChanJiaGouShangJiJieDian(params).then(res => {
if(res.code == 200) {
......@@ -552,28 +556,31 @@
})
},
zuJianLeiXingSelectChange(data) {//组件类型选择后
const params = {
type: '1',
typeId: data,
};
queryZuJianLeiXingBelongForm(params).then(res => {
if(res.code == 200) {
if(res.data.length > 0) {
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_ = [];
if(data) {
const params = {
type: '1',
typeId: data,
};
queryZuJianLeiXingBelongForm(params).then(res => {
if(res.code == 200) {
if(res.data.length > 0) {
res.data.map(item => {
if(item.controlType == 2) {
this.get_key(item.dictKey).then(res2 => {
this.$set(item, 'dictArray_', res2);
})
}
item['value_'] = '';
});
this.ruleForm.dynamicForm_ = res.data;
}else {
this.ruleForm.dynamicForm_ = [];
}
}
}
})
})
}else {
this.ruleForm.dynamicForm_ = [];
}
},
queryZuJianLeiXingSelect(data) {//组件类型搜索
if (data !== '') {
......@@ -584,12 +591,12 @@
this.getZuJianLeiXingSelect(null);
}
},
getZuJianLeiXingSelect(elementName, archiBelongId) {//组件类型下拉框值
getZuJianLeiXingSelect(elementName) {//组件类型下拉框值
const params = {
state: '1',
type: '1',
elementName: elementName,
archiBelongId: archiBelongId
archiBelongId: this.archiBelongId
};
queryZiChanJiaGouZuJianLeiXing(params).then(res => {
if(res.code == 200) {
......@@ -811,11 +818,11 @@
}
})
this.treeData[0].subList = res.data;
this.ruleForm.archiBelongId = res.data[0].subList[0].archiBelongId;
this.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.getZuJianLeiXingSelect(null, this.archiBelongId);
this.getGuanLianZiChanSelectData(null);
this.get_table();
......
......@@ -28,7 +28,7 @@
<div class="search_menu_item">
<span class="search_title">组件类型</span>
<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.typeId" :label="item.elementName" :value="item.typeId"></el-option>
</el-select>
</div>
......@@ -112,9 +112,9 @@
<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-option v-for="item in zuJianLeiXingSelect" :key="item.elementId" :label="item.elementName" :value="item.elementId"></el-option>
<el-form-item label="关联资产:" prop="let6">
<el-select clearable @change="guanLianZiChanChange" filterable remote :remote-method="queryGuanLianZiChan" placeholder="请选择" multiple v-model="ruleForm.let6">
<el-option v-for="item in guanLianZiChanSelect" :key="String(item.assetId)" :label="item.assetName" :value="item.assetId"></el-option>
</el-select>
</el-form-item>
<el-form-item label="排序:" prop="let4">
......@@ -126,10 +126,13 @@
<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 label="组件类型:" prop="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.typeId" :label="item.elementName" :value="item.typeId"></el-option>
</el-select>
</el-form-item>
<el-form-item class="dynamicFormClass" v-for="(item, index) in ruleForm.dynamicForm0_" :key="index" :label="item.assetName+':'">
<el-input placeholder="请输入内容" v-no-backslash v-model="item.relaName" maxlength="100"></el-input>
</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">
......@@ -167,7 +170,7 @@
</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-option v-for="item in zuJianLeiXingSelect" :key="item.typeId" :label="item.elementName" :value="item.typeId"></el-option>
</el-select>
</el-form-item>
</div>
......@@ -219,8 +222,8 @@
let4: 0,
let5: '显示',
let6: '',
dynamicForm0_: [],
dynamicForm_: [],
archiBelongId: null,
},
rules: {
let1: [
......@@ -239,6 +242,8 @@
],
},
searchParams: {
archiAssetState: 1,
archiStage: 1,
assetName: null,
createMan: null,
archiEleId: null,
......@@ -280,6 +285,32 @@
this.set_table_height();
},
methods: {
queryGuanLianZiChan(data){
if (data !== '') {
setTimeout(() => {
this.getGuanLianZiChanSelectData(data);
}, 200);
}else {
this.getGuanLianZiChanSelectData(null);
}
},
guanLianZiChanChange(data){//关联资产选择后
let dynamicForm0_Array = [];
if(data.length == 0) {
this.ruleForm.dynamicForm0_ = [];
}else {
data.forEach(item => {
const items = this.guanLianZiChanSelect.find(item2 => item2.assetId == item);
dynamicForm0_Array.push({
assetName: items.assetName,
assetId: items.assetId,
relaName: ''
})
})
this.ruleForm.dynamicForm0_ = dynamicForm0_Array;
}
},
getGuanLianZiChanSelectData(assetName) {//关联资产下拉菜单
const params = {
assetName: assetName,
......@@ -287,13 +318,15 @@
}
queryGuanLianZiChanSelect(params).then(res => {
console.log(res)
this.guanLianZiChanSelect = res.data;
});
},
saveDialog() {//弹框保存
this.$refs.form.validate(valid => {
if(valid) {
// console.log(this.ruleForm);
let parentAssetName, assetCode, fieldsValue = [], eleName;
let parentAssetName, assetCode, fieldsValue = [], eleName, targetAsset = [];
if(this.ruleForm.let2 && this.shangJiJieDianSelect.length > 0) {
const items = this.shangJiJieDianSelect.find(item => item.assetId == this.ruleForm.let2);
......@@ -301,7 +334,7 @@
assetCode = items.parentCode;
}
const items2 = this.zuJianLeiXingSelect.find(item => item.elementId == this.ruleForm.let3);
const items2 = this.zuJianLeiXingSelect.find(item => item.typeId == this.ruleForm.let3);
eleName = items2.elementName;
if(this.ruleForm.dynamicForm_.length > 0) {
......@@ -316,19 +349,34 @@
}else {
fieldsValue = [{}];
}
if(this.ruleForm.dynamicForm0_.length > 0) {
this.ruleForm.dynamicForm0_.forEach(item => {
targetAsset.push({
assetName: item.assetName,
assetId: item.assetId,
relaName: item.relaName,
})
})
}else {
targetAsset = [{}];
}
console.log(targetAsset)
const params = {
archiAssetState: 1,
archiStage: 1,
archiBelongId: this.ruleForm.archiBelongId,
archiStage: 1,
archiBelongId: this.archiBelongId,
assetConstant: this.searchParams.assetConstant,
archiAssetTypeId: this.searchParams.archiAssetTypeId,
archiEleId: this.ruleForm.let3,
assetName: this.ruleForm.let1,
sort: this.ruleForm.let4,
assetId: this.is_add_edit == 'add' ? null : this.editId,
parentAssetId: this.ruleForm.let2,
parentAssetName: parentAssetName,
isShow: this.ruleForm.let5 == '显示' ? 1 : 0,
fieldsValue: fieldsValue,
targetAsset: targetAsset,
assetCode: assetCode,
eleName: eleName
}
......@@ -400,6 +448,8 @@
},
get_table() {//查询表格数据
const params = {
"archiAssetState": this.searchParams.archiAssetState,
"archiStage": this.searchParams.archiStage,
"assetName": this.searchParams.assetName,
"createMan": this.searchParams.createMan,
"archiEleId": this.searchParams.archiEleId,
......@@ -434,7 +484,9 @@
this.ruleForm.let3 = null;
this.ruleForm.let4 = 0;
this.ruleForm.let5 = '显示';
this.ruleForm.let6 = null;
this.ruleForm.dynamicForm_ = [];
this.ruleForm.dynamicForm0_ = [];
});
},
editItem(row){//编辑
......@@ -447,7 +499,23 @@
this.ruleForm.let5 = row.isShow == 1 ? '显示' : '隐藏';
this.editId = row.assetId;
let fieldsValue = row.fieldsValue;
let targetAsset = row.targetAsset;
let targetAsset_id = [];
if(targetAsset.length == 4) {
this.ruleForm.dynamicForm0_ = [];
}else {
let targetAsset_ = JSON.parse(targetAsset);
this.ruleForm.dynamicForm0_ = targetAsset_;
targetAsset_.forEach(item => {
targetAsset_id.push(
item.assetId
)
})
console.log(targetAsset_id)
}
this.ruleForm.let6 = targetAsset_id;
if(fieldsValue.length == 4) {
this.ruleForm.dynamicForm_ = [];
}else {
......@@ -462,10 +530,10 @@
this.ruleForm.dynamicForm_ = fieldsValue_;
}
},
getShangJiJieDianSelect(assetConstant, archiBelongId) {//上级节点下拉框值
getShangJiJieDianSelect(assetConstant) {//上级节点下拉框值
const params = {
archiType: assetConstant,
parentAssetId: archiBelongId,
parentAssetId: this.archiBelongId,
};
queryZiChanJiaGouShangJiJieDian(params).then(res => {
if(res.code == 200) {
......@@ -488,28 +556,31 @@
})
},
zuJianLeiXingSelectChange(data) {//组件类型选择后
const params = {
type: '1',
typeId: data,
};
queryZuJianLeiXingBelongForm(params).then(res => {
if(res.code == 200) {
if(res.data.length > 0) {
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_ = [];
if(data) {
const params = {
type: '1',
typeId: data,
};
queryZuJianLeiXingBelongForm(params).then(res => {
if(res.code == 200) {
if(res.data.length > 0) {
res.data.map(item => {
if(item.controlType == 2) {
this.get_key(item.dictKey).then(res2 => {
this.$set(item, 'dictArray_', res2);
})
}
item['value_'] = '';
});
this.ruleForm.dynamicForm_ = res.data;
}else {
this.ruleForm.dynamicForm_ = [];
}
}
}
})
})
}else {
this.ruleForm.dynamicForm_ = [];
}
},
queryZuJianLeiXingSelect(data) {//组件类型搜索
if (data !== '') {
......@@ -520,12 +591,12 @@
this.getZuJianLeiXingSelect(null);
}
},
getZuJianLeiXingSelect(elementName, archiBelongId) {//组件类型下拉框值
getZuJianLeiXingSelect(elementName) {//组件类型下拉框值
const params = {
state: '1',
type: '1',
elementName: elementName,
archiBelongId: archiBelongId
archiBelongId: this.archiBelongId
};
queryZiChanJiaGouZuJianLeiXing(params).then(res => {
if(res.code == 200) {
......@@ -747,11 +818,11 @@
}
})
this.treeData[0].subList = res.data;
this.ruleForm.archiBelongId = res.data[0].subList[0].archiBelongId;
this.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.getZuJianLeiXingSelect(null, this.archiBelongId);
this.getGuanLianZiChanSelectData(null);
this.get_table();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!