From 7991973cf4c25527e227b80192e0bd087cfcee58 Mon Sep 17 00:00:00 2001
From: “dzb” <2632970487@qq.com>
Date: 星期二, 27 九月 2022 18:26:25 +0800
Subject: [PATCH] 完善系统设置的基本设置
---
src/views/systemSetting/platform/mySetting/index.vue | 288 ++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 192 insertions(+), 96 deletions(-)
diff --git a/src/views/systemSetting/platform/mySetting/index.vue b/src/views/systemSetting/platform/mySetting/index.vue
index b221b7f..423859c 100644
--- a/src/views/systemSetting/platform/mySetting/index.vue
+++ b/src/views/systemSetting/platform/mySetting/index.vue
@@ -4,87 +4,136 @@
<header>
<div class="headerTitle">绯荤粺璁剧疆 >> 闂ㄦ埛绠$悊 > 鑷畾涔夎彍鍗曡缃�</div>
</header>
- <!-- main 鍐呭灞曠ず鍖� -->
<main>
<div class="mainContent">
- <!-- 渚ц竟瀵艰埅鏍� -->
- <div class="aside">
- <div class="asideItem" v-for="(item,index) in menuList" :key="item.id" @click="getContent(index)">
- <h4>{{item.title}}</h4>
- <!-- 瀛愯彍鍗� -->
- <ul class="menu">
- <li class="menuItem" v-for="(son,sonIndex) in item.children"
- @click.stop="getContent(index,sonIndex)">
- <span>{{son.title}}</span>
- </li>
- </ul>
- </div>
- </div>
- <!-- 鑿滃崟璁剧疆 -->
- <div class="content">
- <h4>鑿滃崟绠$悊-{{article.title}}</h4>
- <!-- 瀛愯彍鍗曢」鐩� -->
- <ul class="edit">
- <li class="editItem">
- <label>鍚嶇О:</label>
- <span>{{article.name}}</span>
- </li>
- <li class="editItem">
- <label>鎻忚堪:</label>
- <span>{{article.description}}</span>
- </li>
- <li class="editItem">
- <label>鏄惁鏄剧ず鑿滃崟:</label>
- <span>{{article.hidden===0 ? '鍚�':'鏄�' }}</span>
- </li>
- </ul>
- </div>
+ <!-- 鏁版嵁灞曠ず -->
+ <el-table ref="multipleTable"
+ :header-cell-style="{background:'#06122c','font-size':'12px',color:'#4b9bb7','font-weight':'650','line-height':'45px'}"
+ :data="menuList" style="width: 100%" row-key="id" :row-class-name="tableRowClassName">
+ <el-table-column type="selection" min-width="5">
+ </el-table-column>
+ <el-table-column prop="title" label="鑿滃崟鏍�" min-width="75">
+ <el-tree :data="menuList" node-key="id" :default-expanded-keys="[0]"
+ :default-checked-keys="[0]" :props="defaultProps">
+ </el-tree>
+ </el-table-column>
+ <el-table-column label="鎿嶄綔" min-width="20">
+ <template slot-scope="scope">
+ <div class="operation">
+ <!-- <span @click="handleChangeRole(scope.row)">淇敼瑙掕壊</span> -->
+ <span @click="handleFind(scope.row)">鏌ョ湅</span>
+ <span class="line">|</span>
+ <!-- <span>淇敼瀵嗙爜</span> -->
+ <!-- <span>鍒犻櫎</span> -->
+ <span @click="handleUpdate(scope.row)">淇敼瑙掕壊</span>
+ </div>
+ </template>
+ </el-table-column>
+ </el-table>
+ <!-- 鏌ョ湅淇敼椤甸潰 -->
+ <el-dialog :visible.sync="dialogUpdate" width="45%" :title="updateFlag ? '淇敼瑙掕壊淇℃伅' :'鏌ョ湅瑙掕壊淇℃伅'"
+ v-if="dialogUpdate">
+
+ </el-dialog>
</div>
</main>
</div>
</template>
<script>
+import helper from "@/utils/mydate.js"
export default {
data() {
return {
menuList: [],
article: [],
+ defaultProps: {
+ children: 'menuVoArrayList',
+ label: 'title'
+ },
+ count: 1,
+ menuList: [],
+ context: "",
+ dialogCreate: false,
+ dialogUpdate: false,
+ updateFlag: false,
+ userInfo: '',
}
},
created() {
- const { getMenuList } = this;
- getMenuList();
+ this.getMenuList();
},
methods: {
// 鑾峰彇鑿滃崟鍒楄〃
getMenuList() {
- // this.$axios({
- // method: 'get',
- // url: 'sccg/system/portal/menu/search',
- // data: {
- // current: 1,
- // size: 10,
- // }
- // }).then(res => {
- // console.log(res);
- // const { data } = res;
- // this.menuList = data;
- // this.getContent(0);
- // })
+ this.$axios({
+ method: 'get',
+ url: 'sccg/system/portal/menu/search',
+ }).then(res => {
+ this.menuList = res.data.records;
+ this.getContent(0);
+ })
},
// 鍒囨崲鑿滃崟鍐呭灞曠ず
getContent(index, sonIndex = null) {
if (sonIndex === null) {
this.article = this.menuList[index];
+
return;
}
- this.article = this.menuList[index][sonIndex];
+ this.article = this.menuList[index].menuVoArrayList[sonIndex];
+ },
+ // 璁剧疆琛ㄦ牸鏂戦┈绾�
+ tableRowClassName({ row, rowIndex }) {
+ if ((rowIndex + 1) % 2 == 0) {
+ return 'warning-row';
+ } else {
+ return 'success-row';
+ }
+ return '';
+ },
+ handleCheckChange(data, checked, indeterminate) {
+ console.log(data, checked, indeterminate);
+ },
+ handleNodeClick(data) {
+ console.log(data);
+ },
+ loadNode(node, resolve) {
+ if (node.level === 0) {
+ return resolve([{ name: 'region1' }, { name: 'region2' }]);
+ }
+ if (node.level > 3) return resolve([]);
+
+ var hasChild;
+ if (node.data.name === 'region1') {
+ hasChild = true;
+ } else if (node.data.name === 'region2') {
+ hasChild = false;
+ } else {
+ hasChild = Math.random() > 0.5;
+ }
+
+ setTimeout(() => {
+ var data;
+ if (hasChild) {
+ data = [{
+ name: 'zone' + this.count++
+ }, {
+ name: 'zone' + this.count++
+ }];
+ } else {
+ data = [];
+ }
+
+ resolve(data);
+ }, 500);
}
}
+
}
</script>
<style lang="scss" scoped>
.mySetting {
+ margin: 10px 20px;
text-align: left;
color: #4b9bb7;
@@ -94,64 +143,111 @@
}
main {
- .mainContent {
- display: flex;
+ background-color: #09152f;
+ margin-top: 20px;
+ padding-bottom: 50px;
+ border: 1pox solid #fff;
- li {
- list-style: none;
+ .mainTitle {
+ line-height: 60px;
+ }
+
+ .el-table {
+ color: #4b9bb7;
+ font-size: 10px;
+
+ &::v-deep .el-table__cell {
+ text-align: center;
}
- .aside {
- width: 200px;
- border: 1px solid #fff;
- padding: 20px;
- height: calc(100vh - 120px);
-
- .asideItem {
- h4 {
- line-height: 40px;
- margin: 0;
- }
-
- ul {
- padding: 0;
- margin: 0;
- }
-
- .menu {
- .menuItem {
- line-height: 30px;
- }
- }
- }
+ &::v-deep .el-table__empty-block {
+ background-color: #09152f;
+ color: #4b9bb7;
+ }
+ &::v-deep .el-table__row:hover{
+ background-color: #4b9bb7;
+ }
+ .el-tree {
+ background-color: #071f39;
}
- .content {
- flex: 1;
- margin-left: 100px;
+ .operation {
+ display: flex;
+ justify-content: center;
- h4 {
- margin: 0;
- line-height: 80px;
+ .line {
+ padding: 0 5px;
}
- ul {
- padding: 0;
- margin: 0;
- }
-
- .edit {
- .editItem {
- line-height: 40px;
- display: flex;
-
- span {
- margin-left: 10px;
- }
- }
+ span:hover {
+ cursor: pointer;
}
}
}
+
+ .el-table::v-deep .warning-row {
+ background: #06122c;
+ }
+
+ .el-table::v-deep .success-row {
+ background: #071f39;
+ }
+
+ &::v-deep .switchStyle .el-switch__label {
+ position: absolute;
+ display: none;
+ color: #fff;
+ }
+
+ &::v-deep .el-switch__core {
+ background-color: rgba(166, 166, 166, 1);
+ }
+
+ &::v-deep .switchStyle .el-switch__label--left {
+ z-index: 9;
+ left: 20px;
+ }
+
+ &::v-deep .switchStyle .el-switch__label--right {
+ z-index: 9;
+ left: 4px;
+ }
+
+ &::v-deep .switchStyle .el-switch__label.is-active {
+ display: block;
+ }
+
+ &::v-deep .switchStyle.el-switch .el-switch__core,
+ &::v-deep .el-switch .el-switch__label {
+ width: 50px !important;
+ }
+ }
+
+ &::v-deep .el-dialog__header,
+ &::v-deep .el-dialog__body {
+ background-color: #06122c;
+ }
+
+ &::v-deep .el-dialog__header {
+ display: flex;
+ align-items: center;
+ background-color: #fff;
+ padding: 20px;
+ line-height: 60px;
+ }
+
+ &::v-deep .el-dialog__title {
+ color: #4b9bb7;
+ }
+
+ &::v-deep .el-dialog__close {
+ width: 20px;
+ height: 20px;
+ // color: #fff;
+ }
+
+ &::v-deep .el-dialog__body {
+ padding: 0;
}
}
</style>
\ No newline at end of file
--
Gitblit v1.8.0