fix: asset弹框bug修复、列表关联弹框bug修复
1.asset弹框部分bug修复 2.关联弹框bug修复
This commit is contained in:
@@ -205,6 +205,35 @@ html {
|
|||||||
margin-left: 270px;
|
margin-left: 270px;
|
||||||
padding: 0 15px 0 25px;
|
padding: 0 15px 0 25px;
|
||||||
}
|
}
|
||||||
|
.content-right-option {
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 6px;
|
||||||
|
}
|
||||||
|
.content-right-option i {
|
||||||
|
color: #6E7274;
|
||||||
|
}
|
||||||
|
.content-right-option i:hover {
|
||||||
|
color: #3E4244;
|
||||||
|
}
|
||||||
|
.content-right-option .el-icon-delete {
|
||||||
|
color: #F98D9A;
|
||||||
|
}
|
||||||
|
.content-right-option .el-icon-delete:hover {
|
||||||
|
color: #D96D7A;
|
||||||
|
}
|
||||||
|
.content-right-option .el-icon-view {
|
||||||
|
color: #60BEFF;
|
||||||
|
}
|
||||||
|
.content-right-option .el-icon-view:hover {
|
||||||
|
color: #409EFF;
|
||||||
|
}
|
||||||
|
.content-right-option .el-icon-edit-outline {
|
||||||
|
color: #6E7274;
|
||||||
|
}
|
||||||
|
.content-right-option .el-icon-edit-outline:hover {
|
||||||
|
color: #3E4244;
|
||||||
|
}
|
||||||
/* begin--顶部工具栏*/
|
/* begin--顶部工具栏*/
|
||||||
.top-tools {
|
.top-tools {
|
||||||
padding: 22px 0 13px 0;
|
padding: 22px 0 13px 0;
|
||||||
@@ -392,10 +421,20 @@ html {
|
|||||||
.pop-box {
|
.pop-box {
|
||||||
border: 1px solid #DCDFE6;
|
border: 1px solid #DCDFE6;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 2px 0 2px 5px;
|
padding: 2px 0;
|
||||||
}
|
}
|
||||||
.pop-box-asset {
|
.pop-box-asset {
|
||||||
height: 160px;
|
height: 160px;
|
||||||
|
width: 247px;
|
||||||
|
}
|
||||||
|
.pop-box-asset li {
|
||||||
|
height: 24px;
|
||||||
|
line-height: 24px;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
.pop-box-asset input {
|
||||||
|
vertical-align: top;
|
||||||
|
width: 90%;
|
||||||
}
|
}
|
||||||
.pop-box-active {
|
.pop-box-active {
|
||||||
background-color: #d8d8d8;
|
background-color: #d8d8d8;
|
||||||
@@ -417,7 +456,7 @@ html {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.right-box-form>.el-form-item {
|
.right-box-form>.el-form-item {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 18px;
|
||||||
}
|
}
|
||||||
.right-box-form .el-select {
|
.right-box-form .el-select {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ const en = {
|
|||||||
modelName:'New Model',
|
modelName:'New Model',
|
||||||
existModel:'Exist Model'
|
existModel:'Exist Model'
|
||||||
},
|
},
|
||||||
purchaseDate:'Purchase Date',
|
purchaseDate:'Purchase',
|
||||||
dataSelectTip:'please select data',
|
dataSelectTip:'please select data',
|
||||||
dc:'DC',
|
dc:'DC',
|
||||||
dcName:'DC Name',
|
dcName:'DC Name',
|
||||||
@@ -193,7 +193,7 @@ const en = {
|
|||||||
modelName:'新型号名称',
|
modelName:'新型号名称',
|
||||||
existModel:'已有型号'
|
existModel:'已有型号'
|
||||||
},
|
},
|
||||||
purchaseDate:'购买日期',
|
purchaseDate:'Purchase',
|
||||||
dataSelectTip:'please select data',
|
dataSelectTip:'please select data',
|
||||||
dc:'DC',
|
dc:'DC',
|
||||||
dcName:'DC Name',
|
dcName:'DC Name',
|
||||||
@@ -242,19 +242,19 @@ const en = {
|
|||||||
},
|
},
|
||||||
tableTitle: {
|
tableTitle: {
|
||||||
id: 'ID',
|
id: 'ID',
|
||||||
assetType: '资产类型',
|
assetType: 'Asset Type',
|
||||||
device: 'SN',
|
device: 'SN',
|
||||||
host: 'Host',
|
host: 'Host',
|
||||||
assetState: 'State',
|
assetState: 'State',
|
||||||
module: 'Module',
|
module: 'Module',
|
||||||
alert: 'Alert',
|
alert: 'Alert',
|
||||||
dataCenter: '数据中心',
|
dataCenter: 'Data Center',
|
||||||
cabinet: '机柜',
|
cabinet: 'Cabinet',
|
||||||
model: '型号',
|
model: 'Model',
|
||||||
manufacturer: '厂商',
|
manufacturer: 'Vendor',
|
||||||
procurementDate: '购买日期',
|
procurementDate: 'Purchase',
|
||||||
principal: '责任人',
|
principal: 'Principal',
|
||||||
principalTel: '责任人电话',
|
principalTel: 'Tel',
|
||||||
option: "Option"
|
option: "Option"
|
||||||
},
|
},
|
||||||
tagTableTitle: {
|
tagTableTitle: {
|
||||||
|
|||||||
@@ -208,9 +208,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show(show,isEdit) {
|
show(show, isEdit) {
|
||||||
this.rightBox.show = show;
|
this.rightBox.show = show;
|
||||||
this.rightBox.isEdit=isEdit
|
this.rightBox.isEdit = isEdit;
|
||||||
},
|
},
|
||||||
|
|
||||||
/*关闭弹框*/
|
/*关闭弹框*/
|
||||||
@@ -230,6 +230,7 @@
|
|||||||
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
this.$store.commit('moduleListChange');
|
this.$store.commit('moduleListChange');
|
||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
|
this.$emit('reload');
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(response.msg);
|
this.$message.error(response.msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,7 @@
|
|||||||
this.rightBox.show = false;
|
this.rightBox.show = false;
|
||||||
this.$store.commit('projectListChange');
|
this.$store.commit('projectListChange');
|
||||||
this.$store.commit('setProject', this.project);
|
this.$store.commit('setProject', this.project);
|
||||||
|
this.$emit('reload');
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(response.msg);
|
this.$message.error(response.msg);
|
||||||
}
|
}
|
||||||
@@ -107,7 +108,7 @@
|
|||||||
saveOrToEdit: function() {
|
saveOrToEdit: function() {
|
||||||
if (!this.rightBox.isEdit) {
|
if (!this.rightBox.isEdit) {
|
||||||
this.rightBox.isEdit = true;
|
this.rightBox.isEdit = true;
|
||||||
this.rightBox.title = this.$t("project.module.editProject") + " ID:" + this.project.id;
|
this.rightBox.title = this.$t("project.project.editProject") + " ID:" + this.project.id;
|
||||||
} else {
|
} else {
|
||||||
this.save();
|
this.save();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,40 +2,6 @@
|
|||||||
.account {
|
.account {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.right-box::-webkit-scrollbar-track {
|
|
||||||
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
||||||
border-radius: 0;
|
|
||||||
background: rgba(0,0,0,0.1);
|
|
||||||
}
|
|
||||||
.right-box::-webkit-scrollbar-thumb {
|
|
||||||
border-radius: 5px;
|
|
||||||
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
|
|
||||||
background: rgba(0,0,0,0.2);
|
|
||||||
}
|
|
||||||
.right-box::-webkit-scrollbar {
|
|
||||||
width: 4px;
|
|
||||||
height: 4px;
|
|
||||||
}
|
|
||||||
.right-box {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
.account-list-option {
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
.account-list-option .el-icon-delete {
|
|
||||||
color: #F98D9A;
|
|
||||||
}
|
|
||||||
.account-list-option .el-icon-delete:hover {
|
|
||||||
color: #D96D7A;
|
|
||||||
}
|
|
||||||
.account-list-option .el-icon-view {
|
|
||||||
color: #60BEFF;
|
|
||||||
}
|
|
||||||
.account-list-option .el-icon-view:hover {
|
|
||||||
color: #409EFF;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<div class="account">
|
<div class="account">
|
||||||
@@ -69,9 +35,9 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<div v-if="item.prop == 'option'" class="account-list-options">
|
<div v-if="item.prop == 'option'" class="account-list-options">
|
||||||
<span @click="del(scope.row)" class="account-list-option"><i class="el-icon-delete"></i></span>
|
<span @click="del(scope.row)" class="content-right-option"><i class="el-icon-delete"></i></span>
|
||||||
<span @click="detail(scope.row)" class="account-list-option"><i class="el-icon-view"></i></span>
|
<span @click="detail(scope.row)" class="content-right-option"><i class="el-icon-view"></i></span>
|
||||||
<span @click="toEdit(scope.row)" class="account-list-option"><i class="el-icon-edit-outline"></i></span>
|
<span @click="toEdit(scope.row)" class="content-right-option"><i class="el-icon-edit-outline"></i></span>
|
||||||
</div>
|
</div>
|
||||||
<span v-else-if="item.prop == 'severity'">
|
<span v-else-if="item.prop == 'severity'">
|
||||||
<span v-if="scope.row[item.prop] == 'high'"><i class="el-icon-arrow-up"></i> {{severityData[1].value}}</span>
|
<span v-if="scope.row[item.prop] == 'high'"><i class="el-icon-arrow-up"></i> {{severityData[1].value}}</span>
|
||||||
@@ -93,8 +59,8 @@
|
|||||||
<Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
<alert-config-box :parentAlertRule="alertRule" @reload="getTableData" ref="alertConfigBox"></alert-config-box>
|
<alert-config-box :parentAlertRule="alertRule" @reload="getTableData" ref="alertConfigBox"></alert-config-box>
|
||||||
<project-box :project="viewProjectData" ref="projectBox"></project-box>
|
<project-box :project="viewProjectData" ref="projectBox" @reload="getTableData"></project-box>
|
||||||
<module-box :module="viewModuleData" @reload="" ref="moduleBox"></module-box>
|
<module-box :module="viewModuleData" @reload="getTableData" ref="moduleBox"></module-box>
|
||||||
<asset-edit-unit :edit-unit-show='viewAsset' @refreshData="" @sendStateData="" ref="assetEditUnit"></asset-edit-unit>
|
<asset-edit-unit :edit-unit-show='viewAsset' @refreshData="" @sendStateData="" ref="assetEditUnit"></asset-edit-unit>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -227,9 +193,9 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
viewProjectData:null,
|
viewProjectData: {},
|
||||||
viewModuleData:null,
|
viewModuleData: {},
|
||||||
viewAsset:false,
|
viewAsset: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -320,29 +286,28 @@ export default {
|
|||||||
}
|
}
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
},
|
},
|
||||||
viewAlertType:function(type,typeObj){
|
viewAlertType: function(type, typeObj){
|
||||||
console.log(typeObj)
|
|
||||||
this.closeViews();
|
this.closeViews();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 1:
|
case 1:
|
||||||
this.viewProjectData=typeObj;
|
this.viewProjectData = JSON.parse(JSON.stringify(typeObj));
|
||||||
this.$refs.projectBox.show(true);
|
this.$refs.projectBox.show(true);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.fillProject(typeObj);
|
this.fillProject(typeObj);
|
||||||
let tempObj=JSON.parse(typeObj.param)
|
let tempObj = JSON.parse(typeObj.param)
|
||||||
this.$set(typeObj, 'paramObj', []);
|
this.$set(typeObj, 'paramObj', []);
|
||||||
for (let k in tempObj) {
|
for (let k in tempObj) {
|
||||||
typeObj.paramObj.push({key: k, value: tempObj[k]});
|
typeObj.paramObj.push({key: k, value: tempObj[k]});
|
||||||
}
|
}
|
||||||
this.viewModuleData=typeObj;
|
this.viewModuleData = JSON.parse(JSON.stringify(typeObj));
|
||||||
|
|
||||||
this.$refs.moduleBox.show(true);
|
this.$refs.moduleBox.show(true);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.viewAsset=true;
|
this.viewAsset = true;
|
||||||
this.$refs.assetEditUnit.getAssetData(typeObj);
|
this.$refs.assetEditUnit.getAssetData(typeObj);
|
||||||
this.$refs.assetEditUnit.tabView=true;
|
this.$refs.assetEditUnit.tabView = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -214,10 +214,10 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
<Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
</div>
|
</div>
|
||||||
<alert-config-box :parentAlertRule="viewRuleData" @reload="" ref="alertConfigBox"></alert-config-box>
|
<alert-config-box :parentAlertRule="viewRuleData" @reload="getAlertList" ref="alertConfigBox"></alert-config-box>
|
||||||
<project-box :project="viewProjectData" ref="projectBox"></project-box>
|
<project-box :project="viewProjectData" ref="projectBox" @reload="getAlertList"></project-box>
|
||||||
<module-box :module="viewModuleData" @reload="" ref="moduleBox"></module-box>
|
<module-box :module="viewModuleData" @reload="getAlertList" ref="moduleBox"></module-box>
|
||||||
<asset-edit-unit :edit-unit-show='viewAssetState' @refreshData="" @sendStateData="" ref="assetEditUnit"></asset-edit-unit>
|
<asset-edit-unit :edit-unit-show='viewAssetState' @refreshData="getAlertList" @sendStateData="" ref="assetEditUnit"></asset-edit-unit>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -315,9 +315,21 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
viewRuleData:null,
|
viewRuleData: {
|
||||||
viewProjectData:null,
|
id: '',
|
||||||
viewModuleData:null,
|
alertName: '',
|
||||||
|
type: '',
|
||||||
|
linkObject: {id: '', name: ''},
|
||||||
|
linkId: '',
|
||||||
|
expr: '',
|
||||||
|
last: '',
|
||||||
|
severity: '',
|
||||||
|
summary: '',
|
||||||
|
description: '',
|
||||||
|
receiver: '',
|
||||||
|
},
|
||||||
|
viewProjectData: {id: '', name: '', remark: ''},
|
||||||
|
viewModuleData: {id: '', name: '', project: {}, port: '', path: '', param: '', paramObj: []},
|
||||||
viewAssetState:false,
|
viewAssetState:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -373,7 +385,7 @@ export default {
|
|||||||
this.closeViews();
|
this.closeViews();
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 1:
|
case 1:
|
||||||
this.viewProjectData=typeObj;
|
this.viewProjectData = JSON.parse(JSON.stringify(typeObj));
|
||||||
this.$refs.projectBox.show(true);
|
this.$refs.projectBox.show(true);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@@ -383,7 +395,7 @@ export default {
|
|||||||
for (let k in tempObj) {
|
for (let k in tempObj) {
|
||||||
typeObj.paramObj.push({key: k, value: tempObj[k]});
|
typeObj.paramObj.push({key: k, value: tempObj[k]});
|
||||||
}
|
}
|
||||||
this.viewModuleData=typeObj;
|
this.viewModuleData = JSON.parse(JSON.stringify(typeObj));
|
||||||
|
|
||||||
this.$refs.moduleBox.show(true);
|
this.$refs.moduleBox.show(true);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -92,6 +92,7 @@
|
|||||||
v-for="(item, index) in tableTitle"
|
v-for="(item, index) in tableTitle"
|
||||||
v-if="item.show"
|
v-if="item.show"
|
||||||
min-width="110"
|
min-width="110"
|
||||||
|
:width="item.width"
|
||||||
:key="`col_${index}`"
|
:key="`col_${index}`"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
>
|
>
|
||||||
@@ -110,7 +111,7 @@
|
|||||||
<span>{{scope.row.host}}</span>
|
<span>{{scope.row.host}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.prop=='资产状态'">
|
<div v-if="item.prop=='资产状态'">
|
||||||
<span>{{scope.row.state==1?'在库':'出库'}}</span>
|
<span>{{scope.row.state==1 ? $t('asset.createAssetTab.inStock') : $t('asset.createAssetTab.notInStock')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.prop=='Module'">
|
<div v-if="item.prop=='Module'">
|
||||||
<div class="tab-input-square">{{scope.row.moduleNum}}</div>
|
<div class="tab-input-square">{{scope.row.moduleNum}}</div>
|
||||||
@@ -139,25 +140,30 @@
|
|||||||
<div v-if="item.prop=='责任人电话'">
|
<div v-if="item.prop=='责任人电话'">
|
||||||
<span>{{scope.row.idc.tel}}</span>
|
<span>{{scope.row.idc.tel}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.prop == 'option'">
|
<div v-if="item.prop == 'option'" class="content-right-options">
|
||||||
<span @click="ssss(scope.row.id ,scope.row.host)" class="account-list-option"><i
|
<span @click.stop="deleteData('asset',scope.row.id)" class="content-right-option"><i
|
||||||
class="el-icon-monitor"></i></span>
|
class="el-icon-delete"></i>
|
||||||
<span @click.stop="deleteData('asset',scope.row.id)" class="account-list-option"><i
|
</span>
|
||||||
class="el-icon-delete"></i></span>
|
<span @click.stop="tagShow('showView',scope.row.id)" class="content-right-option"><i
|
||||||
<span @click.stop="tagShow('showEdit',scope.row.id)" class="account-list-option"><i
|
class="el-icon-view"></i>
|
||||||
class="el-icon-edit-outline"></i></span>
|
</span>
|
||||||
<span @click.stop="tagShow('showView',scope.row.id)" class="account-list-option"><i
|
<span @click.stop="tagShow('showEdit',scope.row.id)" class="content-right-option"><i
|
||||||
class="el-icon-view"></i></span>
|
class="el-icon-edit-outline"></i>
|
||||||
|
</span>
|
||||||
|
<span @click="ssss(scope.row.id ,scope.row.host)" class="content-right-option"><i
|
||||||
|
class="el-icon-monitor"></i>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
<Pagination :pageObj="pageObj" @pageNo='pageNo' @pageSize='pageSize' ref="Pagination"></Pagination>
|
||||||
<asset-add-unit :add-unit-show='addUnitShow' @refreshData="flushData"
|
|
||||||
@sendStateData="tabControl"></asset-add-unit>
|
|
||||||
<asset-edit-unit :edit-unit-show='editUnitShow' @refreshData="flushData" @sendStateData="tabControl"
|
|
||||||
ref="assetEditUnit"></asset-edit-unit>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<asset-add-unit :add-unit-show='addUnitShow' @refreshData="flushData"
|
||||||
|
@sendStateData="tabControl"></asset-add-unit>
|
||||||
|
<asset-edit-unit :edit-unit-show='editUnitShow' @refreshData="flushData" @sendStateData="tabControl"
|
||||||
|
ref="assetEditUnit"></asset-edit-unit>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -207,6 +213,7 @@
|
|||||||
label: this.$t("asset.tableTitle.host"),
|
label: this.$t("asset.tableTitle.host"),
|
||||||
prop: 'HOST',
|
prop: 'HOST',
|
||||||
show: true,
|
show: true,
|
||||||
|
width: 130
|
||||||
}, {
|
}, {
|
||||||
label: this.$t("asset.tableTitle.assetState"),
|
label: this.$t("asset.tableTitle.assetState"),
|
||||||
prop: '资产状态',
|
prop: '资产状态',
|
||||||
@@ -591,7 +598,6 @@
|
|||||||
width: 65px;
|
width: 65px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-top: 6px;
|
|
||||||
line-height: 23px;
|
line-height: 23px;
|
||||||
color: #aaaaaa;
|
color: #aaaaaa;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,14 +14,14 @@
|
|||||||
<div class="right-box-title">{{$t('asset.createAssetTab.title')}}</div>
|
<div class="right-box-title">{{$t('asset.createAssetTab.title')}}</div>
|
||||||
|
|
||||||
<el-scrollbar class="right-box-form-box">
|
<el-scrollbar class="right-box-form-box">
|
||||||
<el-form :model="assetData" label-width="120px" class="right-box-form right-box-form-left">
|
<el-form :model="assetData" label-width="120px" class="right-box-form right-box-form-left" :rules="rules" ref="addAssetForm">
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.sn')">
|
<el-form-item :label="this.$t('asset.createAssetTab.sn')" prop="sn">
|
||||||
<el-input size="mini" v-model="assetData.sn" maxlength="64" show-word-limit/>
|
<el-input size="mini" v-model="assetData.sn" maxlength="64" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.host')">
|
<el-form-item :label="this.$t('asset.createAssetTab.host')" prop="host">
|
||||||
<el-input size="mini" v-model="assetData.host"/>
|
<el-input size="mini" v-model="assetData.host"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.state')">
|
<el-form-item :label="this.$t('asset.createAssetTab.state')" prop="state">
|
||||||
<el-select size="mini" v-model="assetData.state" placeholder="">
|
<el-select size="mini" v-model="assetData.state" placeholder="">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in assetStateOption"
|
v-for="item in assetStateOption"
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<div class="asset-sub-title">{{$t('asset.createAssetTab.assetInfo')}}</div>
|
<div class="asset-sub-title">{{$t('asset.createAssetTab.assetInfo')}}</div>
|
||||||
<div class="line-100 asset-line"></div>
|
<div class="line-100 asset-line"></div>
|
||||||
<!------------------------------------------资产类型---------------------------------------------->
|
<!------------------------------------------资产类型---------------------------------------------->
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.assetType')" prop="assetType" class="right-box-form-content">
|
<el-form-item :label="this.$t('asset.createAssetTab.assetType')" class="right-box-form-content" prop="assetType">
|
||||||
<el-select popper-class="asset-dropdown" size="mini" v-model="assetType" clearable @change="getAllModelOptionData" placeholder=""
|
<el-select popper-class="asset-dropdown" size="mini" v-model="assetType" clearable @change="getAllModelOptionData" placeholder=""
|
||||||
@visible-change="cancelEdit" class="right-box-row-with-btn">
|
@visible-change="cancelEdit" class="right-box-row-with-btn">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!------------------------------------------厂商/型号---------------------------------------------->
|
<!------------------------------------------厂商/型号---------------------------------------------->
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.vendor')" class="right-box-form-content">
|
<el-form-item :label="this.$t('asset.createAssetTab.vendor')" class="right-box-form-content" prop="modelId">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
:options="vendorTypeOptionData"
|
:options="vendorTypeOptionData"
|
||||||
:key="isResourceShow"
|
:key="isResourceShow"
|
||||||
@@ -225,7 +225,7 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.purchaseDate')" prop="purchaseDate" class="right-box-form-content">
|
<el-form-item :label="this.$t('asset.createAssetTab.purchaseDate')" class="right-box-form-content">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
size="mini"
|
size="mini"
|
||||||
v-model="assetData.purchaseDate"
|
v-model="assetData.purchaseDate"
|
||||||
@@ -238,7 +238,7 @@
|
|||||||
<div class="asset-sub-title">{{$t('asset.createAssetTab.dc')}}</div>
|
<div class="asset-sub-title">{{$t('asset.createAssetTab.dc')}}</div>
|
||||||
<div class="line-100 asset-line"></div>
|
<div class="line-100 asset-line"></div>
|
||||||
<!------------------------------------------IDC---------------------------------------------->
|
<!------------------------------------------IDC---------------------------------------------->
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.dcName')" class="right-box-form-content">
|
<el-form-item :label="this.$t('asset.createAssetTab.dcName')" class="right-box-form-content" prop="idcId">
|
||||||
<el-select popper-class="asset-dropdown" size="mini" v-model="assetData.idcId" clearable @change="getSingleIDCData" class="right-box-row-with-btn" placeholder="">
|
<el-select popper-class="asset-dropdown" size="mini" v-model="assetData.idcId" clearable @change="getSingleIDCData" class="right-box-row-with-btn" placeholder="">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in IDCOptionData"
|
v-for="item in IDCOptionData"
|
||||||
@@ -663,7 +663,8 @@
|
|||||||
id: '',
|
id: '',
|
||||||
sn: '',
|
sn: '',
|
||||||
host: '',
|
host: '',
|
||||||
state: '',
|
assetType: '',
|
||||||
|
state: 1,
|
||||||
purchaseDate: '',
|
purchaseDate: '',
|
||||||
idcId: '',
|
idcId: '',
|
||||||
cabinetId: '',
|
cabinetId: '',
|
||||||
@@ -785,6 +786,23 @@
|
|||||||
isResourceShow: 0,
|
isResourceShow: 0,
|
||||||
modelClickData: '',
|
modelClickData: '',
|
||||||
popState: true,
|
popState: true,
|
||||||
|
rules: {
|
||||||
|
sn: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
||||||
|
],
|
||||||
|
host: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
||||||
|
],
|
||||||
|
modelId: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
assetType: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
idcId: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -799,12 +817,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
assetType(newVal) {
|
assetType(newVal) {
|
||||||
|
this.assetData.assetType = newVal;
|
||||||
if (newVal == '') {
|
if (newVal == '') {
|
||||||
this.popState = true
|
this.popState = true
|
||||||
} else {
|
} else {
|
||||||
this.popState = false
|
this.popState = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'assetData.idcId': function(n, o) {
|
||||||
|
this.addCabinetData.idcId = n;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cancelEdit(data) {
|
cancelEdit(data) {
|
||||||
@@ -892,6 +914,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAllModelOptionData(data) {
|
getAllModelOptionData(data) {
|
||||||
|
this.assetData.assetType = this.assetType;
|
||||||
this.$get('model?typeCode=' + this.assetType).then(response => {
|
this.$get('model?typeCode=' + this.assetType).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.allModelUlData = response.data.list
|
this.allModelUlData = response.data.list
|
||||||
@@ -949,19 +972,16 @@
|
|||||||
this.$put(data, item).then(res => {
|
this.$put(data, item).then(res => {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '修改成功'),
|
this.getAssetTypeOptionData();
|
||||||
duration: 2000
|
this.getIDCOptionData();
|
||||||
})
|
|
||||||
this.getIDCOptionData()
|
|
||||||
this.getAllModelOptionData();
|
this.getAllModelOptionData();
|
||||||
this.getCabinetOptionData('')
|
if (data === 'cabinet') {
|
||||||
this.$emit('refreshData', 'true')
|
this.getCabinetOptionData(item.idcId);
|
||||||
|
}
|
||||||
|
this.$emit('refreshData', 'true');
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -970,17 +990,11 @@
|
|||||||
this.$post('idc', this.addIdcData).then(res => {
|
this.$post('idc', this.addIdcData).then(res => {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.getIDCOptionData()
|
this.getIDCOptionData()
|
||||||
this.getAssetData()
|
this.getAssetData()
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -998,7 +1012,6 @@
|
|||||||
if (type === 'asset') {
|
if (type === 'asset') {
|
||||||
let modelId = ''
|
let modelId = ''
|
||||||
let authType = ''
|
let authType = ''
|
||||||
console.log(this.assetData.modelId)
|
|
||||||
if (this.assetData.modelId !== '') {
|
if (this.assetData.modelId !== '') {
|
||||||
modelId = this.assetData.modelId.join(',').split(',')[1]
|
modelId = this.assetData.modelId.join(',').split(',')[1]
|
||||||
} else {
|
} else {
|
||||||
@@ -1024,16 +1037,10 @@
|
|||||||
this.$post('asset', form).then(res => {
|
this.$post('asset', form).then(res => {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
this.sendStateData('close');
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.sendStateData('close')
|
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$emit('refreshData', 'true')
|
this.$emit('refreshData', 'true')
|
||||||
@@ -1042,16 +1049,10 @@
|
|||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
this.$post('sys/dict/save', this.addVendorData).then(res => {
|
this.$post('sys/dict/save', this.addVendorData).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.getVendorOptionData()
|
this.getVendorOptionData()
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1062,17 +1063,11 @@
|
|||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.getModelOptionData(this.assetType, this.vendorCode)
|
this.getModelOptionData(this.assetType, this.vendorCode)
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.getAllModelOptionData(this.assetType)
|
this.getAllModelOptionData(this.assetType)
|
||||||
} else {
|
} else {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1083,17 +1078,12 @@
|
|||||||
this.$post('cabinet', this.addCabinetData).then(res => {
|
this.$post('cabinet', this.addCabinetData).then(res => {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.getCabinetOptionData(this.addCabinetData.idcId)
|
this.getCabinetOptionData(this.addCabinetData.idcId)
|
||||||
this.popoverClose('cabinet')
|
this.popoverClose('cabinet');
|
||||||
|
this.editPopoverClose('cabinet');
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1136,6 +1126,9 @@
|
|||||||
let resultData = []
|
let resultData = []
|
||||||
let modelData = this.allModelUlData
|
let modelData = this.allModelUlData
|
||||||
for (let i = 0; i < modelData.length; i++) {
|
for (let i = 0; i < modelData.length; i++) {
|
||||||
|
if (!modelData[i].vendor) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.id = modelData[i].vendor.id
|
obj.id = modelData[i].vendor.id
|
||||||
obj.code = modelData[i].vendor.code
|
obj.code = modelData[i].vendor.code
|
||||||
@@ -1154,11 +1147,14 @@
|
|||||||
}
|
}
|
||||||
for (let x = 0; x < result.length; x++) {
|
for (let x = 0; x < result.length; x++) {
|
||||||
for (let y = 0; y < modelData.length; y++) {
|
for (let y = 0; y < modelData.length; y++) {
|
||||||
|
if (!modelData[y].vendor) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (result[x].code === modelData[y].vendor.code) {
|
if (result[x].code === modelData[y].vendor.code) {
|
||||||
let obj2 = {}
|
let obj2 = {};
|
||||||
obj2.value = modelData[y].id
|
obj2.value = modelData[y].id;
|
||||||
obj2.label = modelData[y].name
|
obj2.label = modelData[y].name;
|
||||||
result[x].children.push(obj2)
|
result[x].children.push(obj2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1290,7 +1286,6 @@
|
|||||||
item[item.name] = !item[item.name]
|
item[item.name] = !item[item.name]
|
||||||
this.cabinetOptionData.forEach(items => {
|
this.cabinetOptionData.forEach(items => {
|
||||||
if (items.id === data) {
|
if (items.id === data) {
|
||||||
console.log(items)
|
|
||||||
this.popCabinetData.name = items.name
|
this.popCabinetData.name = items.name
|
||||||
this.popCabinetData.uSize = items.uSize
|
this.popCabinetData.uSize = items.uSize
|
||||||
this.popCabinetData.remark = items.remark
|
this.popCabinetData.remark = items.remark
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="right-box right-box-add-asset" v-if="editUnitShow" @click="editQuit">
|
<div class="right-box right-box-add-asset" v-if="editUnitShow" @click="editQuit">
|
||||||
<!--顶部按钮-->
|
<!--顶部按钮-->
|
||||||
<div class="right-box-top-btns">
|
<div class="right-box-top-btns">
|
||||||
<button v-if="!tabView" type="button" @click="" class="nz-btn nz-btn-size-normal nz-btn-style-light">
|
<button v-if="!tabView" type="button" @click="deleteData('asset', pageObj.id)" class="nz-btn nz-btn-size-normal nz-btn-style-light">
|
||||||
<span class="top-tool-btn-txt">{{$t('overall.delete')}}</span>
|
<span class="top-tool-btn-txt">{{$t('overall.delete')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button v-if="tabView" type="button" @click="tabView=false" class="nz-btn nz-btn-size-normal nz-btn-style-normal">
|
<button v-if="tabView" type="button" @click="tabView=false" class="nz-btn nz-btn-size-normal nz-btn-style-normal">
|
||||||
@@ -21,12 +21,12 @@
|
|||||||
<div class="right-box-title">{{this.tabView == true ? $t('asset.asset') : $t('asset.EditAsset')}}</div>
|
<div class="right-box-title">{{this.tabView == true ? $t('asset.asset') : $t('asset.EditAsset')}}</div>
|
||||||
|
|
||||||
<el-scrollbar class="right-box-form-box">
|
<el-scrollbar class="right-box-form-box">
|
||||||
<el-form ref="form" :model="assetData" label-width="120px" class="right-box-form right-box-form-left">
|
<el-form ref="form" :model="assetData" label-width="120px" class="right-box-form right-box-form-left" :rules="rules">
|
||||||
<el-form-item :label="$t('asset.createAssetTab.sn')">
|
<el-form-item :label="$t('asset.createAssetTab.sn')" prop="sn">
|
||||||
<el-input size="mini" v-if="!tabView" v-model="assetData.sn"/>
|
<el-input size="mini" v-if="!tabView" v-model="assetData.sn"/>
|
||||||
<span v-if="tabView">{{assetData.sn}}</span>
|
<span v-if="tabView">{{assetData.sn}}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.host')">
|
<el-form-item :label="this.$t('asset.createAssetTab.host')" prop="host">
|
||||||
<el-input size="mini" v-if="!tabView" v-model="assetData.host"/>
|
<el-input size="mini" v-if="!tabView" v-model="assetData.host"/>
|
||||||
<span v-if="tabView">{{assetData.host}}</span>
|
<span v-if="tabView">{{assetData.host}}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<div class="asset-sub-title">{{$t('asset.createAssetTab.assetInfo')}}</div>
|
<div class="asset-sub-title">{{$t('asset.createAssetTab.assetInfo')}}</div>
|
||||||
<div class="line-100 asset-line"></div>
|
<div class="line-100 asset-line"></div>
|
||||||
<!------------------------------------------资产类型---------------------------------------------->
|
<!------------------------------------------资产类型---------------------------------------------->
|
||||||
<el-form-item :label="$t('asset.createAssetTab.assetType')" class="right-box-form-content">
|
<el-form-item :label="$t('asset.createAssetTab.assetType')" class="right-box-form-content" prop="assetType">
|
||||||
<el-select popper-class="asset-dropdown" size="mini" v-if="!tabView" v-model="assetType" clearable @visible-change="cancelEdit"
|
<el-select popper-class="asset-dropdown" size="mini" v-if="!tabView" v-model="assetType" clearable @visible-change="cancelEdit"
|
||||||
@change="getAllModelOptionData()" class="right-box-row-with-btn">
|
@change="getAllModelOptionData()" class="right-box-row-with-btn">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -115,9 +115,11 @@
|
|||||||
<span class="config-dropdown-label-input" v-if="item.isEdit" @click.stop="editing">
|
<span class="config-dropdown-label-input" v-if="item.isEdit" @click.stop="editing">
|
||||||
<el-input class="input-x-mini" v-model="item.value"/>
|
<el-input class="input-x-mini" v-model="item.value"/>
|
||||||
</span>
|
</span>
|
||||||
<span class="config-dropdown-btn" @click.stop="editOptionData(item,'type',index)">
|
<span v-if="!item.isEdit" class="config-dropdown-btn" @click.stop="editOptionData(item,'type',index)">
|
||||||
<i class="el-icon-edit-outline" v-if="!item.isEdit"></i>
|
<i class="el-icon-edit-outline"></i>
|
||||||
<i class="el-icon-check" v-if="item.isEdit" @click="editData('sys/dict/update',item)"></i>
|
</span>
|
||||||
|
<span v-if="item.isEdit" class="config-dropdown-btn" @click.stop="editData('sys/dict/update',item, 'assetType')">
|
||||||
|
<i class="el-icon-check"></i>
|
||||||
</span>
|
</span>
|
||||||
<span class="config-dropdown-btn config-dropdown-btn-delete"
|
<span class="config-dropdown-btn config-dropdown-btn-delete"
|
||||||
@click.stop="deleteData('/sys/dict/delete',item.id)"><i class="el-icon-delete"></i>
|
@click.stop="deleteData('/sys/dict/delete',item.id)"><i class="el-icon-delete"></i>
|
||||||
@@ -136,7 +138,7 @@
|
|||||||
<span v-if="tabView">{{assetViewData.assetType}}</span>
|
<span v-if="tabView">{{assetViewData.assetType}}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!------------------------------------------厂商/型号---------------------------------------------->
|
<!------------------------------------------厂商/型号---------------------------------------------->
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.vendor')" class="right-box-form-content">
|
<el-form-item :label="this.$t('asset.createAssetTab.vendor')" class="right-box-form-content" prop="modelId">
|
||||||
<template v-if="!tabView">
|
<template v-if="!tabView">
|
||||||
<el-cascader
|
<el-cascader
|
||||||
:options="vendorTypeOptionData"
|
:options="vendorTypeOptionData"
|
||||||
@@ -259,7 +261,7 @@
|
|||||||
<div class="asset-sub-title">{{$t('asset.createAssetTab.dc')}}</div>
|
<div class="asset-sub-title">{{$t('asset.createAssetTab.dc')}}</div>
|
||||||
<div class="line-100 asset-line"></div>
|
<div class="line-100 asset-line"></div>
|
||||||
<!------------------------------------------IDC---------------------------------------------->
|
<!------------------------------------------IDC---------------------------------------------->
|
||||||
<el-form-item :label="this.$t('asset.createAssetTab.dcName')" class="right-box-form-content">
|
<el-form-item :label="this.$t('asset.createAssetTab.dcName')" class="right-box-form-content" prop="idcId">
|
||||||
<template v-if="!tabView">
|
<template v-if="!tabView">
|
||||||
<el-select popper-class="asset-dropdown" size="mini" v-model="assetData.idcId" clearable @change="getSingleIDCData" class="right-box-row-with-btn" placeholder="">
|
<el-select popper-class="asset-dropdown" size="mini" v-model="assetData.idcId" clearable @change="getSingleIDCData" class="right-box-row-with-btn" placeholder="">
|
||||||
<el-option
|
<el-option
|
||||||
@@ -427,10 +429,10 @@
|
|||||||
<div class="pop-title">{{$t('asset.createAssetTab.editCabinetTab.title')}}</div>
|
<div class="pop-title">{{$t('asset.createAssetTab.editCabinetTab.title')}}</div>
|
||||||
<!--表单内容-->
|
<!--表单内容-->
|
||||||
<div class="pop-item-wider">
|
<div class="pop-item-wider">
|
||||||
<el-form-item :label="$t('asset.editAssetTab.editCabinetTab.name')">
|
<el-form-item :label="$t('asset.editAssetTab.editCabinetTab.name')" prop="cabinet.name">
|
||||||
<el-input size="mini" v-model="popCabinetData.name"/>
|
<el-input size="mini" v-model="popCabinetData.name"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.editAssetTab.editCabinetTab.uSize')">
|
<el-form-item :label="$t('asset.editAssetTab.editCabinetTab.uSize')" prop="cabinet.uSize">
|
||||||
<div>{{popCabinetData.uSize}}</div>
|
<div>{{popCabinetData.uSize}}</div>
|
||||||
<el-slider v-model="popCabinetData.uSize" :max="47"></el-slider>
|
<el-slider v-model="popCabinetData.uSize" :max="47"></el-slider>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -439,7 +441,7 @@
|
|||||||
type="textarea"
|
type="textarea"
|
||||||
:rows="2"/>
|
:rows="2"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('asset.editAssetTab.editCabinetTab.DC')">
|
<el-form-item :label="$t('asset.editAssetTab.editCabinetTab.DC')" prop="cabinet.idcId">
|
||||||
<el-select v-model="popCabinetData.idcId" clearable placeholder="" size="mini" style="width: 100%;">
|
<el-select v-model="popCabinetData.idcId" clearable placeholder="" size="mini" style="width: 100%;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="ite in item.children"
|
v-for="ite in item.children"
|
||||||
@@ -531,7 +533,7 @@
|
|||||||
>
|
>
|
||||||
<div class="pop-window-assetType-content">
|
<div class="pop-window-assetType-content">
|
||||||
<div class="pop-top-btns">
|
<div class="pop-top-btns">
|
||||||
<button type="button" @click="editData('idc',item,'CabIDC')" class="nz-btn nz-btn-size-small nz-btn-style-normal">
|
<button type="button" @click="addNewData('cabinet')" class="nz-btn nz-btn-size-small nz-btn-style-normal">
|
||||||
<span class="top-tool-btn-txt">{{$t('overall.save')}}</span>
|
<span class="top-tool-btn-txt">{{$t('overall.save')}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button type="button" @click="editPopoverClose('cabinet')" class="nz-btn nz-btn-size-small nz-btn-style-light nz-btn-style-square">
|
<button type="button" @click="editPopoverClose('cabinet')" class="nz-btn nz-btn-size-small nz-btn-style-light nz-btn-style-square">
|
||||||
@@ -688,6 +690,8 @@
|
|||||||
idcId: '',
|
idcId: '',
|
||||||
cabinetId: '',
|
cabinetId: '',
|
||||||
modelId: '',
|
modelId: '',
|
||||||
|
assetType: '',
|
||||||
|
cabinet: {},
|
||||||
accounts: [{
|
accounts: [{
|
||||||
id: '',
|
id: '',
|
||||||
authType: '',
|
authType: '',
|
||||||
@@ -822,6 +826,23 @@
|
|||||||
popState: true,
|
popState: true,
|
||||||
obj: null,
|
obj: null,
|
||||||
addUnitShow: false,
|
addUnitShow: false,
|
||||||
|
rules: {
|
||||||
|
sn: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
||||||
|
],
|
||||||
|
host: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'blur'}
|
||||||
|
],
|
||||||
|
modelId: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
assetType: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
idcId: [
|
||||||
|
{required: true, message: this.$t('validate.required'), trigger: 'change'}
|
||||||
|
],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -832,55 +853,59 @@
|
|||||||
watch: {
|
watch: {
|
||||||
allModelUlData(newVal) {
|
allModelUlData(newVal) {
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
this.getConnectData()
|
this.getConnectData();
|
||||||
if (this.pageObj.id != '') {
|
if (this.pageObj.id != '') {
|
||||||
this.assetData.modelId = [this.obj.model.vendor.code, this.obj.model.id]
|
this.assetData.modelId = [this.obj.model.vendor.code, this.obj.model.id]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
assetType(newVal) {
|
assetType(newVal) {
|
||||||
|
this.assetData.assetType = newVal;
|
||||||
if (newVal == '') {
|
if (newVal == '') {
|
||||||
this.popState = true
|
this.popState = true
|
||||||
} else {
|
} else {
|
||||||
this.popState = false
|
this.popState = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'assetData.idcId': function(n, o) {
|
||||||
|
this.addCabinetData.idcId = n;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
cancelEdit(data) {
|
cancelEdit(data) {
|
||||||
if (data === false) {
|
if (data === false) {
|
||||||
this.getAssetTypeOptionData()
|
this.getAssetTypeOptionData();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clickOutSide(data) {
|
clickOutSide(data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
this.editQuit()
|
this.editQuit();
|
||||||
this.modelCount = ''
|
this.modelCount = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editQuit() {
|
editQuit() {
|
||||||
for (let i of this.assetTypeOptionData) {
|
for (let i of this.assetTypeOptionData) {
|
||||||
if (i.isEdit === true) {
|
if (i.isEdit === true) {
|
||||||
i.isEdit = false
|
i.isEdit = false;
|
||||||
this.getAssetTypeOptionData()
|
this.getAssetTypeOptionData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i of this.vendorUlData) {
|
for (let i of this.vendorUlData) {
|
||||||
if (i.isEdit === true) {
|
if (i.isEdit === true) {
|
||||||
i.isEdit = false
|
i.isEdit = false;
|
||||||
this.getVendorOptionData()
|
this.getVendorOptionData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (let i of this.modelUlData) {
|
for (let i of this.modelUlData) {
|
||||||
if (i.isEdit === true) {
|
if (i.isEdit === true) {
|
||||||
i.isEdit = false
|
i.isEdit = false;
|
||||||
this.getModelOptionData(this.assetType, this.vendorCode)
|
this.getModelOptionData(this.assetType, this.vendorCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getAssetData(data) {
|
getAssetData(data) {
|
||||||
if (data !== undefined) {
|
if (data !== undefined) {
|
||||||
this.pageObj.id = data
|
this.pageObj.id = data;
|
||||||
this.$get('asset', this.pageObj).then(response => {
|
this.$get('asset', this.pageObj).then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.obj = response.data.list[0];
|
this.obj = response.data.list[0];
|
||||||
@@ -940,7 +965,6 @@
|
|||||||
for (let i = 0; i < this.cabinetOptionData.length; i++) {
|
for (let i = 0; i < this.cabinetOptionData.length; i++) {
|
||||||
this.$set(this.cabinetOptionData[i], 'children', this.IDCOptionData)
|
this.$set(this.cabinetOptionData[i], 'children', this.IDCOptionData)
|
||||||
}
|
}
|
||||||
console.log(this.cabinetOptionData)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -969,7 +993,8 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getAllModelOptionData(data) {
|
getAllModelOptionData(data) {
|
||||||
this.$get('model?typeCode=' + this.assetType).then(response => {
|
this.assetData.assetType = this.assetType;
|
||||||
|
this.$get('model?typeCode=' + this.assetType + '&pageNo=1&pageSize=999').then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.allModelUlData = response.data.list
|
this.allModelUlData = response.data.list
|
||||||
}
|
}
|
||||||
@@ -1009,17 +1034,12 @@
|
|||||||
this.$put('asset', form).then(res => {
|
this.$put('asset', form).then(res => {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '修改成功'),
|
this.pageObj.id = '';
|
||||||
duration: 2000
|
this.$emit('refreshData', 'true');
|
||||||
});
|
this.sendStateData('close');
|
||||||
this.pageObj.id = ''
|
|
||||||
this.$emit('refreshData', 'true')
|
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -1036,12 +1056,10 @@
|
|||||||
item = obj
|
item = obj
|
||||||
}
|
}
|
||||||
if (data === 'cabinet') {
|
if (data === 'cabinet') {
|
||||||
item.name = this.popCabinetData.name
|
item.name = this.popCabinetData.name;
|
||||||
item.uSize = this.popCabinetData.uSize
|
item.uSize = this.popCabinetData.uSize;
|
||||||
item.remark = this.popCabinetData.remark
|
item.remark = this.popCabinetData.remark;
|
||||||
console.log(this.popCabinetData.idcId)
|
item.idcId = this.popCabinetData.idcId;
|
||||||
item.idcId = this.popCabinetData.idcId
|
|
||||||
console.log(item)
|
|
||||||
}
|
}
|
||||||
if (data === 'idc') {
|
if (data === 'idc') {
|
||||||
idcData.id = item.id
|
idcData.id = item.id
|
||||||
@@ -1052,29 +1070,25 @@
|
|||||||
item = idcData
|
item = idcData
|
||||||
}
|
}
|
||||||
if (mark === 'CabIDC') {
|
if (mark === 'CabIDC') {
|
||||||
idcData.id = item.id
|
idcData.id = item.id;
|
||||||
idcData.name = this.addCabIDCData.name
|
idcData.name = this.addCabIDCData.name;
|
||||||
idcData.location = this.addCabIDCData.location
|
idcData.location = this.addCabIDCData.location;
|
||||||
idcData.principal = this.addCabIDCData.principal
|
idcData.principal = this.addCabIDCData.principal;
|
||||||
idcData.tel = this.addCabIDCData.tel
|
idcData.tel = this.addCabIDCData.tel;
|
||||||
item = idcData
|
item = idcData;
|
||||||
}
|
}
|
||||||
this.$put(data, item).then(res => {
|
this.$put(data, item).then(res => {
|
||||||
const h = this.$createElement;
|
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '修改成功'),
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
this.getIDCOptionData();
|
this.getIDCOptionData();
|
||||||
this.getCabinetOptionData('')
|
if (data === 'cabinet') {
|
||||||
|
this.getCabinetOptionData(item.idcId);
|
||||||
|
}
|
||||||
this.getAllModelOptionData();
|
this.getAllModelOptionData();
|
||||||
|
this.getAssetTypeOptionData();
|
||||||
this.$emit('refreshData', 'true')
|
this.$emit('refreshData', 'true')
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1085,17 +1099,11 @@
|
|||||||
this.$post('idc', this.addIdcData).then(res => {
|
this.$post('idc', this.addIdcData).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.getIDCOptionData()
|
this.getIDCOptionData()
|
||||||
this.getAssetData()
|
this.getAssetData()
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1104,15 +1112,9 @@
|
|||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.getAssetTypeOptionData()
|
this.getAssetTypeOptionData()
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1120,16 +1122,10 @@
|
|||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
this.$post('sys/dict/save', this.addVendorData).then(res => {
|
this.$post('sys/dict/save', this.addVendorData).then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.getVendorOptionData()
|
this.getVendorOptionData()
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1140,16 +1136,10 @@
|
|||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.getModelOptionData(this.assetType, this.vendorCode)
|
this.getModelOptionData(this.assetType, this.vendorCode)
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
this.getAllModelOptionData(this.assetType)
|
this.getAllModelOptionData(this.assetType)
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1158,68 +1148,70 @@
|
|||||||
this.$post('cabinet', this.addCabinetData).then(res => {
|
this.$post('cabinet', this.addCabinetData).then(res => {
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$notify({
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")});
|
||||||
message: h('i', {style: 'color: teal'}, '添加成功'),
|
this.getCabinetOptionData(this.addCabinetData.idcId);
|
||||||
duration: 2000
|
this.editPopoverClose('cabinet');
|
||||||
});
|
|
||||||
this.getCabinetOptionData(this.addCabinetData.idcId)
|
|
||||||
} else {
|
} else {
|
||||||
this.$notify({
|
this.$message.error(res.msg);
|
||||||
message: h('i', {style: 'color: teal'}, res.msg),
|
|
||||||
duration: 2000
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteData(data, item) {
|
deleteData(data, item) {
|
||||||
this.$delete(data + "?ids=" + item).then(response => {
|
this.$confirm(this.$t("tip.confirmDelete"), {
|
||||||
const h = this.$createElement;
|
confirmButtonText: this.$t("tip.yes"),
|
||||||
if (response.code === 200) {
|
cancelButtonText: this.$t("tip.no"),
|
||||||
this.$notify({
|
type: 'warning'
|
||||||
message: h('i', {style: 'color: teal'}, '删除成功'),
|
}).then(() => {
|
||||||
duration: 2000
|
this.$delete(data + "?ids=" + item).then(response => {
|
||||||
});
|
const h = this.$createElement;
|
||||||
this.getAssetData()
|
if (response.code === 200) {
|
||||||
this.getIDCOptionData()
|
this.$message({duration: 2000, type: 'success', message: this.$t("tip.deleteSuccess")});
|
||||||
this.getVendorOptionData()
|
this.getAssetData();
|
||||||
this.getCabinetOptionData(this.assetData.idcId)
|
this.getIDCOptionData();
|
||||||
this.getAllModelOptionData(this.assetType)
|
this.getVendorOptionData();
|
||||||
this.getModelOptionData(this.assetType, this.vendorCode)
|
this.getCabinetOptionData(this.assetData.idcId);
|
||||||
} else {
|
this.getAllModelOptionData(this.assetType);
|
||||||
this.$notify({
|
this.getModelOptionData(this.assetType, this.vendorCode);
|
||||||
message: h('i', {style: 'color: teal'}, response.msg),
|
if (data == 'asset') {
|
||||||
duration: 2000
|
this.sendStateData('close');
|
||||||
});
|
}
|
||||||
}
|
} else {
|
||||||
})
|
this.$message.error(response.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
},
|
},
|
||||||
markOptionData(data) {
|
markOptionData(data) {
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
this.$set(item, 'isEdit', false);
|
this.$set(item, 'isEdit', false);
|
||||||
this.$set(item, 'oldName', item.value);
|
this.$set(item, 'oldName', item.value);
|
||||||
this.$set(item, 'modelOldName', item.name);
|
this.$set(item, 'modelOldName', item.name);
|
||||||
this.$set(item, item.name, false)
|
this.$set(item, item.name, false);
|
||||||
this.$set(item, item.id, false)
|
this.$set(item, item.id, false);
|
||||||
this.$set(item, item.id + item.name, false)
|
this.$set(item, item.id + item.name, false);
|
||||||
this.$set(item, item.name + item.id, false)
|
this.$set(item, item.name + item.id, false);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getConnectData() {
|
getConnectData() {
|
||||||
this.isResourceShow += 1
|
this.isResourceShow += 1;
|
||||||
let resultData = []
|
let resultData = [];
|
||||||
let modelData = this.allModelUlData
|
let modelData = this.allModelUlData;
|
||||||
for (let i = 0; i < modelData.length; i++) {
|
for (let i = 0; i < modelData.length; i++) {
|
||||||
let obj = {}
|
|
||||||
obj.id = modelData[i].vendor.id
|
if (!modelData[i].vendor) {
|
||||||
obj.code = modelData[i].vendor.code
|
continue;
|
||||||
obj.value = modelData[i].vendor.code
|
}
|
||||||
obj.label = modelData[i].vendor.value
|
let obj = {};
|
||||||
obj.children = []
|
obj.id = modelData[i].vendor.id;
|
||||||
resultData.push(obj)
|
obj.code = modelData[i].vendor.code;
|
||||||
|
obj.value = modelData[i].vendor.code;
|
||||||
|
obj.label = modelData[i].vendor.value;
|
||||||
|
obj.children = [];
|
||||||
|
resultData.push(obj);
|
||||||
}
|
}
|
||||||
var result = [];
|
let result = [];
|
||||||
var obj1 = {};
|
let obj1 = {};
|
||||||
for (let i = 0; i < resultData.length; i++) {
|
for (let i = 0; i < resultData.length; i++) {
|
||||||
if (!obj1[resultData[i].id]) {
|
if (!obj1[resultData[i].id]) {
|
||||||
result.push(resultData[i]);
|
result.push(resultData[i]);
|
||||||
@@ -1228,6 +1220,9 @@
|
|||||||
}
|
}
|
||||||
for (let x = 0; x < result.length; x++) {
|
for (let x = 0; x < result.length; x++) {
|
||||||
for (let y = 0; y < modelData.length; y++) {
|
for (let y = 0; y < modelData.length; y++) {
|
||||||
|
if (!modelData[y].vendor) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (result[x].code === modelData[y].vendor.code) {
|
if (result[x].code === modelData[y].vendor.code) {
|
||||||
let obj2 = {}
|
let obj2 = {}
|
||||||
obj2.value = modelData[y].id
|
obj2.value = modelData[y].id
|
||||||
@@ -1341,13 +1336,12 @@
|
|||||||
item[item.name] = !item[item.name]
|
item[item.name] = !item[item.name]
|
||||||
this.cabinetOptionData.forEach(items => {
|
this.cabinetOptionData.forEach(items => {
|
||||||
if (items.id === data) {
|
if (items.id === data) {
|
||||||
this.popCabinetData.name = items.name
|
this.popCabinetData.name = items.name;
|
||||||
this.popCabinetData.uSize = items.uSize
|
this.popCabinetData.uSize = items.uSize;
|
||||||
this.popCabinetData.remark = items.remark
|
this.popCabinetData.remark = items.remark;
|
||||||
|
this.popCabinetData.idcId = items.idcId;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.cabinetOptionData)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getSingleAsset(data) {
|
getSingleAsset(data) {
|
||||||
|
|||||||
@@ -2,41 +2,6 @@
|
|||||||
.account {
|
.account {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content-right-option {
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
.content-right-option .el-icon-delete {
|
|
||||||
color: #F98D9A;
|
|
||||||
}
|
|
||||||
.content-right-option .el-icon-delete:hover {
|
|
||||||
color: #D96D7A;
|
|
||||||
}
|
|
||||||
.content-right-option .el-icon-view {
|
|
||||||
color: #60BEFF;
|
|
||||||
}
|
|
||||||
.content-right-option .el-icon-view:hover {
|
|
||||||
color: #409EFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* begin--右弹框滑入滑出动画*/
|
|
||||||
@keyframes slide-in-from-right {
|
|
||||||
from {right: -800px}
|
|
||||||
to {right: 0}
|
|
||||||
}
|
|
||||||
@keyframes slide-out-to-right {
|
|
||||||
from {right: 0}
|
|
||||||
to {right: -800px}
|
|
||||||
}
|
|
||||||
.right-box-enter-active {
|
|
||||||
animation: slide-in-from-right 0.4s;
|
|
||||||
}
|
|
||||||
.right-box-leave-active {
|
|
||||||
animation: slide-out-to-right 0.4s;
|
|
||||||
}
|
|
||||||
/* end--右弹框滑入滑出动画*/
|
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<div class="account">
|
<div class="account">
|
||||||
|
|||||||
@@ -2,63 +2,6 @@
|
|||||||
.prom {
|
.prom {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.prom .el-table {
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-right-option {
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline-block;
|
|
||||||
margin-right: 6px;
|
|
||||||
}
|
|
||||||
.content-right-option .el-icon-delete {
|
|
||||||
color: #F98D9A;
|
|
||||||
}
|
|
||||||
.content-right-option .el-icon-delete:hover {
|
|
||||||
color: #D96D7A;
|
|
||||||
}
|
|
||||||
.content-right-option .el-icon-view {
|
|
||||||
color: #60BEFF;
|
|
||||||
}
|
|
||||||
.content-right-option .el-icon-view:hover {
|
|
||||||
color: #409EFF;
|
|
||||||
}
|
|
||||||
.pop-window {
|
|
||||||
height: 370px;
|
|
||||||
width: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pop-window-assetType {
|
|
||||||
height: 550px;
|
|
||||||
width: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pop-window-assetType-content {
|
|
||||||
padding: 1px 15px 15px 20px;
|
|
||||||
}
|
|
||||||
.sidebar-pop-input {
|
|
||||||
position: absolute;
|
|
||||||
right: 50px;
|
|
||||||
width: 200px;
|
|
||||||
height: 26px;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #DCDFE6;
|
|
||||||
color: #606266;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0px 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-pop-input-select {
|
|
||||||
position: absolute;
|
|
||||||
right: 83px;
|
|
||||||
width: 200px;
|
|
||||||
height: 26px;
|
|
||||||
border-radius: 4px;
|
|
||||||
border: 1px solid #DCDFE6;
|
|
||||||
color: #606266;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0px 15px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<template>
|
<template>
|
||||||
<div class="prom">
|
<div class="prom">
|
||||||
|
|||||||
Reference in New Issue
Block a user