This commit is contained in:
parent
b50d71cf11
commit
6aaa754c62
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<!--公司数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<el-input v-model="deptName" placeholder="请输入部门名称" clearable size="small" prefix-icon="el-icon-search"
|
||||
<el-input v-model="deptName" placeholder="请输入公司名称" clearable size="small" prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -37,17 +37,38 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 优化后的当前公司显示区域 -->
|
||||
<div class="current-dept-info" v-if="currentDeptName">
|
||||
<div class="dept-title">当前公司</div>
|
||||
<div class="dept-name">{{ currentDeptName }}</div>
|
||||
</div>
|
||||
<div v-else class="dept-placeholder">
|
||||
请从左侧选择公司
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="userList"
|
||||
@row-dblclick="handleRowDblClick"
|
||||
:row-class-name="getRowClassName"
|
||||
>
|
||||
<el-table-column label="装备分类" align="center" key="equipmentName" prop="equipmentName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="装备名称" align="center" key="equipmenttype" prop="equipmenttype"/>
|
||||
<el-table-column label="装备分类" align="center" key="equipmentName" prop="equipmentName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="基本配置" prop="basicConfig" />
|
||||
<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="handleRowDblClick(scope.row)"
|
||||
v-hasPermi="['system:whitelist:edit']"
|
||||
>装备配置
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
|
||||
|
|
@ -112,6 +133,8 @@ export default {
|
|||
deptName: undefined,
|
||||
// 当前选择的部门ID
|
||||
currentDeptId: null,
|
||||
// 当前选择的部门名称
|
||||
currentDeptName: '',
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
|
|
@ -154,7 +177,7 @@ export default {
|
|||
handleRowDblClick(row) {
|
||||
// 检查是否选择了部门
|
||||
if (!this.currentDeptId) {
|
||||
this.$message.warning('请先在左侧选择部门')
|
||||
this.$message.warning('请先在左侧选择公司')
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -261,6 +284,7 @@ export default {
|
|||
// 节点单击事件
|
||||
handleNodeClick(data) {
|
||||
this.currentDeptId = data.id; // 保存当前选择的部门ID
|
||||
this.currentDeptName = data.label; // 保存当前选择的部门名称
|
||||
this.queryParams.deptId = data.id;
|
||||
this.handleQuery();
|
||||
},
|
||||
|
|
@ -277,6 +301,7 @@ export default {
|
|||
this.queryParams.equipmentName = undefined;
|
||||
this.queryParams.equipmenttype = undefined;
|
||||
this.currentDeptId = null; // 重置部门ID
|
||||
this.currentDeptName = ''; // 重置部门名称
|
||||
if (this.$refs.tree) {
|
||||
this.$refs.tree.setCurrentKey(null);
|
||||
}
|
||||
|
|
@ -316,4 +341,41 @@ export default {
|
|||
.disabled-row:hover td {
|
||||
background-color: #f5f7fa !important;
|
||||
}
|
||||
|
||||
/* 优化后的部门信息样式 */
|
||||
.current-dept-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0 0 20px 0;
|
||||
padding: 12px 15px;
|
||||
background: linear-gradient(135deg, #f0f7ff 0%, #e6f7ff 100%);
|
||||
border-radius: 6px;
|
||||
border-left: 4px solid #409EFF;
|
||||
box-shadow: 0 2px 8px rgba(64, 158, 255, 0.1);
|
||||
}
|
||||
|
||||
.dept-title {
|
||||
font-weight: 600;
|
||||
color: #606266;
|
||||
margin-right: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.dept-name {
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
color: #1a73e8;
|
||||
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.dept-placeholder {
|
||||
margin: 0 0 20px 0;
|
||||
padding: 12px 15px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 6px;
|
||||
color: #909399;
|
||||
font-style: italic;
|
||||
font-size: 14px;
|
||||
border: 1px dashed #dcdfe6;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue