lz 3 anos atrás
pai
commit
6fcc4cf80e
2 arquivos alterados com 16 adições e 23 exclusões
  1. 8 5
      src/views/system/tableHead/index.vue
  2. 8 18
      src/views/system/user/index.vue

+ 8 - 5
src/views/system/tableHead/index.vue

@@ -1,8 +1,9 @@
 <template>
 	<div class="page-container">
-		<div class="search-container">
+		<div class="search-container" v-show="menuId">
+			<span style="margin-right: 12px"><strong>表头名称</strong></span>
 			<el-input v-model="queryParams.columnName" placeholder="输入表头名称" clearable size="small" style="width: 150px" />
-			<el-button type="primary" icon="el-icon-search" size="small " style="margin-left: 3px" @click="getList" v-hasPermi="['system:tableHead:listTable']">搜索</el-button>
+			<el-button type="primary" icon="el-icon-search" size="small " style="margin-left: 20px" @click="getList" v-hasPermi="['system:tableHead:listTable']">搜索</el-button>
 		</div>
 		<div class="content-container">
 			<TreeChoice :dataList="menuList" nodeKey="id" nodeVal="menuName" @itemClick="menuClick" />
@@ -12,7 +13,9 @@
 						<div class="tag" :style="isActive(1)">表头管理</div>
 					</div>
 					<div class="actions">
-						<el-button type="primary" icon="el-icon-plus" size="mini " style="margin: 0 0 10px 3px" @click="handleAdd" v-hasPermi="['system:tableHead:addTable']">添加</el-button>
+						<el-button type="primary" icon="el-icon-plus" size="mini " style="margin: 0 0 10px 3px" @click="handleAdd" v-hasPermi="['system:tableHead:addTable']" v-show="menuId"
+							>添加</el-button
+						>
 					</div>
 				</div>
 				<el-table v-loading="loading" :data="tableHeadList" border>
@@ -60,8 +63,8 @@
 				</el-form-item>
 			</el-form>
 			<div slot="footer" class="dialog-footer">
-				<el-button type="primary" @click="submitForm">确 定</el-button>
-				<el-button @click="cancel">取 消</el-button>
+				<el-button size="medium" @click="cancel">取 消</el-button>
+				<el-button size="medium" type="primary" @click="submitForm">确 定</el-button>
 			</div>
 		</el-dialog>
 	</div>

+ 8 - 18
src/views/system/user/index.vue

@@ -42,21 +42,21 @@
 						<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:user:add']">添加</el-button>
 						<el-button type="info" plain icon="el-icon-upload2" size="mini" @click="handleImport" v-hasPermi="['system:user:import']">导入</el-button>
 						<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:user:export']" style="margin-right: 10px">导出</el-button>
-						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
 					</div>
 				</div>
 				<el-table v-loading="loading" border :data="userList">
-					<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
-					<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-					<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
-					<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
-					<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
-					<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
+					<el-table-column label="用户编号" align="center" key="userId" prop="userId" />
+					<el-table-column label="用户名称" align="center" key="userName" prop="userName" :show-overflow-tooltip="true" />
+					<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" :show-overflow-tooltip="true" />
+					<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" :show-overflow-tooltip="true" />
+					<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" width="120" />
+					<el-table-column label="状态" align="center" key="status">
 						<template slot-scope="scope">
 							<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
 						</template>
 					</el-table-column>
-					<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160">
+					<el-table-column label="创建时间" align="center" prop="createTime" width="160">
 						<template slot-scope="scope">
 							<span>{{ parseTime(scope.row.createTime) }}</span>
 						</template>
@@ -262,16 +262,6 @@
 					status: undefined,
 					deptId: undefined
 				},
-				// 列信息
-				columns: [
-					{ key: 0, label: `用户编号`, visible: true },
-					{ key: 1, label: `用户名称`, visible: true },
-					{ key: 2, label: `用户昵称`, visible: true },
-					{ key: 3, label: `部门`, visible: true },
-					{ key: 4, label: `手机号码`, visible: true },
-					{ key: 5, label: `状态`, visible: true },
-					{ key: 6, label: `创建时间`, visible: true }
-				],
 				// 表单校验
 				rules: {
 					userName: [