账户页面修改布局
This commit is contained in:
parent
5028451710
commit
bb55eaedad
11
src/store/system.ts
Normal file
11
src/store/system.ts
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
import { defineStore } from 'pinia'
|
||||||
|
|
||||||
|
export const useSystemStore = defineStore('system', {
|
||||||
|
state() {
|
||||||
|
return {
|
||||||
|
userMng: {
|
||||||
|
searchKey: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
|
@ -0,0 +1,13 @@
|
||||||
|
<template>
|
||||||
|
<el-input v-model.trim="systemStore.userMng.searchKey" placeholder="按下回车键搜索" />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { useSystemStore } from "@/store/system";
|
||||||
|
|
||||||
|
const systemStore = useSystemStore();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
|
@ -1,40 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<app-page class="userManagement-container">
|
<app-page class="userManagement-container">
|
||||||
<div>
|
<template #right>
|
||||||
<el-form :inline="true" :model="queryForm" @submit.prevent>
|
<right-nav-search-input
|
||||||
<!-- <el-form-item>
|
style="margin-right: 1em" @keyup.enter="queryData"
|
||||||
<el-select v-model="queryForm.post" placeholder="专业方向">
|
|
||||||
<el-option
|
|
||||||
v-for="item in postList"
|
|
||||||
:key="item.code"
|
|
||||||
:label="item.value"
|
|
||||||
:value="item.code"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item>
|
|
||||||
<el-input
|
|
||||||
v-model.trim="queryForm.keys"
|
|
||||||
placeholder="请输入关键字"
|
|
||||||
@keyup.enter="queryData"
|
|
||||||
>
|
|
||||||
<template #suffix>
|
|
||||||
<i
|
|
||||||
class="el-icon-search el-input__icon i-search"
|
|
||||||
@click="queryData"
|
|
||||||
/>
|
/>
|
||||||
</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<!-- <el-button icon="el-icon-search" type="primary" @click="queryData">
|
|
||||||
查询
|
|
||||||
</el-button> -->
|
|
||||||
<el-button type="primary" @click="handleEdit">新增</el-button>
|
<el-button type="primary" @click="handleEdit">新增</el-button>
|
||||||
<!-- <el-button type="danger" @click="handleExport">导出</el-button> -->
|
</template>
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
@ -110,11 +81,13 @@ import Edit from "./components/UserManagementEdit.vue";
|
||||||
import { sha1 } from "hash.js";
|
import { sha1 } from "hash.js";
|
||||||
import MenuIcon from "@/layout/sidebar/MenuIcon.vue";
|
import MenuIcon from "@/layout/sidebar/MenuIcon.vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
|
import RightNavSearchInput from "@/views/system/userManagement/components/RightNavSearchInput.vue";
|
||||||
|
import { useSystemStore } from "@/store/system";
|
||||||
|
|
||||||
// 注释
|
// 注释
|
||||||
export default {
|
export default {
|
||||||
name: "UserManagement",
|
name: "UserManagement",
|
||||||
components: { MenuIcon, Edit },
|
components: { RightNavSearchInput, MenuIcon, Edit },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
list: null,
|
list: null,
|
||||||
|
@ -181,6 +154,7 @@ export default {
|
||||||
},
|
},
|
||||||
async fetchData() {
|
async fetchData() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
this.queryForm.keys = useSystemStore().userMng.searchKey;
|
||||||
const { data } = await getList(this.queryForm);
|
const { data } = await getList(this.queryForm);
|
||||||
this.list = data.data;
|
this.list = data.data;
|
||||||
this.total = data.total;
|
this.total = data.total;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user