Commit f994bdcc authored by lwy's avatar lwy

机构管理,用户管理

parent 58203947
...@@ -6,16 +6,16 @@ ...@@ -6,16 +6,16 @@
:model="queryParams" :model="queryParams"
:inline="true" :inline="true"
> >
<el-form-item label="部门名称" prop="deptName"> <el-form-item label="" prop="deptName">
<el-input <el-input
v-model="queryParams.deptName" v-model="queryParams.deptName"
placeholder="请输入部门名称" placeholder="请输入搜索关键词"
clearable clearable
style="width: 200px" style="width: 200px"
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <!-- <el-form-item label="状态" prop="status">
<el-select <el-select
v-model="queryParams.status" v-model="queryParams.status"
placeholder="部门状态" placeholder="部门状态"
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
:value="dict.value" :value="dict.value"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery" <el-button type="primary" icon="Search" @click="handleQuery"
>搜索</el-button >搜索</el-button
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
v-hasPermi="['system:dept:add']" v-hasPermi="['system:dept:add']"
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
v-model:show-search="showSearch" v-model:show-search="showSearch"
@query-table="getList" @query-table="getList"
></right-toolbar> ></right-toolbar>
</el-row> </el-row>-->
<el-table <el-table
v-if="refreshTable" v-if="refreshTable"
...@@ -70,20 +70,35 @@ ...@@ -70,20 +70,35 @@
> >
<el-table-column <el-table-column
prop="deptName" prop="deptName"
label="部门名称" label="机构名称"
width="260" width="570"
></el-table-column> ></el-table-column>
<el-table-column <!-- <el-table-column
prop="orderNum" prop="orderNum"
label="排序" label="排序"
width="200" width="200"
></el-table-column> ></el-table-column>-->
<el-table-column prop="status" label="状态" width="100"> <!-- <el-table-column prop="status" label="状态" width="100">
<template #default="scope"> <template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" /> <dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template> </template>
</el-table-column> </el-table-column>-->
<el-table-column <el-table-column
prop="type"
label="机构类型"
width="500"
></el-table-column>
<el-table-column
label="同步时间"
align="center"
prop="updateTime"
width="500"
>
<template #default="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
</el-table-column>
<!-- <el-table-column
label="创建时间" label="创建时间"
align="center" align="center"
prop="createTime" prop="createTime"
...@@ -92,8 +107,8 @@ ...@@ -92,8 +107,8 @@
<template #default="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>-->
<el-table-column <!-- <el-table-column
label="操作" label="操作"
align="center" align="center"
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
...@@ -125,9 +140,16 @@ ...@@ -125,9 +140,16 @@
>删除</el-button >删除</el-button
> >
</template> </template>
</el-table-column> </el-table-column>-->
</el-table> </el-table>
<!-- 分页 -->
<pagination
v-show="total > 0"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
:total="total"
@pagination="getList"
/>
<!-- 添加或修改部门对话框 --> <!-- 添加或修改部门对话框 -->
<el-dialog v-model="open" :title="title" width="600px" append-to-body> <el-dialog v-model="open" :title="title" width="600px" append-to-body>
<el-form ref="deptRef" :model="form" :rules="rules" label-width="80px"> <el-form ref="deptRef" :model="form" :rules="rules" label-width="80px">
...@@ -231,6 +253,7 @@ const open = ref(false) ...@@ -231,6 +253,7 @@ const open = ref(false)
const loading = ref(true) const loading = ref(true)
const showSearch = ref(true) const showSearch = ref(true)
const title = ref('') const title = ref('')
const total = ref(0)
const deptOptions = ref([]) const deptOptions = ref([])
const isExpandAll = ref(true) const isExpandAll = ref(true)
const refreshTable = ref(true) const refreshTable = ref(true)
...@@ -238,6 +261,8 @@ const refreshTable = ref(true) ...@@ -238,6 +261,8 @@ const refreshTable = ref(true)
const data = reactive({ const data = reactive({
form: {}, form: {},
queryParams: { queryParams: {
pageNum: 1,
pageSize: 10,
deptName: undefined, deptName: undefined,
status: undefined, status: undefined,
}, },
...@@ -275,6 +300,7 @@ function getList() { ...@@ -275,6 +300,7 @@ function getList() {
loading.value = true loading.value = true
listDept(queryParams.value).then((response) => { listDept(queryParams.value).then((response) => {
deptList.value = proxy.handleTree(response.data, 'deptId') deptList.value = proxy.handleTree(response.data, 'deptId')
total.value = response.total
loading.value = false loading.value = false
}) })
} }
...@@ -383,3 +409,14 @@ function handleDelete(row) { ...@@ -383,3 +409,14 @@ function handleDelete(row) {
getList() getList()
</script> </script>
<style scoped>
/* 自定义样式优化布局 */
.el-table {
width: 100%; /* 确保表格宽度占满容器 */
}
.el-table-column {
box-sizing: border-box; /* 避免因边框影响实际宽度 */
}
</style>
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment