-
+
@@ -41,23 +42,55 @@
import TestMenuItem from './TestMenuItem.vue'
export default {
name: 'TestTree',
- props: {},
+ props: {
+ menuList: {
+ type: Array,
+ default: () => []
+ }
+ },
components: { TestMenuItem },
data() {
return {
- testData: [
- { id: 0, label: '制造部', children: [{ label: '小组1' }, { label: '小组2' }] },
- { id: 1, label: '综合管理部' },
- { id: 2, label: '销售部' }
- ]
+ menuListTrue: [],
+ showList: false
}
},
- created() {},
- mounted() {},
+
+ mounted() {
+ this.$nextTick(() => {
+ this.reconstructMenuList()
+ })
+ },
+
methods: {
+ reconstructMenuList() {
+ this.showList = false
+ this.menuListTrue.splice(0)
+ if (this.menuList) {
+ this.menuList.forEach(item => {
+ if (item.parentId === '-1') {
+ this.menuListTrue.push(item)
+ } else {
+ this.constructMenuList(item)
+ }
+ })
+ }
+
+ this.showList = true
+ },
+ constructMenuList(child) {
+ this.menuList.forEach(item => {
+ if (child.parentId === item.id) {
+ if (!('children' in item)) {
+ this.$set(item, 'children', [])
+ }
+ item.children.push(child)
+ }
+ })
+ },
handleSelect(index, indexPath) {
- console.log('key, keyPath:', index, indexPath)
- this.$emit('getOrganization', { id, name: label })
+ const [id, name] = index.split('$--$')
+ this.$emit('getOrganization', { id, name })
}
}
}
@@ -65,12 +98,11 @@ export default {
diff --git a/src/views/UserPage/o.svg b/src/views/UserPage/o.svg
new file mode 100644
index 0000000..b5959c0
--- /dev/null
+++ b/src/views/UserPage/o.svg
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/src/views/UserPage/usermanage.vue b/src/views/UserPage/usermanage.vue
index 251c677..0f8b89d 100644
--- a/src/views/UserPage/usermanage.vue
+++ b/src/views/UserPage/usermanage.vue
@@ -9,32 +9,33 @@
-
+
-
-
- {{ dataForm.orgName }}
-
-
-
-
-
- {{ 'btn.search' | i18nFilter }}
-
+
+
+
+
+
+ {{ dataForm.orgName }}
+ 用户管理
+
+
+
+
+
+
+
+ {{ 'btn.search' | i18nFilter }}
+
+
+
{
+ }).then(async () => {
// 走接口
const result = await delUser({
id: raw.data.id
@@ -297,11 +298,13 @@ export default {
border-radius: 8px;
background-color: #fff;
width: 256px !important;
- padding-top: 20px;
margin: 0;
padding-left: 0;
padding-right: 0;
}
+aside {
+ padding: 0;
+}
.el-container >>> .el-main {
border-radius: 8px;
background-color: #fff;
@@ -352,4 +355,49 @@ export default {
letter-spacing: 0.88px;
color: #161616;
}
+
+.has-icon {
+ position: relative;
+ width: 100%;
+ display: flex;
+ align-items: center;
+}
+
+.has-icon::before {
+ content: '';
+ width: 4px;
+ border-radius: 2px;
+ height: 55%;
+ position: absolute;
+ /* top: 13%; */
+ left: 0;
+ background: #0b58ff;
+}
+
+:not(.has-icon) >>> .el-form-item__label {
+ font-size: 14px;
+}
+
+.has-icon >>> .el-form-item__label {
+ position: relative;
+ left: 12px;
+ font-size: 16px;
+}
+.has-icon >>> .el-form-item__content {
+ font-size: 16px;
+ margin-left: 12px;
+}
+
+.el-button--mini {
+ padding: 6px 12px;
+ border-radius: 4px;
+}
+/* .has-icon >>> .el-form-item__content {
+ position: absolute;
+ left: 24px;
+} */
+
+.el-form-item {
+ margin: 0;
+}