diff --git a/nezha-fronted/src/assets/css/main.css b/nezha-fronted/src/assets/css/main.css index 919154c95..c5c4cddb6 100644 --- a/nezha-fronted/src/assets/css/main.css +++ b/nezha-fronted/src/assets/css/main.css @@ -205,6 +205,35 @@ html { margin-left: 270px; 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--顶部工具栏*/ .top-tools { padding: 22px 0 13px 0; @@ -392,10 +421,20 @@ html { .pop-box { border: 1px solid #DCDFE6; border-radius: 4px; - padding: 2px 0 2px 5px; + padding: 2px 0; } .pop-box-asset { 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 { background-color: #d8d8d8; @@ -417,7 +456,7 @@ html { height: 100%; } .right-box-form>.el-form-item { - margin-bottom: 15px; + margin-bottom: 18px; } .right-box-form .el-select { width: 100%; diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index cbe2f9c94..f75f568e4 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -128,7 +128,7 @@ const en = { modelName:'New Model', existModel:'Exist Model' }, - purchaseDate:'Purchase Date', + purchaseDate:'Purchase', dataSelectTip:'please select data', dc:'DC', dcName:'DC Name', @@ -193,7 +193,7 @@ const en = { modelName:'新型号名称', existModel:'已有型号' }, - purchaseDate:'购买日期', + purchaseDate:'Purchase', dataSelectTip:'please select data', dc:'DC', dcName:'DC Name', @@ -242,19 +242,19 @@ const en = { }, tableTitle: { id: 'ID', - assetType: '资产类型', + assetType: 'Asset Type', device: 'SN', host: 'Host', assetState: 'State', module: 'Module', alert: 'Alert', - dataCenter: '数据中心', - cabinet: '机柜', - model: '型号', - manufacturer: '厂商', - procurementDate: '购买日期', - principal: '责任人', - principalTel: '责任人电话', + dataCenter: 'Data Center', + cabinet: 'Cabinet', + model: 'Model', + manufacturer: 'Vendor', + procurementDate: 'Purchase', + principal: 'Principal', + principalTel: 'Tel', option: "Option" }, tagTableTitle: { diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue index 1f1475958..e4b1dc667 100644 --- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue @@ -208,9 +208,9 @@ } }, methods: { - show(show,isEdit) { + show(show, isEdit) { 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.$store.commit('moduleListChange'); this.rightBox.show = false; + this.$emit('reload'); } else { this.$message.error(response.msg); } diff --git a/nezha-fronted/src/components/common/rightBox/projectBox.vue b/nezha-fronted/src/components/common/rightBox/projectBox.vue index d87e6b27f..fed0880d8 100644 --- a/nezha-fronted/src/components/common/rightBox/projectBox.vue +++ b/nezha-fronted/src/components/common/rightBox/projectBox.vue @@ -83,6 +83,7 @@ this.rightBox.show = false; this.$store.commit('projectListChange'); this.$store.commit('setProject', this.project); + this.$emit('reload'); } else { this.$message.error(response.msg); } @@ -107,7 +108,7 @@ saveOrToEdit: function() { if (!this.rightBox.isEdit) { 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 { this.save(); } diff --git a/nezha-fronted/src/components/page/alert/config.vue b/nezha-fronted/src/components/page/alert/config.vue index 3c1c6d690..38ffa0fda 100644 --- a/nezha-fronted/src/components/page/alert/config.vue +++ b/nezha-fronted/src/components/page/alert/config.vue @@ -2,40 +2,6 @@ .account { 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; - } - - + + + @@ -207,6 +213,7 @@ label: this.$t("asset.tableTitle.host"), prop: 'HOST', show: true, + width: 130 }, { label: this.$t("asset.tableTitle.assetState"), prop: '资产状态', @@ -591,7 +598,6 @@ width: 65px; border-radius: 3px; text-align: center; - margin-top: 6px; line-height: 23px; color: #aaaaaa; } diff --git a/nezha-fronted/src/components/page/asset/assetAddUnit.vue b/nezha-fronted/src/components/page/asset/assetAddUnit.vue index 7362cd97f..57f5ee7f7 100644 --- a/nezha-fronted/src/components/page/asset/assetAddUnit.vue +++ b/nezha-fronted/src/components/page/asset/assetAddUnit.vue @@ -14,14 +14,14 @@
{{$t('asset.createAssetTab.title')}}
- - + + - + - + {{$t('asset.createAssetTab.assetInfo')}}
- + - + - + {{$t('asset.createAssetTab.dc')}}
- + { const h = this.$createElement; if (res.code === 200) { - this.$notify({ - message: h('i', {style: 'color: teal'}, '添加成功'), - duration: 2000 - }); + this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")}); this.getIDCOptionData() this.getAssetData() } else { - this.$notify({ - message: h('i', {style: 'color: teal'}, res.msg), - duration: 2000 - }); + this.$message.error(res.msg); } }) } @@ -998,7 +1012,6 @@ if (type === 'asset') { let modelId = '' let authType = '' - console.log(this.assetData.modelId) if (this.assetData.modelId !== '') { modelId = this.assetData.modelId.join(',').split(',')[1] } else { @@ -1024,16 +1037,10 @@ this.$post('asset', form).then(res => { const h = this.$createElement; if (res.code === 200) { - this.$notify({ - message: h('i', {style: 'color: teal'}, '添加成功'), - duration: 2000 - }); - this.sendStateData('close') + this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")}); + this.sendStateData('close'); } else { - this.$notify({ - message: h('i', {style: 'color: teal'}, res.msg), - duration: 2000 - }); + this.$message.error(res.msg); } }) this.$emit('refreshData', 'true') @@ -1042,16 +1049,10 @@ const h = this.$createElement; this.$post('sys/dict/save', this.addVendorData).then(res => { if (res.code === 200) { - this.$notify({ - message: h('i', {style: 'color: teal'}, '添加成功'), - duration: 2000 - }); + this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")}); this.getVendorOptionData() } else { - this.$notify({ - message: h('i', {style: 'color: teal'}, res.msg), - duration: 2000 - }); + this.$message.error(res.msg); } }) } @@ -1062,17 +1063,11 @@ if (res.code === 200) { this.getModelOptionData(this.assetType, this.vendorCode) const h = this.$createElement; - this.$notify({ - message: h('i', {style: 'color: teal'}, '添加成功'), - duration: 2000 - }); + this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")}); this.getAllModelOptionData(this.assetType) } else { const h = this.$createElement; - this.$notify({ - message: h('i', {style: 'color: teal'}, res.msg), - duration: 2000 - }); + this.$message.error(res.msg); } }) } @@ -1083,17 +1078,12 @@ this.$post('cabinet', this.addCabinetData).then(res => { const h = this.$createElement; if (res.code === 200) { - this.$notify({ - message: h('i', {style: 'color: teal'}, '添加成功'), - duration: 2000 - }); + this.$message({duration: 2000, type: 'success', message: this.$t("tip.saveSuccess")}); this.getCabinetOptionData(this.addCabinetData.idcId) - this.popoverClose('cabinet') + this.popoverClose('cabinet'); + this.editPopoverClose('cabinet'); } else { - this.$notify({ - message: h('i', {style: 'color: teal'}, res.msg), - duration: 2000 - }); + this.$message.error(res.msg); } }) } @@ -1136,6 +1126,9 @@ let resultData = [] let modelData = this.allModelUlData for (let i = 0; i < modelData.length; i++) { + if (!modelData[i].vendor) { + continue; + } let obj = {} obj.id = modelData[i].vendor.id obj.code = modelData[i].vendor.code @@ -1154,11 +1147,14 @@ } for (let x = 0; x < result.length; x++) { for (let y = 0; y < modelData.length; y++) { + if (!modelData[y].vendor) { + continue; + } if (result[x].code === modelData[y].vendor.code) { - let obj2 = {} - obj2.value = modelData[y].id - obj2.label = modelData[y].name - result[x].children.push(obj2) + let obj2 = {}; + obj2.value = modelData[y].id; + obj2.label = modelData[y].name; + result[x].children.push(obj2); } } } @@ -1290,7 +1286,6 @@ item[item.name] = !item[item.name] this.cabinetOptionData.forEach(items => { if (items.id === data) { - console.log(items) this.popCabinetData.name = items.name this.popCabinetData.uSize = items.uSize this.popCabinetData.remark = items.remark diff --git a/nezha-fronted/src/components/page/asset/assetEditUnit.vue b/nezha-fronted/src/components/page/asset/assetEditUnit.vue index 1a024e61c..731e2724f 100644 --- a/nezha-fronted/src/components/page/asset/assetEditUnit.vue +++ b/nezha-fronted/src/components/page/asset/assetEditUnit.vue @@ -3,7 +3,7 @@
-