This commit is contained in:
linfso 2024-09-18 19:02:43 +08:00
parent a1d06cba1a
commit 7abfc3ac96
2 changed files with 93 additions and 76 deletions

View File

@ -1,6 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> <XdPageContainer>
<el-form slot="pageHeader" :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="部门名称" prop="deptName"> <el-form-item label="部门名称" prop="deptName">
<el-input <el-input
v-model="queryParams.deptName" v-model="queryParams.deptName"
@ -37,77 +38,84 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:dept:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-sort"
size="mini"
@click="toggleExpandAll"
>展开/折叠</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table <div slot="pageContent"
v-if="refreshTable" slot-scope="slotProps"
v-loading="loading" >
:data="deptList" <el-row :gutter="10" class="mb8">
row-key="deptId" <el-col :span="1.5">
:default-expand-all="isExpandAll" <el-button
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" type="primary"
> plain
<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column> icon="el-icon-plus"
<!-- <el-table-column prop="domainName" label="所属域" align="center" width="90"></el-table-column> --> size="mini"
<el-table-column prop="orderNum" label="排序" width="80"></el-table-column> @click="handleAdd"
<el-table-column prop="status" label="状态" width="100"> v-hasPermi="['system:dept:add']"
<template slot-scope="scope"> >新增</el-button>
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> </el-col>
</template> <el-col :span="1.5">
</el-table-column> <el-button
<el-table-column label="创建时间" align="center" prop="createTime" width="200"> type="info"
<template slot-scope="scope"> plain
<span>{{ parseTime(scope.row.createTime) }}</span> icon="el-icon-sort"
</template> size="mini"
</el-table-column> @click="toggleExpandAll"
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> >展开/折叠</el-button>
<template slot-scope="scope"> </el-col>
<el-button <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
size="mini" </el-row>
type="text"
icon="el-icon-edit" <el-table
@click="handleUpdate(scope.row)" :height="(slotProps.contentHeight)+'px'"
v-hasPermi="['system:dept:edit']"
>修改</el-button> v-if="refreshTable"
<el-button v-loading="loading"
size="mini" :data="deptList"
type="text" row-key="deptId"
icon="el-icon-plus" :default-expand-all="isExpandAll"
@click="handleAdd(scope.row)" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
v-hasPermi="['system:dept:add']" >
>新增</el-button> <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
<el-button <!-- <el-table-column prop="domainName" label="所属域" align="center" width="90"></el-table-column> -->
v-if="scope.row.parentId != 0" <el-table-column prop="orderNum" label="排序" width="80"></el-table-column>
size="mini" <el-table-column prop="status" label="状态" width="100">
type="text" <template slot-scope="scope">
icon="el-icon-delete" <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
@click="handleDelete(scope.row)" </template>
v-hasPermi="['system:dept:remove']" </el-table-column>
>删除</el-button> <el-table-column label="创建时间" align="center" prop="createTime" width="200">
</template> <template slot-scope="scope">
</el-table-column> <span>{{ parseTime(scope.row.createTime) }}</span>
</el-table> </template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dept:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-plus"
@click="handleAdd(scope.row)"
v-hasPermi="['system:dept:add']"
>新增</el-button>
<el-button
v-if="scope.row.parentId != 0"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dept:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 添加或修改部门对话框 --> <!-- 添加或修改部门对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
@ -179,7 +187,8 @@
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </XdPageContainer>
</div>
</template> </template>
<script> <script>

View File

@ -1,6 +1,8 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<search-form :model="queryParams" ref="queryForm" size="small" :maxShow="3" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery"> <XdPageContainer>
<search-form slot="pageHeader" :model="queryParams" ref="queryForm" size="small" :maxShow="3" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
<el-form-item label="" prop="content"> <el-form-item label="" prop="content">
<el-input <el-input
@ -49,7 +51,13 @@
</search-form> </search-form>
<xd-table v-loading="loading" <xd-table
slot="pageContent"
slot-scope="slotProps"
:height="(slotProps.contentHeight)+'px'"
v-loading="loading"
border border
size="small" size="small"
:data="sysTransTextList" :data="sysTransTextList"
@ -261,7 +269,7 @@
<sysTransTextView :id="id" ></SysTransTextView> <sysTransTextView :id="id" ></SysTransTextView>
</el-dialog> </el-dialog>
--> -->
</XdPageContainer>
</div> </div>
</template> </template>