Browse Source

Merge branch 'master' of http://182.92.174.150:3000/tiegu/czo

dukai 3 năm trước cách đây
mục cha
commit
aeaa99732d

+ 2 - 0
src/components/treeChoice/index.vue

@@ -53,5 +53,7 @@
 		width: 280px;
 		margin-right: 7px;
 		flex-shrink: 0;
+		height: 100%;
+		overflow-y: auto;
 	}
 </style>

+ 165 - 137
src/views/monitor/cache/index.vue

@@ -1,146 +1,174 @@
 <template>
-  <div class="app-container">
-    <el-row>
-      <el-col :span="24" class="card-box">
-        <el-card>
-          <div slot="header"><span>基本信息</span></div>
-          <div class="el-table el-table--enable-row-hover el-table--medium">
-            <table cellspacing="0" style="width: 100%">
-              <tbody>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">Redis版本</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.redis_version }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">运行模式</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.redis_mode == "standalone" ? "单机" : "集群" }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">端口</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.tcp_port }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">客户端数</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.connected_clients }}</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">运行时间(天)</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.uptime_in_days }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">使用内存</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.used_memory_human }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">使用CPU</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">内存配置</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.maxmemory_human }}</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">AOF是否开启</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.aof_enabled == "0" ? "否" : "是" }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">RDB是否成功</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.rdb_last_bgsave_status }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">Key数量</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.dbSize">{{ cache.dbSize }} </div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">网络入口/出口</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="cache.info">{{ cache.info.instantaneous_input_kbps }}kps/{{cache.info.instantaneous_output_kbps}}kps</div></td>
-                </tr>
-              </tbody>
-            </table>
-          </div>
-        </el-card>
-      </el-col>
+	<div class="page-container">
+		<div class="content-container">
+			<div class="main">
+				<el-row>
+					<el-col :span="24" class="card-box">
+						<el-card>
+							<div slot="header"><span>基本信息</span></div>
+							<div class="el-table el-table--enable-row-hover el-table--medium">
+								<table cellspacing="0" style="width: 100%">
+									<tbody>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">Redis版本</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.redis_version }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">运行模式</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.redis_mode == 'standalone' ? '单机' : '集群' }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">端口</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.tcp_port }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">客户端数</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.connected_clients }}</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">运行时间(天)</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.uptime_in_days }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">使用内存</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.used_memory_human }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">使用CPU</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ parseFloat(cache.info.used_cpu_user_children).toFixed(2) }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">内存配置</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.maxmemory_human }}</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">AOF是否开启</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.aof_enabled == '0' ? '否' : '是' }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">RDB是否成功</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.rdb_last_bgsave_status }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">Key数量</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.dbSize">{{ cache.dbSize }} </div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">网络入口/出口</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="cache.info">{{ cache.info.instantaneous_input_kbps }}kps/{{ cache.info.instantaneous_output_kbps }}kps</div></td
+											>
+										</tr>
+									</tbody>
+								</table>
+							</div>
+						</el-card>
+					</el-col>
 
-      <el-col :span="12" class="card-box">
-        <el-card>
-          <div slot="header"><span>命令统计</span></div>
-          <div class="el-table el-table--enable-row-hover el-table--medium">
-            <div ref="commandstats" style="height: 420px" />
-          </div>
-        </el-card>
-      </el-col>
+					<el-col :span="12" class="card-box">
+						<el-card>
+							<div slot="header"><span>命令统计</span></div>
+							<div class="el-table el-table--enable-row-hover el-table--medium">
+								<div ref="commandstats" style="height: 420px" />
+							</div>
+						</el-card>
+					</el-col>
 
-      <el-col :span="12" class="card-box">
-        <el-card>
-          <div slot="header">
-            <span>内存信息</span>
-          </div>
-          <div class="el-table el-table--enable-row-hover el-table--medium">
-            <div ref="usedmemory" style="height: 420px" />
-          </div>
-        </el-card>
-      </el-col>
-    </el-row>
-  </div>
+					<el-col :span="12" class="card-box">
+						<el-card>
+							<div slot="header">
+								<span>内存信息</span>
+							</div>
+							<div class="el-table el-table--enable-row-hover el-table--medium">
+								<div ref="usedmemory" style="height: 420px" />
+							</div>
+						</el-card>
+					</el-col>
+				</el-row>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import { getCache } from "@/api/monitor/cache";
-import echarts from "echarts";
+	import { getCache } from '@/api/monitor/cache'
+	import echarts from 'echarts'
 
-export default {
-  name: "Server",
-  data() {
-    return {
-      // 统计命令信息
-      commandstats: null,
-      // 使用内存
-      usedmemory: null,
-      // cache信息
-      cache: [],
-    };
-  },
-  created() {
-    this.getList();
-    this.openLoading();
-  },
-  methods: {
-    /** 查缓存询信息 */
-    getList() {
-      getCache().then((response) => {
-        this.cache = response.data;
-        this.$modal.closeLoading();
+	export default {
+		name: 'Server',
+		data() {
+			return {
+				// 统计命令信息
+				commandstats: null,
+				// 使用内存
+				usedmemory: null,
+				// cache信息
+				cache: []
+			}
+		},
+		created() {
+			this.getList()
+			this.openLoading()
+		},
+		methods: {
+			/** 查缓存询信息 */
+			getList() {
+				getCache().then((response) => {
+					this.cache = response.data
+					this.$modal.closeLoading()
 
-        this.commandstats = echarts.init(this.$refs.commandstats, "macarons");
-        this.commandstats.setOption({
-          tooltip: {
-            trigger: "item",
-            formatter: "{a} <br/>{b} : {c} ({d}%)",
-          },
-          series: [
-            {
-              name: "命令",
-              type: "pie",
-              roseType: "radius",
-              radius: [15, 95],
-              center: ["50%", "38%"],
-              data: response.data.commandStats,
-              animationEasing: "cubicInOut",
-              animationDuration: 1000,
-            },
-          ],
-        });
-        this.usedmemory = echarts.init(this.$refs.usedmemory, "macarons");
-        this.usedmemory.setOption({
-          tooltip: {
-            formatter: "{b} <br/>{a} : " + this.cache.info.used_memory_human,
-          },
-          series: [
-            {
-              name: "峰值",
-              type: "gauge",
-              min: 0,
-              max: 1000,
-              detail: {
-                formatter: this.cache.info.used_memory_human,
-              },
-              data: [
-                {
-                  value: parseFloat(this.cache.info.used_memory_human),
-                  name: "内存消耗",
-                },
-              ],
-            },
-          ],
-        });
-      });
-    },
-    // 打开加载层
-    openLoading() {
-      this.$modal.loading("正在加载缓存监控数据,请稍候!");
-    },
-  },
-};
+					this.commandstats = echarts.init(this.$refs.commandstats, 'macarons')
+					this.commandstats.setOption({
+						tooltip: {
+							trigger: 'item',
+							formatter: '{a} <br/>{b} : {c} ({d}%)'
+						},
+						series: [
+							{
+								name: '命令',
+								type: 'pie',
+								roseType: 'radius',
+								radius: [15, 95],
+								center: ['50%', '38%'],
+								data: response.data.commandStats,
+								animationEasing: 'cubicInOut',
+								animationDuration: 1000
+							}
+						]
+					})
+					this.usedmemory = echarts.init(this.$refs.usedmemory, 'macarons')
+					this.usedmemory.setOption({
+						tooltip: {
+							formatter: '{b} <br/>{a} : ' + this.cache.info.used_memory_human
+						},
+						series: [
+							{
+								name: '峰值',
+								type: 'gauge',
+								min: 0,
+								max: 1000,
+								detail: {
+									formatter: this.cache.info.used_memory_human
+								},
+								data: [
+									{
+										value: parseFloat(this.cache.info.used_memory_human),
+										name: '内存消耗'
+									}
+								]
+							}
+						]
+					})
+				})
+			},
+			// 打开加载层
+			openLoading() {
+				this.$modal.loading('正在加载缓存监控数据,请稍候!')
+			}
+		}
+	}
 </script>

+ 2 - 2
src/views/monitor/job/index.vue

@@ -138,8 +138,8 @@
 				</el-row>
 			</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>
 

+ 169 - 216
src/views/monitor/logininfor/index.vue

@@ -1,223 +1,176 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="登录地址" prop="ipaddr">
-        <el-input
-          v-model="queryParams.ipaddr"
-          placeholder="请输入登录地址"
-          clearable
-		  size="small"
-          style="width: 240px;"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="用户名称" prop="userName">
-        <el-input
-          v-model="queryParams.userName"
-          placeholder="请输入用户名称"
-          clearable
-		  size="small"
-          style="width: 240px;"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select
-          v-model="queryParams.status"
-          placeholder="登录状态"
-          clearable
-          size="small"
-          style="width: 240px"
-        >
-          <el-option
-            v-for="dict in dict.type.sys_common_status"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="登录时间">
-        <el-date-picker
-          v-model="dateRange"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-        ></el-date-picker>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
+	<div class="page-container">
+		<div class="search-container" v-show="showSearch">
+			<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+				<el-form-item label="登录地址" prop="ipaddr">
+					<el-input v-model="queryParams.ipaddr" placeholder="请输入登录地址" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="用户名称" prop="userName">
+					<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="状态" prop="status">
+					<el-select v-model="queryParams.status" placeholder="登录状态" clearable size="small" style="width: 240px">
+						<el-option v-for="dict in dict.type.sys_common_status" :key="dict.value" :label="dict.label" :value="dict.value" />
+					</el-select>
+				</el-form-item>
+				<el-form-item label="登录时间">
+					<el-date-picker
+						v-model="dateRange"
+						size="small"
+						style="width: 240px"
+						value-format="yyyy-MM-dd"
+						type="daterange"
+						range-separator="-"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期"
+					></el-date-picker>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">登录日志</div>
+					</div>
+					<div class="actions">
+						<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleClean" v-hasPermi="['monitor:logininfor:remove']">清空</el-button>
+						<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['monitor:logininfor:export']" style="margin-right: 10px">导出</el-button>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+					</div>
+				</div>
+				<el-table ref="tables" v-loading="loading" :data="list" border :default-sort="defaultSort" @sort-change="handleSortChange">
+					<el-table-column label="访问编号" align="center" prop="infoId" />
+					<el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
+					<el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
+					<el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
+					<el-table-column label="浏览器" align="center" prop="browser" :show-overflow-tooltip="true" />
+					<el-table-column label="操作系统" align="center" prop="os" />
+					<el-table-column label="登录状态" align="center" prop="status">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status" />
+						</template>
+					</el-table-column>
+					<el-table-column label="操作信息" align="center" prop="msg" />
+					<el-table-column label="登录日期" align="center" prop="loginTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
+						<template slot-scope="scope">
+							<span>{{ parseTime(scope.row.loginTime) }}</span>
+						</template>
+					</el-table-column>
+				</el-table>
 
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['monitor:logininfor:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          @click="handleClean"
-          v-hasPermi="['monitor:logininfor:remove']"
-        >清空</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['monitor:logininfor:export']"
-        >导出</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="访问编号" align="center" prop="infoId" />
-      <el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
-      <el-table-column label="登录地址" align="center" prop="ipaddr" width="130" :show-overflow-tooltip="true" />
-      <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
-      <el-table-column label="浏览器" align="center" prop="browser" :show-overflow-tooltip="true" />
-      <el-table-column label="操作系统" align="center" prop="os" />
-      <el-table-column label="登录状态" align="center" prop="status">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="操作信息" align="center" prop="msg" />
-      <el-table-column label="登录日期" align="center" prop="loginTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.loginTime) }}</span>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-  </div>
+				<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import { list, delLogininfor, cleanLogininfor } from "@/api/monitor/logininfor";
+	import { list, delLogininfor, cleanLogininfor } from '@/api/monitor/logininfor'
 
-export default {
-  name: "Logininfor",
-  dicts: ['sys_common_status'],
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 表格数据
-      list: [],
-      // 日期范围
-      dateRange: [],
-      // 默认排序
-      defaultSort: {prop: 'loginTime', order: 'descending'},
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        ipaddr: undefined,
-        userName: undefined,
-        status: undefined
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询登录日志列表 */
-    getList() {
-      this.loading = true;
-      list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.list = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.dateRange = [];
-      this.resetForm("queryForm");
-      this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
-      this.handleQuery();
-    },
-    /** 多选框选中数据 */
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.infoId)
-      this.multiple = !selection.length
-    },
-    /** 排序触发事件 */
-    handleSortChange(column, prop, order) {
-      this.queryParams.orderByColumn = column.prop;
-      this.queryParams.isAsc = column.order;
-      this.getList();
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const infoIds = row.infoId || this.ids;
-      this.$modal.confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?').then(function() {
-        return delLogininfor(infoIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-    /** 清空按钮操作 */
-    handleClean() {
-      this.$modal.confirm('是否确认清空所有登录日志数据项?').then(function() {
-        return cleanLogininfor();
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("清空成功");
-      }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('monitor/logininfor/export', {
-        ...this.queryParams
-      }, `logininfor_${new Date().getTime()}.xlsx`)
-    }
-  }
-};
+	export default {
+		name: 'Logininfor',
+		dicts: ['sys_common_status'],
+		data() {
+			return {
+				// 遮罩层
+				loading: true,
+				// 选中数组
+				ids: [],
+				// 非多个禁用
+				multiple: true,
+				// 显示搜索条件
+				showSearch: true,
+				// 总条数
+				total: 0,
+				// 表格数据
+				list: [],
+				// 日期范围
+				dateRange: [],
+				// 默认排序
+				defaultSort: { prop: 'loginTime', order: 'descending' },
+				// 查询参数
+				queryParams: {
+					pageNum: 1,
+					pageSize: 10,
+					ipaddr: undefined,
+					userName: undefined,
+					status: undefined
+				}
+			}
+		},
+		created() {
+			this.getList()
+		},
+		methods: {
+			/** 查询登录日志列表 */
+			getList() {
+				this.loading = true
+				list(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+					this.list = response.rows
+					this.total = response.total
+					this.loading = false
+				})
+			},
+			/** 搜索按钮操作 */
+			handleQuery() {
+				this.queryParams.pageNum = 1
+				this.getList()
+			},
+			/** 重置按钮操作 */
+			resetQuery() {
+				this.dateRange = []
+				this.resetForm('queryForm')
+				this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
+				this.handleQuery()
+			},
+			/** 排序触发事件 */
+			handleSortChange(column, prop, order) {
+				this.queryParams.orderByColumn = column.prop
+				this.queryParams.isAsc = column.order
+				this.getList()
+			},
+			/** 删除按钮操作 */
+			handleDelete(row) {
+				const infoIds = row.infoId || this.ids
+				this.$modal
+					.confirm('是否确认删除访问编号为"' + infoIds + '"的数据项?')
+					.then(function () {
+						return delLogininfor(infoIds)
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('删除成功')
+					})
+					.catch(() => {})
+			},
+			/** 清空按钮操作 */
+			handleClean() {
+				this.$modal
+					.confirm('是否确认清空所有登录日志数据项?')
+					.then(function () {
+						return cleanLogininfor()
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('清空成功')
+					})
+					.catch(() => {})
+			},
+			/** 导出按钮操作 */
+			handleExport() {
+				this.download(
+					'monitor/logininfor/export',
+					{
+						...this.queryParams
+					},
+					`logininfor_${new Date().getTime()}.xlsx`
+				)
+			}
+		}
+	}
 </script>
-

+ 108 - 117
src/views/monitor/online/index.vue

@@ -1,124 +1,115 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
-      <el-form-item label="登录地址" prop="ipaddr">
-        <el-input
-          v-model="queryParams.ipaddr"
-          placeholder="请输入登录地址"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="用户名称" prop="userName">
-        <el-input
-          v-model="queryParams.userName"
-          placeholder="请输入用户名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
+	<div class="page-container">
+		<div class="search-container">
+			<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+				<el-form-item label="登录地址" prop="ipaddr">
+					<el-input v-model="queryParams.ipaddr" placeholder="请输入登录地址" clearable size="small" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="用户名称" prop="userName">
+					<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable size="small" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">在线用户</div>
+					</div>
+				</div>
+				<el-table v-loading="loading" :data="list.slice((pageNum - 1) * pageSize, pageNum * pageSize)" style="width: 100%" border>
+					<el-table-column label="序号" type="index" align="center">
+						<template slot-scope="scope">
+							<span>{{ (pageNum - 1) * pageSize + scope.$index + 1 }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column label="会话编号" align="center" prop="tokenId" :show-overflow-tooltip="true" />
+					<el-table-column label="登录名称" align="center" prop="userName" :show-overflow-tooltip="true" />
+					<el-table-column label="部门名称" align="center" prop="deptName" />
+					<el-table-column label="主机" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
+					<el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
+					<el-table-column label="浏览器" align="center" prop="browser" />
+					<el-table-column label="操作系统" align="center" prop="os" />
+					<el-table-column label="登录时间" align="center" prop="loginTime" width="180">
+						<template slot-scope="scope">
+							<span>{{ parseTime(scope.row.loginTime) }}</span>
+						</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-delete" @click="handleForceLogout(scope.row)" v-hasPermi="['monitor:online:forceLogout']">强退</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
 
-    </el-form>
-    <el-table
-      v-loading="loading"
-      :data="list.slice((pageNum-1)*pageSize,pageNum*pageSize)"
-      style="width: 100%;"
-    >
-      <el-table-column label="序号" type="index" align="center">
-        <template slot-scope="scope">
-          <span>{{(pageNum - 1) * pageSize + scope.$index + 1}}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="会话编号" align="center" prop="tokenId" :show-overflow-tooltip="true" />
-      <el-table-column label="登录名称" align="center" prop="userName" :show-overflow-tooltip="true" />
-      <el-table-column label="部门名称" align="center" prop="deptName" />
-      <el-table-column label="主机" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
-      <el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
-      <el-table-column label="浏览器" align="center" prop="browser" />
-      <el-table-column label="操作系统" align="center" prop="os" />
-      <el-table-column label="登录时间" align="center" prop="loginTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.loginTime) }}</span>
-        </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-delete"
-            @click="handleForceLogout(scope.row)"
-            v-hasPermi="['monitor:online:forceLogout']"
-          >强退</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination v-show="total>0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
-  </div>
+				<pagination v-show="total > 0" :total="total" :page.sync="pageNum" :limit.sync="pageSize" />
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import { list, forceLogout } from "@/api/monitor/online";
+	import { list, forceLogout } from '@/api/monitor/online'
 
-export default {
-  name: "Online",
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 总条数
-      total: 0,
-      // 表格数据
-      list: [],
-      pageNum: 1,
-      pageSize: 10,
-      // 查询参数
-      queryParams: {
-        ipaddr: undefined,
-        userName: undefined
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询登录日志列表 */
-    getList() {
-      this.loading = true;
-      list(this.queryParams).then(response => {
-        this.list = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    /** 强退按钮操作 */
-    handleForceLogout(row) {
-      this.$modal.confirm('是否确认强退名称为"' + row.userName + '"的用户?').then(function() {
-        return forceLogout(row.tokenId);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("强退成功");
-      }).catch(() => {});
-    }
-  }
-};
+	export default {
+		name: 'Online',
+		data() {
+			return {
+				// 遮罩层
+				loading: true,
+				// 总条数
+				total: 0,
+				// 表格数据
+				list: [],
+				pageNum: 1,
+				pageSize: 10,
+				// 查询参数
+				queryParams: {
+					ipaddr: undefined,
+					userName: undefined
+				}
+			}
+		},
+		created() {
+			this.getList()
+		},
+		methods: {
+			/** 查询登录日志列表 */
+			getList() {
+				this.loading = true
+				list(this.queryParams).then((response) => {
+					this.list = response.rows
+					this.total = response.total
+					this.loading = false
+				})
+			},
+			/** 搜索按钮操作 */
+			handleQuery() {
+				this.pageNum = 1
+				this.getList()
+			},
+			/** 重置按钮操作 */
+			resetQuery() {
+				this.resetForm('queryForm')
+				this.handleQuery()
+			},
+			/** 强退按钮操作 */
+			handleForceLogout(row) {
+				this.$modal
+					.confirm('是否确认强退名称为"' + row.userName + '"的用户?')
+					.then(function () {
+						return forceLogout(row.tokenId)
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('强退成功')
+					})
+					.catch(() => {})
+			}
+		}
+	}
 </script>
-

+ 236 - 302
src/views/monitor/operlog/index.vue

@@ -1,310 +1,244 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="系统模块" prop="title">
-        <el-input
-          v-model="queryParams.title"
-          placeholder="请输入系统模块"
-          clearable
-          size="small"
-          style="width: 240px;"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="操作人员" prop="operName">
-        <el-input
-          v-model="queryParams.operName"
-          placeholder="请输入操作人员"
-          clearable
-          size="small"
-          style="width: 240px;"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="类型" prop="businessType">
-        <el-select
-          v-model="queryParams.businessType"
-          placeholder="操作类型"
-          clearable
-          size="small"
-          style="width: 240px"
-        >
-          <el-option
-            v-for="dict in dict.type.sys_oper_type"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select
-          v-model="queryParams.status"
-          placeholder="操作状态"
-          clearable
-          size="small"
-          style="width: 240px"
-        >
-          <el-option
-            v-for="dict in dict.type.sys_common_status"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="操作时间">
-        <el-date-picker
-          v-model="dateRange"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-        ></el-date-picker>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
+	<div class="page-container">
+		<div class="search-container" v-show="showSearch">
+			<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+				<el-form-item label="系统模块" prop="title">
+					<el-input v-model="queryParams.title" placeholder="请输入系统模块" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="操作人员" prop="operName">
+					<el-input v-model="queryParams.operName" placeholder="请输入操作人员" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="类型" prop="businessType">
+					<el-select v-model="queryParams.businessType" placeholder="操作类型" clearable size="small" style="width: 240px">
+						<el-option v-for="dict in dict.type.sys_oper_type" :key="dict.value" :label="dict.label" :value="dict.value" />
+					</el-select>
+				</el-form-item>
+				<el-form-item label="状态" prop="status">
+					<el-select v-model="queryParams.status" placeholder="操作状态" clearable size="small" style="width: 240px">
+						<el-option v-for="dict in dict.type.sys_common_status" :key="dict.value" :label="dict.label" :value="dict.value" />
+					</el-select>
+				</el-form-item>
+				<el-form-item label="操作时间">
+					<el-date-picker
+						v-model="dateRange"
+						size="small"
+						style="width: 240px"
+						value-format="yyyy-MM-dd"
+						type="daterange"
+						range-separator="-"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期"
+					></el-date-picker>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">操作日志</div>
+					</div>
+					<div class="actions">
+						<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleClean" v-hasPermi="['monitor:operlog:remove']">清空</el-button>
+						<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['monitor:operlog:export']" style="margin-right: 10px">导出</el-button>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+					</div>
+				</div>
+				<el-table ref="tables" v-loading="loading" :data="list" border :default-sort="defaultSort" @sort-change="handleSortChange">
+					<el-table-column label="日志编号" align="center" prop="operId" />
+					<el-table-column label="系统模块" align="center" prop="title" />
+					<el-table-column label="操作类型" align="center" prop="businessType">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType" />
+						</template>
+					</el-table-column>
+					<el-table-column label="请求方式" align="center" prop="requestMethod" />
+					<el-table-column label="操作人员" align="center" prop="operName" width="100" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
+					<el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
+					<el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
+					<el-table-column label="操作状态" align="center" prop="status">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status" />
+						</template>
+					</el-table-column>
+					<el-table-column label="操作日期" align="center" prop="operTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
+						<template slot-scope="scope">
+							<span>{{ parseTime(scope.row.operTime) }}</span>
+						</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-view" @click="handleView(scope.row, scope.index)" v-hasPermi="['monitor:operlog:query']">详细</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
 
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['monitor:operlog:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          @click="handleClean"
-          v-hasPermi="['monitor:operlog:remove']"
-        >清空</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['monitor:operlog:export']"
-        >导出</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+				<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+			</div>
+		</div>
 
-    <el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="日志编号" align="center" prop="operId" />
-      <el-table-column label="系统模块" align="center" prop="title" />
-      <el-table-column label="操作类型" align="center" prop="businessType">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="请求方式" align="center" prop="requestMethod" />
-      <el-table-column label="操作人员" align="center" prop="operName" width="100" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
-      <el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
-      <el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
-      <el-table-column label="操作状态" align="center" prop="status">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="操作日期" align="center" prop="operTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.operTime) }}</span>
-        </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-view"
-            @click="handleView(scope.row,scope.index)"
-            v-hasPermi="['monitor:operlog:query']"
-          >详细</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 操作日志详细 -->
-    <el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body>
-      <el-form ref="form" :model="form" label-width="100px" size="mini">
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
-            <el-form-item
-              label="登录信息:"
-            >{{ form.operName }} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="请求地址:">{{ form.operUrl }}</el-form-item>
-            <el-form-item label="请求方式:">{{ form.requestMethod }}</el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="操作方法:">{{ form.method }}</el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="请求参数:">{{ form.operParam }}</el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="返回参数:">{{ form.jsonResult }}</el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="操作状态:">
-              <div v-if="form.status === 0">正常</div>
-              <div v-else-if="form.status === 1">失败</div>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="操作时间:">{{ parseTime(form.operTime) }}</el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="异常信息:" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="open = false">关 闭</el-button>
-      </div>
-    </el-dialog>
-  </div>
+		<!-- 操作日志详细 -->
+		<el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body>
+			<el-form ref="form" :model="form" label-width="100px" size="mini">
+				<el-row>
+					<el-col :span="12">
+						<el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
+						<el-form-item label="登录信息:">{{ form.operName }} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="请求地址:">{{ form.operUrl }}</el-form-item>
+						<el-form-item label="请求方式:">{{ form.requestMethod }}</el-form-item>
+					</el-col>
+					<el-col :span="24">
+						<el-form-item label="操作方法:">{{ form.method }}</el-form-item>
+					</el-col>
+					<el-col :span="24">
+						<el-form-item label="请求参数:">{{ form.operParam }}</el-form-item>
+					</el-col>
+					<el-col :span="24">
+						<el-form-item label="返回参数:">{{ form.jsonResult }}</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="操作状态:">
+							<div v-if="form.status === 0">正常</div>
+							<div v-else-if="form.status === 1">失败</div>
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="操作时间:">{{ parseTime(form.operTime) }}</el-form-item>
+					</el-col>
+					<el-col :span="24">
+						<el-form-item label="异常信息:" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button @click="open = false">关 闭</el-button>
+			</div>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog";
+	import { list, delOperlog, cleanOperlog } from '@/api/monitor/operlog'
 
-export default {
-  name: "Operlog",
-  dicts: ['sys_oper_type', 'sys_common_status'],
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 表格数据
-      list: [],
-      // 是否显示弹出层
-      open: false,
-      // 日期范围
-      dateRange: [],
-      // 默认排序
-      defaultSort: {prop: 'operTime', order: 'descending'},
-      // 表单参数
-      form: {},
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        title: undefined,
-        operName: undefined,
-        businessType: undefined,
-        status: undefined
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询登录日志 */
-    getList() {
-      this.loading = true;
-      list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
-          this.list = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
-    },
-    // 操作日志类型字典翻译
-    typeFormat(row, column) {
-      return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType);
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.dateRange = [];
-      this.resetForm("queryForm");
-      this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
-      this.handleQuery();
-    },
-    /** 多选框选中数据 */
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.operId)
-      this.multiple = !selection.length
-    },
-    /** 排序触发事件 */
-    handleSortChange(column, prop, order) {
-      this.queryParams.orderByColumn = column.prop;
-      this.queryParams.isAsc = column.order;
-      this.getList();
-    },
-    /** 详细按钮操作 */
-    handleView(row) {
-      this.open = true;
-      this.form = row;
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const operIds = row.operId || this.ids;
-      this.$modal.confirm('是否确认删除日志编号为"' + operIds + '"的数据项?').then(function() {
-        return delOperlog(operIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-    /** 清空按钮操作 */
-    handleClean() {
-      this.$modal.confirm('是否确认清空所有操作日志数据项?').then(function() {
-        return cleanOperlog();
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("清空成功");
-      }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('monitor/operlog/export', {
-        ...this.queryParams
-      }, `operlog_${new Date().getTime()}.xlsx`)
-    }
-  }
-};
+	export default {
+		name: 'Operlog',
+		dicts: ['sys_oper_type', 'sys_common_status'],
+		data() {
+			return {
+				// 遮罩层
+				loading: true,
+				// 选中数组
+				ids: [],
+				// 非多个禁用
+				multiple: true,
+				// 显示搜索条件
+				showSearch: true,
+				// 总条数
+				total: 0,
+				// 表格数据
+				list: [],
+				// 是否显示弹出层
+				open: false,
+				// 日期范围
+				dateRange: [],
+				// 默认排序
+				defaultSort: { prop: 'operTime', order: 'descending' },
+				// 表单参数
+				form: {},
+				// 查询参数
+				queryParams: {
+					pageNum: 1,
+					pageSize: 10,
+					title: undefined,
+					operName: undefined,
+					businessType: undefined,
+					status: undefined
+				}
+			}
+		},
+		created() {
+			this.getList()
+		},
+		methods: {
+			/** 查询登录日志 */
+			getList() {
+				this.loading = true
+				list(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+					this.list = response.rows
+					this.total = response.total
+					this.loading = false
+				})
+			},
+			// 操作日志类型字典翻译
+			typeFormat(row, column) {
+				return this.selectDictLabel(this.dict.type.sys_oper_type, row.businessType)
+			},
+			/** 搜索按钮操作 */
+			handleQuery() {
+				this.queryParams.pageNum = 1
+				this.getList()
+			},
+			/** 重置按钮操作 */
+			resetQuery() {
+				this.dateRange = []
+				this.resetForm('queryForm')
+				this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
+				this.handleQuery()
+			},
+			/** 排序触发事件 */
+			handleSortChange(column, prop, order) {
+				this.queryParams.orderByColumn = column.prop
+				this.queryParams.isAsc = column.order
+				this.getList()
+			},
+			/** 详细按钮操作 */
+			handleView(row) {
+				this.open = true
+				this.form = row
+			},
+			/** 删除按钮操作 */
+			handleDelete(row) {
+				const operIds = row.operId || this.ids
+				this.$modal
+					.confirm('是否确认删除日志编号为"' + operIds + '"的数据项?')
+					.then(function () {
+						return delOperlog(operIds)
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('删除成功')
+					})
+					.catch(() => {})
+			},
+			/** 清空按钮操作 */
+			handleClean() {
+				this.$modal
+					.confirm('是否确认清空所有操作日志数据项?')
+					.then(function () {
+						return cleanOperlog()
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('清空成功')
+					})
+					.catch(() => {})
+			},
+			/** 导出按钮操作 */
+			handleExport() {
+				this.download(
+					'monitor/operlog/export',
+					{
+						...this.queryParams
+					},
+					`operlog_${new Date().getTime()}.xlsx`
+				)
+			}
+		}
+	}
 </script>
-

+ 256 - 194
src/views/monitor/server/index.vue

@@ -1,203 +1,265 @@
 <template>
-  <div class="app-container">
-    <el-row>
-      <el-col :span="12" class="card-box">
-        <el-card>
-          <div slot="header"><span>CPU</span></div>
-          <div class="el-table el-table--enable-row-hover el-table--medium">
-            <table cellspacing="0" style="width: 100%;">
-              <thead>
-                <tr>
-                  <th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">值</div></th>
-                </tr>
-              </thead>
-              <tbody>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">核心数</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.cpuNum }}</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">用户使用率</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.used }}%</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">系统使用率</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.sys }}%</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">当前空闲率</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.cpu">{{ server.cpu.free }}%</div></td>
-                </tr>
-              </tbody>
-            </table>
-          </div>
-        </el-card>
-      </el-col>
+	<div class="page-container">
+		<div class="content-container">
+			<div class="main">
+				<el-row>
+					<el-col :span="12" class="card-box">
+						<el-card>
+							<div slot="header"><span>CPU</span></div>
+							<div class="el-table el-table--enable-row-hover el-table--medium">
+								<table cellspacing="0" style="width: 100%">
+									<thead>
+										<tr>
+											<th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
+											<th class="el-table__cell is-leaf"><div class="cell">值</div></th>
+										</tr>
+									</thead>
+									<tbody>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">核心数</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.cpu">{{ server.cpu.cpuNum }}</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">用户使用率</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.cpu">{{ server.cpu.used }}%</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">系统使用率</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.cpu">{{ server.cpu.sys }}%</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">当前空闲率</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.cpu">{{ server.cpu.free }}%</div></td
+											>
+										</tr>
+									</tbody>
+								</table>
+							</div>
+						</el-card>
+					</el-col>
 
-      <el-col :span="12" class="card-box">
-        <el-card>
-          <div slot="header"><span>内存</span></div>
-          <div class="el-table el-table--enable-row-hover el-table--medium">
-            <table cellspacing="0" style="width: 100%;">
-              <thead>
-                <tr>
-                  <th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">内存</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">JVM</div></th>
-                </tr>
-              </thead>
-              <tbody>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">总内存</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem">{{ server.mem.total }}G</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.total }}M</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">已用内存</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem">{{ server.mem.used}}G</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.used}}M</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">剩余内存</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem">{{ server.mem.free }}G</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.free }}M</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">使用率</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.mem" :class="{'text-danger': server.mem.usage > 80}">{{ server.mem.usage }}%</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm" :class="{'text-danger': server.jvm.usage > 80}">{{ server.jvm.usage }}%</div></td>
-                </tr>
-              </tbody>
-            </table>
-          </div>
-        </el-card>
-      </el-col>
+					<el-col :span="12" class="card-box">
+						<el-card>
+							<div slot="header"><span>内存</span></div>
+							<div class="el-table el-table--enable-row-hover el-table--medium">
+								<table cellspacing="0" style="width: 100%">
+									<thead>
+										<tr>
+											<th class="el-table__cell is-leaf"><div class="cell">属性</div></th>
+											<th class="el-table__cell is-leaf"><div class="cell">内存</div></th>
+											<th class="el-table__cell is-leaf"><div class="cell">JVM</div></th>
+										</tr>
+									</thead>
+									<tbody>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">总内存</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.mem">{{ server.mem.total }}G</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.jvm">{{ server.jvm.total }}M</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">已用内存</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.mem">{{ server.mem.used }}G</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.jvm">{{ server.jvm.used }}M</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">剩余内存</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.mem">{{ server.mem.free }}G</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.jvm">{{ server.jvm.free }}M</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">使用率</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.mem" :class="{ 'text-danger': server.mem.usage > 80 }">{{ server.mem.usage }}%</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.jvm" :class="{ 'text-danger': server.jvm.usage > 80 }">{{ server.jvm.usage }}%</div></td
+											>
+										</tr>
+									</tbody>
+								</table>
+							</div>
+						</el-card>
+					</el-col>
 
-      <el-col :span="24" class="card-box">
-        <el-card>
-          <div slot="header">
-            <span>服务器信息</span>
-          </div>
-          <div class="el-table el-table--enable-row-hover el-table--medium">
-            <table cellspacing="0" style="width: 100%;">
-              <tbody>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">服务器名称</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.computerName }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">操作系统</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.osName }}</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">服务器IP</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.computerIp }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">系统架构</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.osArch }}</div></td>
-                </tr>
-              </tbody>
-            </table>
-          </div>
-        </el-card>
-      </el-col>
+					<el-col :span="24" class="card-box">
+						<el-card>
+							<div slot="header">
+								<span>服务器信息</span>
+							</div>
+							<div class="el-table el-table--enable-row-hover el-table--medium">
+								<table cellspacing="0" style="width: 100%">
+									<tbody>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">服务器名称</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.sys">{{ server.sys.computerName }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">操作系统</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.sys">{{ server.sys.osName }}</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">服务器IP</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.sys">{{ server.sys.computerIp }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">系统架构</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.sys">{{ server.sys.osArch }}</div></td
+											>
+										</tr>
+									</tbody>
+								</table>
+							</div>
+						</el-card>
+					</el-col>
 
-      <el-col :span="24" class="card-box">
-        <el-card>
-          <div slot="header">
-            <span>Java虚拟机信息</span>
-          </div>
-          <div class="el-table el-table--enable-row-hover el-table--medium">
-            <table cellspacing="0" style="width: 100%;">
-              <tbody>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">Java名称</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.name }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">Java版本</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.version }}</div></td>
-                </tr>
-                <tr>
-                  <td class="el-table__cell is-leaf"><div class="cell">启动时间</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.startTime }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">运行时长</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.runTime }}</div></td>
-                </tr>
-                <tr>
-                  <td colspan="1" class="el-table__cell is-leaf"><div class="cell">安装路径</div></td>
-                  <td colspan="3" class="el-table__cell is-leaf"><div class="cell" v-if="server.jvm">{{ server.jvm.home }}</div></td>
-                </tr>
-                <tr>
-                  <td colspan="1" class="el-table__cell is-leaf"><div class="cell">项目路径</div></td>
-                  <td colspan="3" class="el-table__cell is-leaf"><div class="cell" v-if="server.sys">{{ server.sys.userDir }}</div></td>
-                </tr>
-              </tbody>
-            </table>
-          </div>
-        </el-card>
-      </el-col>
+					<el-col :span="24" class="card-box">
+						<el-card>
+							<div slot="header">
+								<span>Java虚拟机信息</span>
+							</div>
+							<div class="el-table el-table--enable-row-hover el-table--medium">
+								<table cellspacing="0" style="width: 100%">
+									<tbody>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">Java名称</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.jvm">{{ server.jvm.name }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">Java版本</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.jvm">{{ server.jvm.version }}</div></td
+											>
+										</tr>
+										<tr>
+											<td class="el-table__cell is-leaf"><div class="cell">启动时间</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.jvm">{{ server.jvm.startTime }}</div></td
+											>
+											<td class="el-table__cell is-leaf"><div class="cell">运行时长</div></td>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.jvm">{{ server.jvm.runTime }}</div></td
+											>
+										</tr>
+										<tr>
+											<td colspan="1" class="el-table__cell is-leaf"><div class="cell">安装路径</div></td>
+											<td colspan="3" class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.jvm">{{ server.jvm.home }}</div></td
+											>
+										</tr>
+										<tr>
+											<td colspan="1" class="el-table__cell is-leaf"><div class="cell">项目路径</div></td>
+											<td colspan="3" class="el-table__cell is-leaf"
+												><div class="cell" v-if="server.sys">{{ server.sys.userDir }}</div></td
+											>
+										</tr>
+									</tbody>
+								</table>
+							</div>
+						</el-card>
+					</el-col>
 
-      <el-col :span="24" class="card-box">
-        <el-card>
-          <div slot="header">
-            <span>磁盘状态</span>
-          </div>
-          <div class="el-table el-table--enable-row-hover el-table--medium">
-            <table cellspacing="0" style="width: 100%;">
-              <thead>
-                <tr>
-                  <th class="el-table__cell el-table__cell is-leaf"><div class="cell">盘符路径</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">文件系统</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">盘符类型</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">总大小</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">可用大小</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">已用大小</div></th>
-                  <th class="el-table__cell is-leaf"><div class="cell">已用百分比</div></th>
-                </tr>
-              </thead>
-              <tbody v-if="server.sysFiles">
-                <tr v-for="(sysFile, index) in server.sysFiles" :key="index">
-                  <td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.dirName }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.sysTypeName }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.typeName }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.total }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.free }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell">{{ sysFile.used }}</div></td>
-                  <td class="el-table__cell is-leaf"><div class="cell" :class="{'text-danger': sysFile.usage > 80}">{{ sysFile.usage }}%</div></td>
-                </tr>
-              </tbody>
-            </table>
-          </div>
-        </el-card>
-      </el-col>
-    </el-row>
-  </div>
+					<el-col :span="24" class="card-box">
+						<el-card>
+							<div slot="header">
+								<span>磁盘状态</span>
+							</div>
+							<div class="el-table el-table--enable-row-hover el-table--medium">
+								<table cellspacing="0" style="width: 100%">
+									<thead>
+										<tr>
+											<th class="el-table__cell el-table__cell is-leaf"><div class="cell">盘符路径</div></th>
+											<th class="el-table__cell is-leaf"><div class="cell">文件系统</div></th>
+											<th class="el-table__cell is-leaf"><div class="cell">盘符类型</div></th>
+											<th class="el-table__cell is-leaf"><div class="cell">总大小</div></th>
+											<th class="el-table__cell is-leaf"><div class="cell">可用大小</div></th>
+											<th class="el-table__cell is-leaf"><div class="cell">已用大小</div></th>
+											<th class="el-table__cell is-leaf"><div class="cell">已用百分比</div></th>
+										</tr>
+									</thead>
+									<tbody v-if="server.sysFiles">
+										<tr v-for="(sysFile, index) in server.sysFiles" :key="index">
+											<td class="el-table__cell is-leaf"
+												><div class="cell">{{ sysFile.dirName }}</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell">{{ sysFile.sysTypeName }}</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell">{{ sysFile.typeName }}</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell">{{ sysFile.total }}</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell">{{ sysFile.free }}</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell">{{ sysFile.used }}</div></td
+											>
+											<td class="el-table__cell is-leaf"
+												><div class="cell" :class="{ 'text-danger': sysFile.usage > 80 }">{{ sysFile.usage }}%</div></td
+											>
+										</tr>
+									</tbody>
+								</table>
+							</div>
+						</el-card>
+					</el-col>
+				</el-row>
+			</div>
+		</div>
+	</div>
 </template>
 
 <script>
-import { getServer } from "@/api/monitor/server";
+	import { getServer } from '@/api/monitor/server'
 
-export default {
-  name: "Server",
-  data() {
-    return {
-      // 服务器信息
-      server: []
-    };
-  },
-  created() {
-    this.getList();
-    this.openLoading();
-  },
-  methods: {
-    /** 查询服务器信息 */
-    getList() {
-      getServer().then(response => {
-        this.server = response.data;
-        this.$modal.closeLoading();
-      });
-    },
-    // 打开加载层
-    openLoading() {
-      this.$modal.loading("正在加载服务监控数据,请稍候!");
-    }
-  }
-};
-</script>
+	export default {
+		name: 'Server',
+		data() {
+			return {
+				// 服务器信息
+				server: []
+			}
+		},
+		created() {
+			this.getList()
+			this.openLoading()
+		},
+		methods: {
+			/** 查询服务器信息 */
+			getList() {
+				getServer().then((response) => {
+					this.server = response.data
+					this.$modal.closeLoading()
+				})
+			},
+			// 打开加载层
+			openLoading() {
+				this.$modal.loading('正在加载服务监控数据,请稍候!')
+			}
+		}
+	}
+</script>

+ 253 - 338
src/views/system/config/index.vue

@@ -1,346 +1,261 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="参数名称" prop="configName">
-        <el-input
-          v-model="queryParams.configName"
-          placeholder="请输入参数名称"
-          clearable
-          size="small"
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="参数键名" prop="configKey">
-        <el-input
-          v-model="queryParams.configKey"
-          placeholder="请输入参数键名"
-          clearable
-          size="small"
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="系统内置" prop="configType">
-        <el-select v-model="queryParams.configType" placeholder="系统内置" clearable size="small">
-          <el-option
-            v-for="dict in dict.type.sys_yes_no"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="创建时间">
-        <el-date-picker
-          v-model="dateRange"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-        ></el-date-picker>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
+	<div class="page-container">
+		<div class="search-container" v-show="showSearch">
+			<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+				<el-form-item label="参数名称" prop="configName">
+					<el-input v-model="queryParams.configName" placeholder="请输入参数名称" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="参数键名" prop="configKey">
+					<el-input v-model="queryParams.configKey" placeholder="请输入参数键名" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="系统内置" prop="configType">
+					<el-select v-model="queryParams.configType" placeholder="系统内置" clearable size="small">
+						<el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label" :value="dict.value" />
+					</el-select>
+				</el-form-item>
+				<el-form-item label="创建时间">
+					<el-date-picker
+						v-model="dateRange"
+						size="small"
+						style="width: 240px"
+						value-format="yyyy-MM-dd"
+						type="daterange"
+						range-separator="-"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期"
+					></el-date-picker>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">参数设置</div>
+					</div>
+					<div class="actions">
+						<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:config:add']">添加</el-button>
+						<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:config:export']">导出</el-button>
+						<el-button type="danger" plain icon="el-icon-refresh" size="mini" @click="handleRefreshCache" v-hasPermi="['system:config:remove']" style="margin-right: 10px"
+							>刷新缓存</el-button
+						>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+					</div>
+				</div>
+				<el-table v-loading="loading" :data="configList" border>
+					<el-table-column label="参数主键" align="center" prop="configId" />
+					<el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
+					<el-table-column label="参数键名" align="center" prop="configKey" :show-overflow-tooltip="true" />
+					<el-table-column label="参数键值" align="center" prop="configValue" />
+					<el-table-column label="系统内置" align="center" prop="configType">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_yes_no" :value="scope.row.configType" />
+						</template>
+					</el-table-column>
+					<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
+					<el-table-column label="创建时间" align="center" prop="createTime" width="180">
+						<template slot-scope="scope">
+							<span>{{ parseTime(scope.row.createTime) }}</span>
+						</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:config:edit']">修改</el-button>
+							<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:config:remove']">删除</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
 
-    <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:config:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:config:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['system:config:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['system:config:export']"
-        >导出</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-refresh"
-          size="mini"
-          @click="handleRefreshCache"
-          v-hasPermi="['system:config:remove']"
-        >刷新缓存</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+				<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+			</div>
+		</div>
 
-    <el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="参数主键" align="center" prop="configId" />
-      <el-table-column label="参数名称" align="center" prop="configName" :show-overflow-tooltip="true" />
-      <el-table-column label="参数键名" align="center" prop="configKey" :show-overflow-tooltip="true" />
-      <el-table-column label="参数键值" align="center" prop="configValue" />
-      <el-table-column label="系统内置" align="center" prop="configType">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.configType"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
-        </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:config:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['system:config:remove']"
-          >删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改参数配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="参数名称" prop="configName">
-          <el-input v-model="form.configName" placeholder="请输入参数名称" />
-        </el-form-item>
-        <el-form-item label="参数键名" prop="configKey">
-          <el-input v-model="form.configKey" placeholder="请输入参数键名" />
-        </el-form-item>
-        <el-form-item label="参数键值" prop="configValue">
-          <el-input v-model="form.configValue" placeholder="请输入参数键值" />
-        </el-form-item>
-        <el-form-item label="系统内置" prop="configType">
-          <el-radio-group v-model="form.configType">
-            <el-radio
-              v-for="dict in dict.type.sys_yes_no"
-              :key="dict.value"
-              :label="dict.value"
-            >{{dict.label}}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
-        </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>
-      </div>
-    </el-dialog>
-  </div>
+		<!-- 添加或修改参数配置对话框 -->
+		<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+			<el-form ref="form" :model="form" :rules="rules" label-width="80px">
+				<el-form-item label="参数名称" prop="configName">
+					<el-input v-model="form.configName" placeholder="请输入参数名称" />
+				</el-form-item>
+				<el-form-item label="参数键名" prop="configKey">
+					<el-input v-model="form.configKey" placeholder="请输入参数键名" />
+				</el-form-item>
+				<el-form-item label="参数键值" prop="configValue">
+					<el-input v-model="form.configValue" placeholder="请输入参数键值" />
+				</el-form-item>
+				<el-form-item label="系统内置" prop="configType">
+					<el-radio-group v-model="form.configType">
+						<el-radio v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
+					</el-radio-group>
+				</el-form-item>
+				<el-form-item label="备注" prop="remark">
+					<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button size="medium" @click="cancel">取 消</el-button>
+				<el-button size="medium" type="primary" @click="submitForm">保 存</el-button>
+			</div>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config";
+	import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from '@/api/system/config'
 
-export default {
-  name: "Config",
-  dicts: ['sys_yes_no'],
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 参数表格数据
-      configList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 日期范围
-      dateRange: [],
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        configName: undefined,
-        configKey: undefined,
-        configType: undefined
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        configName: [
-          { required: true, message: "参数名称不能为空", trigger: "blur" }
-        ],
-        configKey: [
-          { required: true, message: "参数键名不能为空", trigger: "blur" }
-        ],
-        configValue: [
-          { required: true, message: "参数键值不能为空", trigger: "blur" }
-        ]
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询参数列表 */
-    getList() {
-      this.loading = true;
-      listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.configList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        configId: undefined,
-        configName: undefined,
-        configKey: undefined,
-        configValue: undefined,
-        configType: "Y",
-        remark: undefined
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.dateRange = [];
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加参数";
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.configId)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const configId = row.configId || this.ids
-      getConfig(configId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改参数";
-      });
-    },
-    /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.configId != undefined) {
-            updateConfig(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addConfig(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const configIds = row.configId || this.ids;
-      this.$modal.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?').then(function() {
-          return delConfig(configIds);
-        }).then(() => {
-          this.getList();
-          this.$modal.msgSuccess("删除成功");
-        }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('system/config/export', {
-        ...this.queryParams
-      }, `config_${new Date().getTime()}.xlsx`)
-    },
-    /** 刷新缓存按钮操作 */
-    handleRefreshCache() {
-      refreshCache().then(() => {
-        this.$modal.msgSuccess("刷新成功");
-      });
-    }
-  }
-};
+	export default {
+		name: 'Config',
+		dicts: ['sys_yes_no'],
+		data() {
+			return {
+				// 遮罩层
+				loading: true,
+				// 选中数组
+				ids: [],
+				// 非单个禁用
+				single: true,
+				// 非多个禁用
+				multiple: true,
+				// 显示搜索条件
+				showSearch: true,
+				// 总条数
+				total: 0,
+				// 参数表格数据
+				configList: [],
+				// 弹出层标题
+				title: '',
+				// 是否显示弹出层
+				open: false,
+				// 日期范围
+				dateRange: [],
+				// 查询参数
+				queryParams: {
+					pageNum: 1,
+					pageSize: 10,
+					configName: undefined,
+					configKey: undefined,
+					configType: undefined
+				},
+				// 表单参数
+				form: {},
+				// 表单校验
+				rules: {
+					configName: [{ required: true, message: '参数名称不能为空', trigger: 'blur' }],
+					configKey: [{ required: true, message: '参数键名不能为空', trigger: 'blur' }],
+					configValue: [{ required: true, message: '参数键值不能为空', trigger: 'blur' }]
+				}
+			}
+		},
+		created() {
+			this.getList()
+		},
+		methods: {
+			/** 查询参数列表 */
+			getList() {
+				this.loading = true
+				listConfig(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+					this.configList = response.rows
+					this.total = response.total
+					this.loading = false
+				})
+			},
+			// 取消按钮
+			cancel() {
+				this.open = false
+				this.reset()
+			},
+			// 表单重置
+			reset() {
+				this.form = {
+					configId: undefined,
+					configName: undefined,
+					configKey: undefined,
+					configValue: undefined,
+					configType: 'Y',
+					remark: undefined
+				}
+				this.resetForm('form')
+			},
+			/** 搜索按钮操作 */
+			handleQuery() {
+				this.queryParams.pageNum = 1
+				this.getList()
+			},
+			/** 重置按钮操作 */
+			resetQuery() {
+				this.dateRange = []
+				this.resetForm('queryForm')
+				this.handleQuery()
+			},
+			/** 新增按钮操作 */
+			handleAdd() {
+				this.reset()
+				this.open = true
+				this.title = '添加参数'
+			},
+			/** 修改按钮操作 */
+			handleUpdate(row) {
+				this.reset()
+				const configId = row.configId || this.ids
+				getConfig(configId).then((response) => {
+					this.form = response.data
+					this.open = true
+					this.title = '修改参数'
+				})
+			},
+			/** 提交按钮 */
+			submitForm: function () {
+				this.$refs['form'].validate((valid) => {
+					if (valid) {
+						if (this.form.configId != undefined) {
+							updateConfig(this.form).then((response) => {
+								this.$modal.msgSuccess('修改成功')
+								this.open = false
+								this.getList()
+							})
+						} else {
+							addConfig(this.form).then((response) => {
+								this.$modal.msgSuccess('新增成功')
+								this.open = false
+								this.getList()
+							})
+						}
+					}
+				})
+			},
+			/** 删除按钮操作 */
+			handleDelete(row) {
+				const configIds = row.configId || this.ids
+				this.$modal
+					.confirm('是否确认删除参数编号为"' + configIds + '"的数据项?')
+					.then(function () {
+						return delConfig(configIds)
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('删除成功')
+					})
+					.catch(() => {})
+			},
+			/** 导出按钮操作 */
+			handleExport() {
+				this.download(
+					'system/config/export',
+					{
+						...this.queryParams
+					},
+					`config_${new Date().getTime()}.xlsx`
+				)
+			},
+			/** 刷新缓存按钮操作 */
+			handleRefreshCache() {
+				refreshCache().then(() => {
+					this.$modal.msgSuccess('刷新成功')
+				})
+			}
+		}
+	}
 </script>

+ 283 - 324
src/views/system/dept/index.vue

@@ -1,331 +1,290 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
-      <el-form-item label="部门名称" prop="deptName">
-        <el-input
-          v-model="queryParams.deptName"
-          placeholder="请输入部门名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="部门状态" clearable size="small">
-          <el-option
-            v-for="dict in dict.type.sys_normal_disable"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
+	<div class="page-container">
+		<div class="search-container" v-show="showSearch">
+			<el-form :model="queryParams" ref="queryForm" :inline="true">
+				<el-form-item label="部门名称" prop="deptName">
+					<el-input v-model="queryParams.deptName" placeholder="请输入部门名称" clearable size="small" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="状态" prop="status">
+					<el-select v-model="queryParams.status" placeholder="部门状态" clearable size="small">
+						<el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
+					</el-select>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">部门管理</div>
+					</div>
+					<div class="actions">
+						<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:dept:add']">添加</el-button>
+						<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll" style="margin-right: 10px">展开/折叠</el-button>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+					</div>
+				</div>
+				<el-table
+					v-if="refreshTable"
+					v-loading="loading"
+					border
+					:data="deptList"
+					row-key="deptId"
+					:default-expand-all="isExpandAll"
+					:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+				>
+					<el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
+					<el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
+					<el-table-column prop="status" label="状态" width="100">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
+						</template>
+					</el-table-column>
+					<el-table-column label="创建时间" align="center" prop="createTime" width="200">
+						<template slot-scope="scope">
+							<span>{{ parseTime(scope.row.createTime) }}</span>
+						</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>
+		</div>
 
-    <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
-      v-if="refreshTable"
-      v-loading="loading"
-      :data="deptList"
-      row-key="deptId"
-      :default-expand-all="isExpandAll"
-      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
-    >
-      <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
-      <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
-      <el-table-column prop="status" label="状态" width="100">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="创建时间" align="center" prop="createTime" width="200">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
-        </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>
-
-    <!-- 添加或修改部门对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-row>
-          <el-col :span="24" v-if="form.parentId !== 0">
-            <el-form-item label="上级部门" prop="parentId">
-              <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="部门名称" prop="deptName">
-              <el-input v-model="form.deptName" placeholder="请输入部门名称" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="显示排序" prop="orderNum">
-              <el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="负责人" prop="leader">
-              <el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="联系电话" prop="phone">
-              <el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="邮箱" prop="email">
-              <el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="部门状态">
-              <el-radio-group v-model="form.status">
-                <el-radio
-                  v-for="dict in dict.type.sys_normal_disable"
-                  :key="dict.value"
-                  :label="dict.value"
-                >{{dict.label}}</el-radio>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-  </div>
+		<!-- 添加或修改部门对话框 -->
+		<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+			<el-form ref="form" :model="form" :rules="rules" label-width="80px">
+				<el-row>
+					<el-col :span="24" v-if="form.parentId !== 0">
+						<el-form-item label="上级部门" prop="parentId">
+							<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="部门名称" prop="deptName">
+							<el-input v-model="form.deptName" placeholder="请输入部门名称" />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="显示排序" prop="orderNum">
+							<el-input-number v-model="form.orderNum" controls-position="right" :min="0" />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="负责人" prop="leader">
+							<el-input v-model="form.leader" placeholder="请输入负责人" maxlength="20" />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="联系电话" prop="phone">
+							<el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="邮箱" prop="email">
+							<el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="部门状态">
+							<el-radio-group v-model="form.status">
+								<el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
+							</el-radio-group>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button size="medium" @click="cancel">取 消</el-button>
+				<el-button size="medium" type="primary" @click="submitForm">保 存</el-button>
+			</div>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+	import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from '@/api/system/dept'
+	import Treeselect from '@riophae/vue-treeselect'
+	import '@riophae/vue-treeselect/dist/vue-treeselect.css'
 
-export default {
-  name: "Dept",
-  dicts: ['sys_normal_disable'],
-  components: { Treeselect },
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 表格树数据
-      deptList: [],
-      // 部门树选项
-      deptOptions: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 是否展开,默认全部展开
-      isExpandAll: true,
-      // 重新渲染表格状态
-      refreshTable: true,
-      // 查询参数
-      queryParams: {
-        deptName: undefined,
-        status: undefined
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        parentId: [
-          { required: true, message: "上级部门不能为空", trigger: "blur" }
-        ],
-        deptName: [
-          { required: true, message: "部门名称不能为空", trigger: "blur" }
-        ],
-        orderNum: [
-          { required: true, message: "显示排序不能为空", trigger: "blur" }
-        ],
-        email: [
-          {
-            type: "email",
-            message: "'请输入正确的邮箱地址",
-            trigger: ["blur", "change"]
-          }
-        ],
-        phone: [
-          {
-            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
-            message: "请输入正确的手机号码",
-            trigger: "blur"
-          }
-        ]
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询部门列表 */
-    getList() {
-      this.loading = true;
-      listDept(this.queryParams).then(response => {
-        this.deptList = this.handleTree(response.data, "deptId");
-        this.loading = false;
-      });
-    },
-    /** 转换部门数据结构 */
-    normalizer(node) {
-      if (node.children && !node.children.length) {
-        delete node.children;
-      }
-      return {
-        id: node.deptId,
-        label: node.deptName,
-        children: node.children
-      };
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        deptId: undefined,
-        parentId: undefined,
-        deptName: undefined,
-        orderNum: undefined,
-        leader: undefined,
-        phone: undefined,
-        email: undefined,
-        status: "0"
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    /** 新增按钮操作 */
-    handleAdd(row) {
-      this.reset();
-      if (row != undefined) {
-        this.form.parentId = row.deptId;
-      }
-      this.open = true;
-      this.title = "添加部门";
-      listDept().then(response => {
-        this.deptOptions = this.handleTree(response.data, "deptId");
-      });
-    },
-    /** 展开/折叠操作 */
-    toggleExpandAll() {
-      this.refreshTable = false;
-      this.isExpandAll = !this.isExpandAll;
-      this.$nextTick(() => {
-        this.refreshTable = true;
-      });
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      getDept(row.deptId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改部门";
-      });
-      listDeptExcludeChild(row.deptId).then(response => {
-        this.deptOptions = this.handleTree(response.data, "deptId");
-      });
-    },
-    /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.deptId != undefined) {
-            updateDept(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addDept(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      this.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?').then(function() {
-        return delDept(row.deptId);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    }
-  }
-};
+	export default {
+		name: 'Dept',
+		dicts: ['sys_normal_disable'],
+		components: { Treeselect },
+		data() {
+			return {
+				// 遮罩层
+				loading: true,
+				// 显示搜索条件
+				showSearch: true,
+				// 表格树数据
+				deptList: [],
+				// 部门树选项
+				deptOptions: [],
+				// 弹出层标题
+				title: '',
+				// 是否显示弹出层
+				open: false,
+				// 是否展开,默认全部展开
+				isExpandAll: true,
+				// 重新渲染表格状态
+				refreshTable: true,
+				// 查询参数
+				queryParams: {
+					deptName: undefined,
+					status: undefined
+				},
+				// 表单参数
+				form: {},
+				// 表单校验
+				rules: {
+					parentId: [{ required: true, message: '上级部门不能为空', trigger: 'blur' }],
+					deptName: [{ required: true, message: '部门名称不能为空', trigger: 'blur' }],
+					orderNum: [{ required: true, message: '显示排序不能为空', trigger: 'blur' }],
+					email: [
+						{
+							type: 'email',
+							message: "'请输入正确的邮箱地址",
+							trigger: ['blur', 'change']
+						}
+					],
+					phone: [
+						{
+							pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
+							message: '请输入正确的手机号码',
+							trigger: 'blur'
+						}
+					]
+				}
+			}
+		},
+		created() {
+			this.getList()
+		},
+		methods: {
+			/** 查询部门列表 */
+			getList() {
+				this.loading = true
+				listDept(this.queryParams).then((response) => {
+					this.deptList = this.handleTree(response.data, 'deptId')
+					this.loading = false
+				})
+			},
+			/** 转换部门数据结构 */
+			normalizer(node) {
+				if (node.children && !node.children.length) {
+					delete node.children
+				}
+				return {
+					id: node.deptId,
+					label: node.deptName,
+					children: node.children
+				}
+			},
+			// 取消按钮
+			cancel() {
+				this.open = false
+				this.reset()
+			},
+			// 表单重置
+			reset() {
+				this.form = {
+					deptId: undefined,
+					parentId: undefined,
+					deptName: undefined,
+					orderNum: undefined,
+					leader: undefined,
+					phone: undefined,
+					email: undefined,
+					status: '0'
+				}
+				this.resetForm('form')
+			},
+			/** 搜索按钮操作 */
+			handleQuery() {
+				this.getList()
+			},
+			/** 重置按钮操作 */
+			resetQuery() {
+				this.resetForm('queryForm')
+				this.handleQuery()
+			},
+			/** 新增按钮操作 */
+			handleAdd(row) {
+				this.reset()
+				if (row != undefined) {
+					this.form.parentId = row.deptId
+				}
+				this.open = true
+				this.title = '添加部门'
+				listDept().then((response) => {
+					this.deptOptions = this.handleTree(response.data, 'deptId')
+				})
+			},
+			/** 展开/折叠操作 */
+			toggleExpandAll() {
+				this.refreshTable = false
+				this.isExpandAll = !this.isExpandAll
+				this.$nextTick(() => {
+					this.refreshTable = true
+				})
+			},
+			/** 修改按钮操作 */
+			handleUpdate(row) {
+				this.reset()
+				getDept(row.deptId).then((response) => {
+					this.form = response.data
+					this.open = true
+					this.title = '修改部门'
+				})
+				listDeptExcludeChild(row.deptId).then((response) => {
+					this.deptOptions = this.handleTree(response.data, 'deptId')
+				})
+			},
+			/** 提交按钮 */
+			submitForm: function () {
+				this.$refs['form'].validate((valid) => {
+					if (valid) {
+						if (this.form.deptId != undefined) {
+							updateDept(this.form).then((response) => {
+								this.$modal.msgSuccess('修改成功')
+								this.open = false
+								this.getList()
+							})
+						} else {
+							addDept(this.form).then((response) => {
+								this.$modal.msgSuccess('新增成功')
+								this.open = false
+								this.getList()
+							})
+						}
+					}
+				})
+			},
+			/** 删除按钮操作 */
+			handleDelete(row) {
+				this.$modal
+					.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?')
+					.then(function () {
+						return delDept(row.deptId)
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('删除成功')
+					})
+					.catch(() => {})
+			}
+		}
+	}
 </script>

+ 306 - 393
src/views/system/dict/data.vue

@@ -1,400 +1,313 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="字典名称" prop="dictType">
-        <el-select v-model="queryParams.dictType" size="small">
-          <el-option
-            v-for="item in typeOptions"
-            :key="item.dictId"
-            :label="item.dictName"
-            :value="item.dictType"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="字典标签" prop="dictLabel">
-        <el-input
-          v-model="queryParams.dictLabel"
-          placeholder="请输入字典标签"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select v-model="queryParams.status" placeholder="数据状态" clearable size="small">
-          <el-option
-            v-for="dict in dict.type.sys_normal_disable"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
+	<div class="page-container">
+		<div class="search-container" v-show="showSearch">
+			<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+				<el-form-item label="字典名称" prop="dictType">
+					<el-select v-model="queryParams.dictType" size="small">
+						<el-option v-for="item in typeOptions" :key="item.dictId" :label="item.dictName" :value="item.dictType" />
+					</el-select>
+				</el-form-item>
+				<el-form-item label="字典标签" prop="dictLabel">
+					<el-input v-model="queryParams.dictLabel" placeholder="请输入字典标签" clearable size="small" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="状态" prop="status">
+					<el-select v-model="queryParams.status" placeholder="数据状态" clearable size="small">
+						<el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
+					</el-select>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">字典数据</div>
+					</div>
+					<div class="actions">
+						<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:dict:add']">添加</el-button>
+						<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:dict:export']">导出</el-button>
+						<el-button type="warning" plain icon="el-icon-close" size="mini" @click="handleClose" style="margin-right: 10px">关闭</el-button>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+					</div>
+				</div>
+				<el-table v-loading="loading" :data="dataList" border>
+					<el-table-column label="字典编码" align="center" prop="dictCode" />
+					<el-table-column label="字典标签" align="center" prop="dictLabel">
+						<template slot-scope="scope">
+							<span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{ scope.row.dictLabel }}</span>
+							<el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass">{{ scope.row.dictLabel }}</el-tag>
+						</template>
+					</el-table-column>
+					<el-table-column label="字典键值" align="center" prop="dictValue" />
+					<el-table-column label="字典排序" align="center" prop="dictSort" />
+					<el-table-column label="状态" align="center" prop="status">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
+						</template>
+					</el-table-column>
+					<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
+					<el-table-column label="创建时间" align="center" prop="createTime" width="180">
+						<template slot-scope="scope">
+							<span>{{ parseTime(scope.row.createTime) }}</span>
+						</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:dict:edit']">修改</el-button>
+							<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dict:remove']">删除</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
 
-    <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:dict:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:dict:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['system:dict:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['system:dict:export']"
-        >导出</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-close"
-          size="mini"
-          @click="handleClose"
-        >关闭</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+				<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+			</div>
+		</div>
 
-    <el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="字典编码" align="center" prop="dictCode" />
-      <el-table-column label="字典标签" align="center" prop="dictLabel">
-        <template slot-scope="scope">
-          <span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{scope.row.dictLabel}}</span>
-          <el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass">{{scope.row.dictLabel}}</el-tag>
-        </template>
-      </el-table-column>
-      <el-table-column label="字典键值" align="center" prop="dictValue" />
-      <el-table-column label="字典排序" align="center" prop="dictSort" />
-      <el-table-column label="状态" align="center" prop="status">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
-        </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:dict:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['system:dict:remove']"
-          >删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改参数配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="字典类型">
-          <el-input v-model="form.dictType" :disabled="true" />
-        </el-form-item>
-        <el-form-item label="数据标签" prop="dictLabel">
-          <el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
-        </el-form-item>
-        <el-form-item label="数据键值" prop="dictValue">
-          <el-input v-model="form.dictValue" placeholder="请输入数据键值" />
-        </el-form-item>
-        <el-form-item label="样式属性" prop="cssClass">
-          <el-input v-model="form.cssClass" placeholder="请输入样式属性" />
-        </el-form-item>
-        <el-form-item label="显示排序" prop="dictSort">
-          <el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
-        </el-form-item>
-        <el-form-item label="回显样式" prop="listClass">
-          <el-select v-model="form.listClass">
-            <el-option
-              v-for="item in listClassOptions"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="状态" prop="status">
-          <el-radio-group v-model="form.status">
-            <el-radio
-              v-for="dict in dict.type.sys_normal_disable"
-              :key="dict.value"
-              :label="dict.value"
-            >{{dict.label}}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
-        </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>
-      </div>
-    </el-dialog>
-  </div>
+		<!-- 添加或修改参数配置对话框 -->
+		<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+			<el-form ref="form" :model="form" :rules="rules" label-width="80px">
+				<el-form-item label="字典类型">
+					<el-input v-model="form.dictType" :disabled="true" />
+				</el-form-item>
+				<el-form-item label="数据标签" prop="dictLabel">
+					<el-input v-model="form.dictLabel" placeholder="请输入数据标签" />
+				</el-form-item>
+				<el-form-item label="数据键值" prop="dictValue">
+					<el-input v-model="form.dictValue" placeholder="请输入数据键值" />
+				</el-form-item>
+				<el-form-item label="样式属性" prop="cssClass">
+					<el-input v-model="form.cssClass" placeholder="请输入样式属性" />
+				</el-form-item>
+				<el-form-item label="显示排序" prop="dictSort">
+					<el-input-number v-model="form.dictSort" controls-position="right" :min="0" />
+				</el-form-item>
+				<el-form-item label="回显样式" prop="listClass">
+					<el-select v-model="form.listClass">
+						<el-option v-for="item in listClassOptions" :key="item.value" :label="item.label" :value="item.value"></el-option>
+					</el-select>
+				</el-form-item>
+				<el-form-item label="状态" prop="status">
+					<el-radio-group v-model="form.status">
+						<el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
+					</el-radio-group>
+				</el-form-item>
+				<el-form-item label="备注" prop="remark">
+					<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button size="medium" @click="cancel">取 消</el-button>
+				<el-button size="medium" type="primary" @click="submitForm">保 存</el-button>
+			</div>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data";
-import { listType, getType } from "@/api/system/dict/type";
+	import { listData, getData, delData, addData, updateData } from '@/api/system/dict/data'
+	import { listType, getType } from '@/api/system/dict/type'
 
-export default {
-  name: "Data",
-  dicts: ['sys_normal_disable'],
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 字典表格数据
-      dataList: [],
-      // 默认字典类型
-      defaultDictType: "",
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 数据标签回显样式
-      listClassOptions: [
-        {
-          value: "default",
-          label: "默认"
-        },
-        {
-          value: "primary",
-          label: "主要"
-        },
-        {
-          value: "success",
-          label: "成功"
-        },
-        {
-          value: "info",
-          label: "信息"
-        },
-        {
-          value: "warning",
-          label: "警告"
-        },
-        {
-          value: "danger",
-          label: "危险"
-        }
-      ],
-      // 类型数据字典
-      typeOptions: [],
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        dictName: undefined,
-        dictType: undefined,
-        status: undefined
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        dictLabel: [
-          { required: true, message: "数据标签不能为空", trigger: "blur" }
-        ],
-        dictValue: [
-          { required: true, message: "数据键值不能为空", trigger: "blur" }
-        ],
-        dictSort: [
-          { required: true, message: "数据顺序不能为空", trigger: "blur" }
-        ]
-      }
-    };
-  },
-  created() {
-    const dictId = this.$route.params && this.$route.params.dictId;
-    this.getType(dictId);
-    this.getTypeList();
-  },
-  methods: {
-    /** 查询字典类型详细 */
-    getType(dictId) {
-      getType(dictId).then(response => {
-        this.queryParams.dictType = response.data.dictType;
-        this.defaultDictType = response.data.dictType;
-        this.getList();
-      });
-    },
-    /** 查询字典类型列表 */
-    getTypeList() {
-      listType().then(response => {
-        this.typeOptions = response.rows;
-      });
-    },
-    /** 查询字典数据列表 */
-    getList() {
-      this.loading = true;
-      listData(this.queryParams).then(response => {
-        this.dataList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        dictCode: undefined,
-        dictLabel: undefined,
-        dictValue: undefined,
-        cssClass: undefined,
-        listClass: 'default',
-        dictSort: 0,
-        status: "0",
-        remark: undefined
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 返回按钮操作 */
-    handleClose() {
-      const obj = { path: "/system/dict" };
-      this.$tab.closeOpenPage(obj);
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.queryParams.dictType = this.defaultDictType;
-      this.handleQuery();
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加字典数据";
-      this.form.dictType = this.queryParams.dictType;
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.dictCode)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const dictCode = row.dictCode || this.ids
-      getData(dictCode).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改字典数据";
-      });
-    },
-    /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.dictCode != undefined) {
-            updateData(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addData(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const dictCodes = row.dictCode || this.ids;
-      this.$modal.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?').then(function() {
-        return delData(dictCodes);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('system/dict/data/export', {
-        ...this.queryParams
-      }, `data_${new Date().getTime()}.xlsx`)
-    }
-  }
-};
-</script>
+	export default {
+		name: 'Data',
+		dicts: ['sys_normal_disable'],
+		data() {
+			return {
+				// 遮罩层
+				loading: true,
+				// 选中数组
+				ids: [],
+				// 非单个禁用
+				single: true,
+				// 非多个禁用
+				multiple: true,
+				// 显示搜索条件
+				showSearch: true,
+				// 总条数
+				total: 0,
+				// 字典表格数据
+				dataList: [],
+				// 默认字典类型
+				defaultDictType: '',
+				// 弹出层标题
+				title: '',
+				// 是否显示弹出层
+				open: false,
+				// 数据标签回显样式
+				listClassOptions: [
+					{
+						value: 'default',
+						label: '默认'
+					},
+					{
+						value: 'primary',
+						label: '主要'
+					},
+					{
+						value: 'success',
+						label: '成功'
+					},
+					{
+						value: 'info',
+						label: '信息'
+					},
+					{
+						value: 'warning',
+						label: '警告'
+					},
+					{
+						value: 'danger',
+						label: '危险'
+					}
+				],
+				// 类型数据字典
+				typeOptions: [],
+				// 查询参数
+				queryParams: {
+					pageNum: 1,
+					pageSize: 10,
+					dictName: undefined,
+					dictType: undefined,
+					status: undefined
+				},
+				// 表单参数
+				form: {},
+				// 表单校验
+				rules: {
+					dictLabel: [{ required: true, message: '数据标签不能为空', trigger: 'blur' }],
+					dictValue: [{ required: true, message: '数据键值不能为空', trigger: 'blur' }],
+					dictSort: [{ required: true, message: '数据顺序不能为空', trigger: 'blur' }]
+				}
+			}
+		},
+		created() {
+			const dictId = this.$route.params && this.$route.params.dictId
+			this.getType(dictId)
+			this.getTypeList()
+		},
+		methods: {
+			/** 查询字典类型详细 */
+			getType(dictId) {
+				getType(dictId).then((response) => {
+					this.queryParams.dictType = response.data.dictType
+					this.defaultDictType = response.data.dictType
+					this.getList()
+				})
+			},
+			/** 查询字典类型列表 */
+			getTypeList() {
+				listType().then((response) => {
+					this.typeOptions = response.rows
+				})
+			},
+			/** 查询字典数据列表 */
+			getList() {
+				this.loading = true
+				listData(this.queryParams).then((response) => {
+					this.dataList = response.rows
+					this.total = response.total
+					this.loading = false
+				})
+			},
+			// 取消按钮
+			cancel() {
+				this.open = false
+				this.reset()
+			},
+			// 表单重置
+			reset() {
+				this.form = {
+					dictCode: undefined,
+					dictLabel: undefined,
+					dictValue: undefined,
+					cssClass: undefined,
+					listClass: 'default',
+					dictSort: 0,
+					status: '0',
+					remark: undefined
+				}
+				this.resetForm('form')
+			},
+			/** 搜索按钮操作 */
+			handleQuery() {
+				this.queryParams.pageNum = 1
+				this.getList()
+			},
+			/** 返回按钮操作 */
+			handleClose() {
+				const obj = { path: '/system/dict' }
+				this.$tab.closeOpenPage(obj)
+			},
+			/** 重置按钮操作 */
+			resetQuery() {
+				this.resetForm('queryForm')
+				this.queryParams.dictType = this.defaultDictType
+				this.handleQuery()
+			},
+			/** 新增按钮操作 */
+			handleAdd() {
+				this.reset()
+				this.open = true
+				this.title = '添加字典数据'
+				this.form.dictType = this.queryParams.dictType
+			},
+			/** 修改按钮操作 */
+			handleUpdate(row) {
+				this.reset()
+				const dictCode = row.dictCode || this.ids
+				getData(dictCode).then((response) => {
+					this.form = response.data
+					this.open = true
+					this.title = '修改字典数据'
+				})
+			},
+			/** 提交按钮 */
+			submitForm: function () {
+				this.$refs['form'].validate((valid) => {
+					if (valid) {
+						if (this.form.dictCode != undefined) {
+							updateData(this.form).then((response) => {
+								this.$modal.msgSuccess('修改成功')
+								this.open = false
+								this.getList()
+							})
+						} else {
+							addData(this.form).then((response) => {
+								this.$modal.msgSuccess('新增成功')
+								this.open = false
+								this.getList()
+							})
+						}
+					}
+				})
+			},
+			/** 删除按钮操作 */
+			handleDelete(row) {
+				const dictCodes = row.dictCode || this.ids
+				this.$modal
+					.confirm('是否确认删除字典编码为"' + dictCodes + '"的数据项?')
+					.then(function () {
+						return delData(dictCodes)
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('删除成功')
+					})
+					.catch(() => {})
+			},
+			/** 导出按钮操作 */
+			handleExport() {
+				this.download(
+					'system/dict/data/export',
+					{
+						...this.queryParams
+					},
+					`data_${new Date().getTime()}.xlsx`
+				)
+			}
+		}
+	}
+</script>

+ 254 - 343
src/views/system/dict/index.vue

@@ -1,350 +1,261 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="字典名称" prop="dictName">
-        <el-input
-          v-model="queryParams.dictName"
-          placeholder="请输入字典名称"
-          clearable
-          size="small"
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="字典类型" prop="dictType">
-        <el-input
-          v-model="queryParams.dictType"
-          placeholder="请输入字典类型"
-          clearable
-          size="small"
-          style="width: 240px"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="状态" prop="status">
-        <el-select
-          v-model="queryParams.status"
-          placeholder="字典状态"
-          clearable
-          size="small"
-          style="width: 240px"
-        >
-          <el-option
-            v-for="dict in dict.type.sys_normal_disable"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item label="创建时间">
-        <el-date-picker
-          v-model="dateRange"
-          size="small"
-          style="width: 240px"
-          value-format="yyyy-MM-dd"
-          type="daterange"
-          range-separator="-"
-          start-placeholder="开始日期"
-          end-placeholder="结束日期"
-        ></el-date-picker>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
+	<div class="page-container">
+		<div class="search-container" v-show="showSearch">
+			<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+				<el-form-item label="字典名称" prop="dictName">
+					<el-input v-model="queryParams.dictName" placeholder="请输入字典名称" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="字典类型" prop="dictType">
+					<el-input v-model="queryParams.dictType" placeholder="请输入字典类型" clearable size="small" style="width: 240px" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="状态" prop="status">
+					<el-select v-model="queryParams.status" placeholder="字典状态" clearable size="small" style="width: 240px">
+						<el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
+					</el-select>
+				</el-form-item>
+				<el-form-item label="创建时间">
+					<el-date-picker
+						v-model="dateRange"
+						size="small"
+						style="width: 240px"
+						value-format="yyyy-MM-dd"
+						type="daterange"
+						range-separator="-"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期"
+					></el-date-picker>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">字典管理</div>
+					</div>
+					<div class="actions">
+						<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:dict:add']">添加</el-button>
+						<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['system:dict:export']">导出</el-button>
+						<el-button type="danger" plain icon="el-icon-refresh" size="mini" @click="handleRefreshCache" v-hasPermi="['system:dict:remove']" style="margin-right: 10px"
+							>刷新缓存</el-button
+						>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+					</div>
+				</div>
+				<el-table v-loading="loading" :data="typeList" border>
+					<el-table-column label="字典编号" align="center" prop="dictId" />
+					<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
+					<el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
+						<template slot-scope="scope">
+							<router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
+								<span>{{ scope.row.dictType }}</span>
+							</router-link>
+						</template>
+					</el-table-column>
+					<el-table-column label="状态" align="center" prop="status">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
+						</template>
+					</el-table-column>
+					<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
+					<el-table-column label="创建时间" align="center" prop="createTime" width="180">
+						<template slot-scope="scope">
+							<span>{{ parseTime(scope.row.createTime) }}</span>
+						</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:dict:edit']">修改</el-button>
+							<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dict:remove']">删除</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
 
-    <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:dict:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:dict:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['system:dict:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['system:dict:export']"
-        >导出</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-refresh"
-          size="mini"
-          @click="handleRefreshCache"
-          v-hasPermi="['system:dict:remove']"
-        >刷新缓存</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+				<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+			</div>
+		</div>
 
-    <el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="字典编号" align="center" prop="dictId" />
-      <el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
-      <el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
-        <template slot-scope="scope">
-          <router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
-            <span>{{ scope.row.dictType }}</span>
-          </router-link>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" align="center" prop="status">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime) }}</span>
-        </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:dict:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['system:dict:remove']"
-          >删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改参数配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="字典名称" prop="dictName">
-          <el-input v-model="form.dictName" placeholder="请输入字典名称" />
-        </el-form-item>
-        <el-form-item label="字典类型" prop="dictType">
-          <el-input v-model="form.dictType" placeholder="请输入字典类型" />
-        </el-form-item>
-        <el-form-item label="状态" prop="status">
-          <el-radio-group v-model="form.status">
-            <el-radio
-              v-for="dict in dict.type.sys_normal_disable"
-              :key="dict.value"
-              :label="dict.value"
-            >{{dict.label}}</el-radio>
-          </el-radio-group>
-        </el-form-item>
-        <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
-        </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>
-      </div>
-    </el-dialog>
-  </div>
+		<!-- 添加或修改参数配置对话框 -->
+		<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+			<el-form ref="form" :model="form" :rules="rules" label-width="80px">
+				<el-form-item label="字典名称" prop="dictName">
+					<el-input v-model="form.dictName" placeholder="请输入字典名称" />
+				</el-form-item>
+				<el-form-item label="字典类型" prop="dictType">
+					<el-input v-model="form.dictType" placeholder="请输入字典类型" />
+				</el-form-item>
+				<el-form-item label="状态" prop="status">
+					<el-radio-group v-model="form.status">
+						<el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
+					</el-radio-group>
+				</el-form-item>
+				<el-form-item label="备注" prop="remark">
+					<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
+				</el-form-item>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button size="medium" @click="cancel">取 消</el-button>
+				<el-button size="medium" type="primary" @click="submitForm">保 存</el-button>
+			</div>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
+	import { listType, getType, delType, addType, updateType, refreshCache } from '@/api/system/dict/type'
 
-export default {
-  name: "Dict",
-  dicts: ['sys_normal_disable'],
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 字典表格数据
-      typeList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 日期范围
-      dateRange: [],
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        dictName: undefined,
-        dictType: undefined,
-        status: undefined
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        dictName: [
-          { required: true, message: "字典名称不能为空", trigger: "blur" }
-        ],
-        dictType: [
-          { required: true, message: "字典类型不能为空", trigger: "blur" }
-        ]
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询字典类型列表 */
-    getList() {
-      this.loading = true;
-      listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
-          this.typeList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        dictId: undefined,
-        dictName: undefined,
-        dictType: undefined,
-        status: "0",
-        remark: undefined
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.dateRange = [];
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加字典类型";
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.dictId)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const dictId = row.dictId || this.ids
-      getType(dictId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改字典类型";
-      });
-    },
-    /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.dictId != undefined) {
-            updateType(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addType(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const dictIds = row.dictId || this.ids;
-      this.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
-        return delType(dictIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      this.download('system/dict/type/export', {
-        ...this.queryParams
-      }, `type_${new Date().getTime()}.xlsx`)
-    },
-    /** 刷新缓存按钮操作 */
-    handleRefreshCache() {
-      refreshCache().then(() => {
-        this.$modal.msgSuccess("刷新成功");
-      });
-    }
-  }
-};
-</script>
+	export default {
+		name: 'Dict',
+		dicts: ['sys_normal_disable'],
+		data() {
+			return {
+				// 遮罩层
+				loading: true,
+				// 选中数组
+				ids: [],
+				// 非单个禁用
+				single: true,
+				// 非多个禁用
+				multiple: true,
+				// 显示搜索条件
+				showSearch: true,
+				// 总条数
+				total: 0,
+				// 字典表格数据
+				typeList: [],
+				// 弹出层标题
+				title: '',
+				// 是否显示弹出层
+				open: false,
+				// 日期范围
+				dateRange: [],
+				// 查询参数
+				queryParams: {
+					pageNum: 1,
+					pageSize: 10,
+					dictName: undefined,
+					dictType: undefined,
+					status: undefined
+				},
+				// 表单参数
+				form: {},
+				// 表单校验
+				rules: {
+					dictName: [{ required: true, message: '字典名称不能为空', trigger: 'blur' }],
+					dictType: [{ required: true, message: '字典类型不能为空', trigger: 'blur' }]
+				}
+			}
+		},
+		created() {
+			this.getList()
+		},
+		methods: {
+			/** 查询字典类型列表 */
+			getList() {
+				this.loading = true
+				listType(this.addDateRange(this.queryParams, this.dateRange)).then((response) => {
+					this.typeList = response.rows
+					this.total = response.total
+					this.loading = false
+				})
+			},
+			// 取消按钮
+			cancel() {
+				this.open = false
+				this.reset()
+			},
+			// 表单重置
+			reset() {
+				this.form = {
+					dictId: undefined,
+					dictName: undefined,
+					dictType: undefined,
+					status: '0',
+					remark: undefined
+				}
+				this.resetForm('form')
+			},
+			/** 搜索按钮操作 */
+			handleQuery() {
+				this.queryParams.pageNum = 1
+				this.getList()
+			},
+			/** 重置按钮操作 */
+			resetQuery() {
+				this.dateRange = []
+				this.resetForm('queryForm')
+				this.handleQuery()
+			},
+			/** 新增按钮操作 */
+			handleAdd() {
+				this.reset()
+				this.open = true
+				this.title = '添加字典类型'
+			},
+			/** 修改按钮操作 */
+			handleUpdate(row) {
+				this.reset()
+				const dictId = row.dictId || this.ids
+				getType(dictId).then((response) => {
+					this.form = response.data
+					this.open = true
+					this.title = '修改字典类型'
+				})
+			},
+			/** 提交按钮 */
+			submitForm: function () {
+				this.$refs['form'].validate((valid) => {
+					if (valid) {
+						if (this.form.dictId != undefined) {
+							updateType(this.form).then((response) => {
+								this.$modal.msgSuccess('修改成功')
+								this.open = false
+								this.getList()
+							})
+						} else {
+							addType(this.form).then((response) => {
+								this.$modal.msgSuccess('新增成功')
+								this.open = false
+								this.getList()
+							})
+						}
+					}
+				})
+			},
+			/** 删除按钮操作 */
+			handleDelete(row) {
+				const dictIds = row.dictId || this.ids
+				this.$modal
+					.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?')
+					.then(function () {
+						return delType(dictIds)
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('删除成功')
+					})
+					.catch(() => {})
+			},
+			/** 导出按钮操作 */
+			handleExport() {
+				this.download(
+					'system/dict/type/export',
+					{
+						...this.queryParams
+					},
+					`type_${new Date().getTime()}.xlsx`
+				)
+			},
+			/** 刷新缓存按钮操作 */
+			handleRefreshCache() {
+				refreshCache().then(() => {
+					this.$modal.msgSuccess('刷新成功')
+				})
+			}
+		}
+	}
+</script>

+ 69 - 56
src/views/system/menu/index.vue

@@ -1,58 +1,71 @@
 <template>
-	<div class="app-container">
-		<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
-			<el-form-item label="菜单名称" prop="menuName">
-				<el-input v-model="queryParams.menuName" placeholder="请输入菜单名称" clearable size="small" @keyup.enter.native="handleQuery" />
-			</el-form-item>
-			<el-form-item label="状态" prop="status">
-				<el-select v-model="queryParams.status" placeholder="菜单状态" clearable size="small">
-					<el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
-				</el-select>
-			</el-form-item>
-			<el-form-item>
-				<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-				<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-			</el-form-item>
-		</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:menu: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 v-if="refreshTable" v-loading="loading" :data="menuList" row-key="menuId" :default-expand-all="isExpandAll" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
-			<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
-			<el-table-column prop="icon" label="图标" align="center" width="100">
-				<template slot-scope="scope">
-					<svg-icon :icon-class="scope.row.icon" />
-				</template>
-			</el-table-column>
-			<el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
-			<el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
-			<el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
-			<el-table-column prop="status" label="状态" width="80">
-				<template slot-scope="scope">
-					<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
-				</template>
-			</el-table-column>
-			<el-table-column label="创建时间" align="center" prop="createTime">
-				<template slot-scope="scope">
-					<span>{{ parseTime(scope.row.createTime) }}</span>
-				</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:menu:edit']">修改</el-button>
-					<el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)" v-hasPermi="['system:menu:add']">新增</el-button>
-					<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:menu:remove']">删除</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
+	<div class="page-container">
+		<div class="search-container" v-show="showSearch">
+			<el-form :model="queryParams" ref="queryForm" :inline="true">
+				<el-form-item label="菜单名称" prop="menuName">
+					<el-input v-model="queryParams.menuName" placeholder="请输入菜单名称" clearable size="small" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="状态" prop="status">
+					<el-select v-model="queryParams.status" placeholder="菜单状态" clearable size="small">
+						<el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label" :value="dict.value" />
+					</el-select>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">菜单管理</div>
+					</div>
+					<div class="actions">
+						<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:menu:add']">添加</el-button>
+						<el-button type="info" plain icon="el-icon-sort" size="mini" @click="toggleExpandAll" style="margin-right: 10px">展开/折叠</el-button>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+					</div>
+				</div>
+				<el-table
+					v-if="refreshTable"
+					v-loading="loading"
+					border
+					:data="menuList"
+					row-key="menuId"
+					:default-expand-all="isExpandAll"
+					:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+				>
+					<el-table-column prop="menuName" label="菜单名称" :show-overflow-tooltip="true" width="160"></el-table-column>
+					<el-table-column prop="icon" label="图标" align="center" width="100">
+						<template slot-scope="scope">
+							<svg-icon :icon-class="scope.row.icon" />
+						</template>
+					</el-table-column>
+					<el-table-column prop="orderNum" label="排序" width="60"></el-table-column>
+					<el-table-column prop="perms" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
+					<el-table-column prop="component" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
+					<el-table-column prop="status" label="状态" width="80">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status" />
+						</template>
+					</el-table-column>
+					<el-table-column label="创建时间" align="center" prop="createTime">
+						<template slot-scope="scope">
+							<span>{{ parseTime(scope.row.createTime) }}</span>
+						</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:menu:edit']">修改</el-button>
+							<el-button size="mini" type="text" icon="el-icon-plus" @click="handleAdd(scope.row)" v-hasPermi="['system:menu:add']">新增</el-button>
+							<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:menu:remove']">删除</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
+			</div>
+		</div>
 
 		<!-- 添加或修改菜单对话框 -->
 		<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
@@ -194,8 +207,8 @@
 				</el-row>
 			</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>

+ 228 - 306
src/views/system/notice/index.vue

@@ -1,314 +1,236 @@
 <template>
-  <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="公告标题" prop="noticeTitle">
-        <el-input
-          v-model="queryParams.noticeTitle"
-          placeholder="请输入公告标题"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="操作人员" prop="createBy">
-        <el-input
-          v-model="queryParams.createBy"
-          placeholder="请输入操作人员"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="类型" prop="noticeType">
-        <el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable size="small">
-          <el-option
-            v-for="dict in dict.type.sys_notice_type"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
-          />
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form>
+	<div class="page-container">
+		<div class="search-container" v-show="showSearch">
+			<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+				<el-form-item label="公告标题" prop="noticeTitle">
+					<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable size="small" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="操作人员" prop="createBy">
+					<el-input v-model="queryParams.createBy" placeholder="请输入操作人员" clearable size="small" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="类型" prop="noticeType">
+					<el-select v-model="queryParams.noticeType" placeholder="公告类型" clearable size="small">
+						<el-option v-for="dict in dict.type.sys_notice_type" :key="dict.value" :label="dict.label" :value="dict.value" />
+					</el-select>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">通知公告</div>
+					</div>
+					<div class="actions">
+						<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:notice:add']" style="margin-right: 10px">添加</el-button>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+					</div>
+				</div>
+				<el-table v-loading="loading" :data="noticeList" border>
+					<el-table-column label="序号" align="center" prop="noticeId" width="100" />
+					<el-table-column label="公告标题" align="center" prop="noticeTitle" :show-overflow-tooltip="true" />
+					<el-table-column label="公告类型" align="center" prop="noticeType" width="100">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_notice_type" :value="scope.row.noticeType" />
+						</template>
+					</el-table-column>
+					<el-table-column label="状态" align="center" prop="status" width="100">
+						<template slot-scope="scope">
+							<dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status" />
+						</template>
+					</el-table-column>
+					<el-table-column label="创建者" align="center" prop="createBy" width="100" />
+					<el-table-column label="创建时间" align="center" prop="createTime" width="100">
+						<template slot-scope="scope">
+							<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
+						</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:notice:edit']">修改</el-button>
+							<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']">删除</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
 
-    <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:notice:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['system:notice:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['system:notice:remove']"
-        >删除</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+				<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+			</div>
+		</div>
 
-    <el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="序号" align="center" prop="noticeId" width="100" />
-      <el-table-column
-        label="公告标题"
-        align="center"
-        prop="noticeTitle"
-        :show-overflow-tooltip="true"
-      />
-      <el-table-column label="公告类型" align="center" prop="noticeType" width="100">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_notice_type" :value="scope.row.noticeType"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="状态" align="center" prop="status" width="100">
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.sys_notice_status" :value="scope.row.status"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="创建者" align="center" prop="createBy" width="100" />
-      <el-table-column label="创建时间" align="center" prop="createTime" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
-        </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:notice:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['system:notice:remove']"
-          >删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改公告对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="公告标题" prop="noticeTitle">
-              <el-input v-model="form.noticeTitle" placeholder="请输入公告标题" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="公告类型" prop="noticeType">
-              <el-select v-model="form.noticeType" placeholder="请选择">
-                <el-option
-                  v-for="dict in dict.type.sys_notice_type"
-                  :key="dict.value"
-                  :label="dict.label"
-                  :value="dict.value"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="状态">
-              <el-radio-group v-model="form.status">
-                <el-radio
-                  v-for="dict in dict.type.sys_notice_status"
-                  :key="dict.value"
-                  :label="dict.value"
-                >{{dict.label}}</el-radio>
-              </el-radio-group>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="内容">
-              <editor v-model="form.noticeContent" :min-height="192"/>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-  </div>
+		<!-- 添加或修改公告对话框 -->
+		<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
+			<el-form ref="form" :model="form" :rules="rules" label-width="80px">
+				<el-row>
+					<el-col :span="12">
+						<el-form-item label="公告标题" prop="noticeTitle">
+							<el-input v-model="form.noticeTitle" placeholder="请输入公告标题" />
+						</el-form-item>
+					</el-col>
+					<el-col :span="12">
+						<el-form-item label="公告类型" prop="noticeType">
+							<el-select v-model="form.noticeType" placeholder="请选择">
+								<el-option v-for="dict in dict.type.sys_notice_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
+							</el-select>
+						</el-form-item>
+					</el-col>
+					<el-col :span="24">
+						<el-form-item label="状态">
+							<el-radio-group v-model="form.status">
+								<el-radio v-for="dict in dict.type.sys_notice_status" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
+							</el-radio-group>
+						</el-form-item>
+					</el-col>
+					<el-col :span="24">
+						<el-form-item label="内容">
+							<editor v-model="form.noticeContent" :min-height="192" />
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<div slot="footer" class="dialog-footer">
+				<el-button size="medium" @click="cancel">取 消</el-button>
+				<el-button size="medium" type="primary" @click="submitForm">保 存</el-button>
+			</div>
+		</el-dialog>
+	</div>
 </template>
 
 <script>
-import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice";
+	import { listNotice, getNotice, delNotice, addNotice, updateNotice } from '@/api/system/notice'
 
-export default {
-  name: "Notice",
-  dicts: ['sys_notice_status', 'sys_notice_type'],
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: true,
-      // 总条数
-      total: 0,
-      // 公告表格数据
-      noticeList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        noticeTitle: undefined,
-        createBy: undefined,
-        status: undefined
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        noticeTitle: [
-          { required: true, message: "公告标题不能为空", trigger: "blur" }
-        ],
-        noticeType: [
-          { required: true, message: "公告类型不能为空", trigger: "change" }
-        ]
-      }
-    };
-  },
-  created() {
-    this.getList();
-  },
-  methods: {
-    /** 查询公告列表 */
-    getList() {
-      this.loading = true;
-      listNotice(this.queryParams).then(response => {
-        this.noticeList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        noticeId: undefined,
-        noticeTitle: undefined,
-        noticeType: undefined,
-        noticeContent: undefined,
-        status: "0"
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.noticeId)
-      this.single = selection.length!=1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加公告";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const noticeId = row.noticeId || this.ids
-      getNotice(noticeId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改公告";
-      });
-    },
-    /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.noticeId != undefined) {
-            updateNotice(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addNotice(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const noticeIds = row.noticeId || this.ids
-      this.$modal.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?').then(function() {
-        return delNotice(noticeIds);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
-    }
-  }
-};
+	export default {
+		name: 'Notice',
+		dicts: ['sys_notice_status', 'sys_notice_type'],
+		data() {
+			return {
+				// 遮罩层
+				loading: true,
+				// 选中数组
+				ids: [],
+				// 非单个禁用
+				single: true,
+				// 非多个禁用
+				multiple: true,
+				// 显示搜索条件
+				showSearch: true,
+				// 总条数
+				total: 0,
+				// 公告表格数据
+				noticeList: [],
+				// 弹出层标题
+				title: '',
+				// 是否显示弹出层
+				open: false,
+				// 查询参数
+				queryParams: {
+					pageNum: 1,
+					pageSize: 10,
+					noticeTitle: undefined,
+					createBy: undefined,
+					status: undefined
+				},
+				// 表单参数
+				form: {},
+				// 表单校验
+				rules: {
+					noticeTitle: [{ required: true, message: '公告标题不能为空', trigger: 'blur' }],
+					noticeType: [{ required: true, message: '公告类型不能为空', trigger: 'change' }]
+				}
+			}
+		},
+		created() {
+			this.getList()
+		},
+		methods: {
+			/** 查询公告列表 */
+			getList() {
+				this.loading = true
+				listNotice(this.queryParams).then((response) => {
+					this.noticeList = response.rows
+					this.total = response.total
+					this.loading = false
+				})
+			},
+			// 取消按钮
+			cancel() {
+				this.open = false
+				this.reset()
+			},
+			// 表单重置
+			reset() {
+				this.form = {
+					noticeId: undefined,
+					noticeTitle: undefined,
+					noticeType: undefined,
+					noticeContent: undefined,
+					status: '0'
+				}
+				this.resetForm('form')
+			},
+			/** 搜索按钮操作 */
+			handleQuery() {
+				this.queryParams.pageNum = 1
+				this.getList()
+			},
+			/** 重置按钮操作 */
+			resetQuery() {
+				this.resetForm('queryForm')
+				this.handleQuery()
+			},
+			/** 新增按钮操作 */
+			handleAdd() {
+				this.reset()
+				this.open = true
+				this.title = '添加公告'
+			},
+			/** 修改按钮操作 */
+			handleUpdate(row) {
+				this.reset()
+				const noticeId = row.noticeId || this.ids
+				getNotice(noticeId).then((response) => {
+					this.form = response.data
+					this.open = true
+					this.title = '修改公告'
+				})
+			},
+			/** 提交按钮 */
+			submitForm: function () {
+				this.$refs['form'].validate((valid) => {
+					if (valid) {
+						if (this.form.noticeId != undefined) {
+							updateNotice(this.form).then((response) => {
+								this.$modal.msgSuccess('修改成功')
+								this.open = false
+								this.getList()
+							})
+						} else {
+							addNotice(this.form).then((response) => {
+								this.$modal.msgSuccess('新增成功')
+								this.open = false
+								this.getList()
+							})
+						}
+					}
+				})
+			},
+			/** 删除按钮操作 */
+			handleDelete(row) {
+				const noticeIds = row.noticeId || this.ids
+				this.$modal
+					.confirm('是否确认删除公告编号为"' + noticeIds + '"的数据项?')
+					.then(function () {
+						return delNotice(noticeIds)
+					})
+					.then(() => {
+						this.getList()
+						this.$modal.msgSuccess('删除成功')
+					})
+					.catch(() => {})
+			}
+		}
+	}
 </script>

+ 2 - 13
src/views/system/tableHead/index.vue

@@ -10,7 +10,7 @@
 			<div class="main">
 				<div class="table-nav">
 					<div class="tags">
-						<div class="tag" :style="isActive(1)">表头管理</div>
+						<div class="tag">表头管理</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']" v-show="menuId"
@@ -64,7 +64,7 @@
 			</el-form>
 			<div slot="footer" class="dialog-footer">
 				<el-button size="medium" @click="cancel">取 消</el-button>
-				<el-button size="medium" type="primary" @click="submitForm">确 定</el-button>
+				<el-button size="medium" type="primary" @click="submitForm">保 存</el-button>
 			</div>
 		</el-dialog>
 	</div>
@@ -80,11 +80,6 @@
 		components: {
 			TreeChoice
 		},
-		computed: {
-			theme() {
-				return this.$store.state.settings.theme
-			}
-		},
 		data() {
 			return {
 				tabIndex: 1,
@@ -132,12 +127,6 @@
 			this.getMenuList()
 		},
 		methods: {
-			isActive(index) {
-				if (this.tabIndex != index) return {}
-				return {
-					color: this.theme
-				}
-			},
 			//获取菜单
 			getMenuList() {
 				listMenu().then((res) => {

+ 6 - 6
src/views/system/user/index.vue

@@ -26,8 +26,8 @@
 					></el-date-picker>
 				</el-form-item>
 				<el-form-item>
-					<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-					<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
 				</el-form-item>
 			</el-form>
 		</div>
@@ -159,8 +159,8 @@
 				</el-row>
 			</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>
 
@@ -187,8 +187,8 @@
 				</div>
 			</el-upload>
 			<div slot="footer" class="dialog-footer">
-				<el-button type="primary" @click="submitFileForm">确 定</el-button>
-				<el-button @click="upload.open = false">取 消</el-button>
+				<el-button size="medium" @click="upload.open = false">取 消</el-button>
+				<el-button size="medium" type="primary" @click="submitFileForm">确 定</el-button>
 			</div>
 		</el-dialog>
 	</div>

+ 63 - 64
src/views/tool/gen/index.vue

@@ -1,69 +1,68 @@
 <template>
-	<div class="app-container">
-		<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-			<el-form-item label="表名称" prop="tableName">
-				<el-input v-model="queryParams.tableName" placeholder="请输入表名称" clearable size="small" @keyup.enter.native="handleQuery" />
-			</el-form-item>
-			<el-form-item label="表描述" prop="tableComment">
-				<el-input v-model="queryParams.tableComment" placeholder="请输入表描述" clearable size="small" @keyup.enter.native="handleQuery" />
-			</el-form-item>
-			<el-form-item label="创建时间">
-				<el-date-picker
-					v-model="dateRange"
-					size="small"
-					style="width: 240px"
-					value-format="yyyy-MM-dd"
-					type="daterange"
-					range-separator="-"
-					start-placeholder="开始日期"
-					end-placeholder="结束日期"
-				></el-date-picker>
-			</el-form-item>
-			<el-form-item>
-				<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-				<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-			</el-form-item>
-		</el-form>
+	<div class="page-container">
+		<div class="search-container" v-show="showSearch">
+			<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+				<el-form-item label="表名称" prop="tableName">
+					<el-input v-model="queryParams.tableName" placeholder="请输入表名称" clearable size="small" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="表描述" prop="tableComment">
+					<el-input v-model="queryParams.tableComment" placeholder="请输入表描述" clearable size="small" @keyup.enter.native="handleQuery" />
+				</el-form-item>
+				<el-form-item label="创建时间">
+					<el-date-picker
+						v-model="dateRange"
+						size="small"
+						style="width: 240px"
+						value-format="yyyy-MM-dd"
+						type="daterange"
+						range-separator="-"
+						start-placeholder="开始日期"
+						end-placeholder="结束日期"
+					></el-date-picker>
+				</el-form-item>
+				<el-form-item>
+					<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">搜索</el-button>
+					<el-button icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
+				</el-form-item>
+			</el-form>
+		</div>
+		<div class="content-container">
+			<div class="main">
+				<div class="table-nav">
+					<div class="tags">
+						<div class="tag">代码生成</div>
+					</div>
+					<div class="actions">
+						<el-button type="primary" icon="el-icon-download" size="mini" @click="handleGenTable" v-hasPermi="['tool:gen:code']" style="margin-right: 10px">生成</el-button>
+						<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+					</div>
+				</div>
+				<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange" border>
+					<el-table-column type="selection" align="center" width="55"></el-table-column>
+					<el-table-column label="序号" type="index" width="50" align="center">
+						<template slot-scope="scope">
+							<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column label="表名称" align="center" prop="tableName" :show-overflow-tooltip="true" width="120" />
+					<el-table-column label="表描述" align="center" prop="tableComment" :show-overflow-tooltip="true" width="120" />
+					<el-table-column label="实体" align="center" prop="className" :show-overflow-tooltip="true" width="120" />
+					<el-table-column label="创建时间" align="center" prop="createTime" width="160" />
+					<el-table-column label="更新时间" align="center" prop="updateTime" width="160" />
+					<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+						<template slot-scope="scope">
+							<el-button type="text" size="small" icon="el-icon-view" @click="handlePreview(scope.row)" v-hasPermi="['tool:gen:preview']">预览</el-button>
+							<el-button type="text" size="small" icon="el-icon-edit" @click="handleEditTable(scope.row)" v-hasPermi="['tool:gen:edit']">编辑</el-button>
+							<el-button type="text" size="small" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['tool:gen:remove']">删除</el-button>
+							<el-button type="text" size="small" icon="el-icon-refresh" @click="handleSynchDb(scope.row)" v-hasPermi="['tool:gen:edit']">同步</el-button>
+							<el-button type="text" size="small" icon="el-icon-download" @click="handleGenTable(scope.row)" v-hasPermi="['tool:gen:code']">生成代码</el-button>
+						</template>
+					</el-table-column>
+				</el-table>
+				<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
+			</div>
+		</div>
 
-		<el-row :gutter="10" class="mb8">
-			<el-col :span="1.5">
-				<el-button type="primary" plain icon="el-icon-download" size="mini" @click="handleGenTable" v-hasPermi="['tool:gen:code']">生成</el-button>
-			</el-col>
-			<el-col :span="1.5">
-				<el-button type="info" plain icon="el-icon-upload" size="mini" @click="openImportTable" v-hasPermi="['tool:gen:import']">导入</el-button>
-			</el-col>
-			<el-col :span="1.5">
-				<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleEditTable" v-hasPermi="['tool:gen:edit']">修改</el-button>
-			</el-col>
-			<el-col :span="1.5">
-				<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['tool:gen:remove']">删除</el-button>
-			</el-col>
-			<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-		</el-row>
-
-		<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
-			<el-table-column type="selection" align="center" width="55"></el-table-column>
-			<el-table-column label="序号" type="index" width="50" align="center">
-				<template slot-scope="scope">
-					<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
-				</template>
-			</el-table-column>
-			<el-table-column label="表名称" align="center" prop="tableName" :show-overflow-tooltip="true" width="120" />
-			<el-table-column label="表描述" align="center" prop="tableComment" :show-overflow-tooltip="true" width="120" />
-			<el-table-column label="实体" align="center" prop="className" :show-overflow-tooltip="true" width="120" />
-			<el-table-column label="创建时间" align="center" prop="createTime" width="160" />
-			<el-table-column label="更新时间" align="center" prop="updateTime" width="160" />
-			<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-				<template slot-scope="scope">
-					<el-button type="text" size="small" icon="el-icon-view" @click="handlePreview(scope.row)" v-hasPermi="['tool:gen:preview']">预览</el-button>
-					<el-button type="text" size="small" icon="el-icon-edit" @click="handleEditTable(scope.row)" v-hasPermi="['tool:gen:edit']">编辑</el-button>
-					<el-button type="text" size="small" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['tool:gen:remove']">删除</el-button>
-					<el-button type="text" size="small" icon="el-icon-refresh" @click="handleSynchDb(scope.row)" v-hasPermi="['tool:gen:edit']">同步</el-button>
-					<el-button type="text" size="small" icon="el-icon-download" @click="handleGenTable(scope.row)" v-hasPermi="['tool:gen:code']">生成代码</el-button>
-				</template>
-			</el-table-column>
-		</el-table>
-		<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
 		<!-- 预览界面 -->
 		<el-dialog :title="preview.title" :visible.sync="preview.open" width="80%" top="5vh" append-to-body class="scrollbar">
 			<el-tabs v-model="preview.activeName">