From 32a212b99dfd1591cc0ace0f53e6cb0be81cea85 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期四, 12 一月 2023 15:33:41 +0800
Subject: [PATCH] 2023/1/12 肖辉 userlist样式调整
---
src/views/systemSetting/device/loudspeaker/index.vue | 140 +++++++++++++++++++++++++---------------------
1 files changed, 77 insertions(+), 63 deletions(-)
diff --git a/src/views/systemSetting/device/loudspeaker/index.vue b/src/views/systemSetting/device/loudspeaker/index.vue
index de78e41..4cb5738 100644
--- a/src/views/systemSetting/device/loudspeaker/index.vue
+++ b/src/views/systemSetting/device/loudspeaker/index.vue
@@ -23,20 +23,17 @@
<main>
<div class="main-content">
<div class="main-title">
- <el-button
- class="el-icon-plus"
- type="primary"
- @click="dialogCreate = true"
+ <el-button class="el-icon-plus button-addition" type="primary" @click="handleAdd"
>娣诲姞</el-button
>
</div>
<!-- 鏁版嵁灞曠ず -->
<el-table
+ border
+ stripe
ref="multipleTable"
:header-cell-style="{
- background: '#06122c',
- 'font-size': '12px',
- color: '#4b9bb7',
+ 'background':'#F5F5F5',
'font-weight': '650',
'line-height': '45px',
}"
@@ -72,7 +69,7 @@
</el-table-column>
<el-table-column prop="operation" label="鎿嶄綔" min-width="20">
<template slot-scope="scope">
- <div class="btn">
+ <div class="operation">
<span @click="handleEdit(scope.row)">缂栬緫</span>
<span class="line">|</span>
<span @click="handleDelete(scope.row)">鍒犻櫎</span>
@@ -106,10 +103,9 @@
title="娣诲姞闊虫煴"
:visible.sync="dialogCreate"
width="60%"
- v-if="dialogCreate"
:before-close="handleClose"
>
- <MyForm :info="loudspeakerInfo" :closeDialog="null"></MyForm>
+ <MyForm :info="loudspeakerInfo" @closeDialog="handleCallBack"></MyForm>
</el-dialog>
</footer>
</div>
@@ -146,14 +142,7 @@
pageSize: 10,
currentPage: 1,
renderFlag: false,
- loudspeakerInfo: {
- id: 0,
- name: "",
- code: "",
- power: "",
- frequencyResponse: "",
- fullRangeSpeaker: "",
- },
+ loudspeakerInfo: {},
};
},
created() {
@@ -164,16 +153,42 @@
"getLoudspeakerList",
"saveLoudspeaker",
"updateLoudspeaker",
+ "deleteLoudspeaker",
]),
+ handleAdd() {
+ this.loudspeakerInfo = {
+ id: 0,
+ name: "",
+ code: "",
+ power: "",
+ frequencyResponse: "",
+ fullRangeSpeaker: "",
+ };
+ this.dialogCreate = true;
+ },
handleEdit(row) {
this.loudspeakerInfo = row;
this.dialogCreate = true;
},
- handleDelete(row) {},
+ handleDelete(row) {
+ this.$confirm("纭鍒犻櫎锛�").then((_) => {
+ this.deleteLoudspeaker(row.id).then((res) => {
+ this.$message({
+ type: "success",
+ message: "鍒犻櫎鎴愬姛锛�",
+ });
+ this.setTableData();
+ });
+ });
+ },
formatSate(row, column) {
return row.state == 1 ? "鍦ㄧ嚎" : "绂荤嚎";
},
-
+ handleCallBack(e) {
+ this.currentPage = 1;
+ this.dialogCreate = false;
+ this.setTableData();
+ },
// 璁剧疆琛ㄦ牸鏂戦┈绾�
tableRowClassName({ row, rowIndex }) {
if ((rowIndex + 1) % 2 == 0) {
@@ -197,13 +212,12 @@
pageSize,
state: context,
}).then((res) => {
- if (res.data.code == 200) {
- this.list = res.data.data.records;
- this.totalNum = res.data.data.total;
- }
+ this.list = res.records;
+ this.totalNum = res.total;
});
},
handleStateChange(e) {
+ this.currentPage = 1;
this.setTableData();
},
// 褰撳墠椤垫敼鍙樿Е鍙戜簨浠�
@@ -227,15 +241,15 @@
<style lang="scss" scoped>
.list {
text-align: left;
- margin: 10px 20px;
- color: #4b9bb7;
-
+ padding: 10px 20px;
+ // color: #4b9bb7;
+ border: 1px solid #ccc;
header {
- background-color: #09152f;
- border: 1pox solid #fff;
+ background-color: white;
+ // border: 1pox solid #fff;
.header-content {
- padding: 0 40px;
+ padding: 0px;
display: flex;
line-height: 100px;
justify-content: space-between;
@@ -251,26 +265,26 @@
.el-input {
flex: 2;
- color: #1d3f57;
+ // color: #1d3f57;
- &::v-deep .el-input__inner {
- background-color: #09152f;
- border: 1px solid #17324c;
- }
+ // &::v-deep .el-input__inner {
+ // background-color: #09152f;
+ // border: 1px solid #17324c;
+ // }
}
}
}
}
main {
- background-color: #09152f;
- margin-top: 20px;
+ // background-color: #09152f;
+ //margin-top: 20px;
padding-bottom: 50px;
- border: 1pox solid #fff;
+ //border: 1px solid #fff;
.main-title {
line-height: 60px;
- padding: 10px 20px;
+ padding: 0;
}
.tools {
@@ -286,7 +300,7 @@
line-height: 28px;
display: flex;
align-items: center;
- border: 1px solid #17324c;
+ // border: 1px solid #17324c;
border-radius: 4px;
font-size: 12px;
margin-left: 10px;
@@ -300,18 +314,18 @@
width: 120px;
}
- &::v-deep .el-input__inner {
- border: none;
- background-color: #09152f;
- }
+ // &::v-deep .el-input__inner {
+ // border: none;
+ // background-color: #09152f;
+ // }
- &:hover {
- border: 1px solid #4b9bb7;
- }
+ // &:hover {
+ // border: 1px solid #4b9bb7;
+ // }
- &:hover .el-checkbox {
- color: #4b9bb7;
- }
+ // &:hover .el-checkbox {
+ // color: #4b9bb7;
+ // }
}
}
@@ -322,24 +336,24 @@
justify-content: center;
.el-pagination {
- &::v-deep li,
- &::v-deep .btn-prev,
- &::v-deep .btn-next {
- background-color: #071f39;
- color: #4b9bb7;
- }
+ // &::v-deep li,
+ // &::v-deep .btn-prev,
+ // &::v-deep .btn-next {
+ // background-color: #071f39;
+ // color: #4b9bb7;
+ // }
- &::v-deep .active {
- background-color: #409eff;
- color: #fff;
- }
+ // &::v-deep .active {
+ // background-color: #409eff;
+ // color: #fff;
+ // }
}
}
}
.el-table {
- color: #4b9bb7;
- font-size: 10px;
+ // color: #4b9bb7;
+ // font-size: 10px;
.operation {
display: flex;
@@ -355,4 +369,4 @@
}
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.8.0