diff --git a/nezha-fronted/src/App.vue b/nezha-fronted/src/App.vue index e73bf50ea..9be7b615f 100644 --- a/nezha-fronted/src/App.vue +++ b/nezha-fronted/src/App.vue @@ -10,22 +10,10 @@ export default { } - diff --git a/nezha-fronted/src/assets/css/main.css b/nezha-fronted/src/assets/css/main.css index a682eb488..cabd0edfc 100644 --- a/nezha-fronted/src/assets/css/main.css +++ b/nezha-fronted/src/assets/css/main.css @@ -4,19 +4,10 @@ } body { - font-family: NotoSansSC-Light; - min-width: 1350px; - background: #F2F7F8; - overflow-x: hidden !important; height: 100%; - box-sizing: border-box; } html { - overflow: auto; - overflow-y: hidden; - overflow-x: hidden !important; height: 100%; - box-sizing: border-box; } /*侧滑文字*/ .el-form-item .el-form-item__label{ diff --git a/nezha-fronted/src/components/common/header.vue b/nezha-fronted/src/components/common/header.vue index c3f3915b2..9c39d2cc3 100644 --- a/nezha-fronted/src/components/common/header.vue +++ b/nezha-fronted/src/components/common/header.vue @@ -119,6 +119,9 @@ export default { diff --git a/nezha-fronted/src/components/common/language/cn.js b/nezha-fronted/src/components/common/language/cn.js index dfbb06b58..c28057c6b 100644 --- a/nezha-fronted/src/components/common/language/cn.js +++ b/nezha-fronted/src/components/common/language/cn.js @@ -17,11 +17,11 @@ const cn = { tableTitle: { id: 'ID', assetType: '资产类型', - Device: 'Device SN', - IP: 'IP', + device: 'Device SN', + ip: 'IP', assetState: '资产状态', - Module: 'Module', - Alarm: 'Alarm', + module: 'Module', + alarm: 'Alarm', dataCenter: '数据中心', cabinet: '机柜', model: '型号', diff --git a/nezha-fronted/src/components/common/language/en.js b/nezha-fronted/src/components/common/language/en.js index 4f49fc32a..716ed716b 100644 --- a/nezha-fronted/src/components/common/language/en.js +++ b/nezha-fronted/src/components/common/language/en.js @@ -17,11 +17,11 @@ const en = { tableTitle: { id: 'ID', assetType: 'assetType', - Device: 'Device SN', - IP: 'IP', + device: 'Device SN', + ip: 'IP', assetState: 'assetState', - Module: 'Module', - Alarm: 'Alarm', + module: 'Module', + alarm: 'Alarm', dataCenter: 'dataCenter', cabinet: 'cabinet', model: 'model', diff --git a/nezha-fronted/src/components/common/sideBar.vue b/nezha-fronted/src/components/common/sideBar.vue deleted file mode 100644 index 78d8e5782..000000000 --- a/nezha-fronted/src/components/common/sideBar.vue +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - - diff --git a/nezha-fronted/src/components/page/asset/asset.vue b/nezha-fronted/src/components/page/asset/asset.vue index 2af3bc963..631bc65bd 100644 --- a/nezha-fronted/src/components/page/asset/asset.vue +++ b/nezha-fronted/src/components/page/asset/asset.vue @@ -1,236 +1,246 @@ @@ -239,6 +249,9 @@ export default { name: "asset", data() { return { + checkList: [0], + checkListData: [], + sidebarState:'', tableTitle: [ { label: this.$t("asset.tableTitle.id"), @@ -340,36 +353,68 @@ export default { endPoint: '上海市普陀区金沙江路 1518 弄' } ], + input: '', pageObj: { pageNo: 1, pageSize: 20, - total: 0 + total: 0, }, - input: '', + tableHeight:document.documentElement.clientHeight-150, tabShow: false, tagType: 'add', form: { name: '' }, + searchObj: { + idcId: 7 + } } }, + computed:{ + getData(){ + return this.$store.state.assetData + } + }, + watch:{ + getData:{ + handler(newVal,oldVal){ + this.checkList.splice(1,1,newVal.selectedData) + if(newVal.moduleData=='asset'){ + this.sidebarState=true + }else{ + this.sidebarState=false + this.getAssetData() + this.checkListData=[0] + } + }, + deep: true, + }, + + }, methods: { getListData() { this.$get('asset', this.pageObj).then(response => { - if (response.code == 200) { - this.tableData = response.data.list + if (response.code === 200) { + this.tableData = response.data.list; this.pageObj.total = response.data.total } }) }, + getAssetData() { + this.$get('idc', this.pageObj).then(response => { + if (response.code == 200) { + this.checkListData = response.data.list + } + }) + }, tagShow(t) { - this.tabShow = false + this.tabShow = false; if (t === 'showAdd') { - this.tabShow = true + this.tabShow = true; this.tagType = 'add' } if (t === 'showEdit') { - this.tabShow = true + this.tabShow = true; this.tagType = 'edit' } }, @@ -382,8 +427,14 @@ export default { this.getListData() } }, + mounted() { this.getListData() + this.getAssetData() + window.onresize = () => { + this.tableHeight = document.documentElement.clientHeight-150; + console.log(this.tableHeight) + } } } @@ -401,25 +452,65 @@ export default { font-size: 10px; } -.el-table__body-wrapper::-webkit-scrollbar { - width: 6px; - height: 6px; +.el-checkbox.is-bordered + .el-checkbox.is-bordered { + margin-left: 0px; + margin-top: 20px; +} + +.el-checkbox-group { + padding-top: 10px; +} + +.el-checkbox { + width: 270px; }