|
@@ -1,161 +1,163 @@
|
|
<template>
|
|
<template>
|
|
- <div class="app-container">
|
|
|
|
- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
- <el-form-item label="字典名称" prop="dictName">
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.dictName"
|
|
|
|
- placeholder="请输入字典名称"
|
|
|
|
- clearable
|
|
|
|
- style="width: 240px"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="字典类型" prop="dictType">
|
|
|
|
- <el-input
|
|
|
|
- v-model="queryParams.dictType"
|
|
|
|
- placeholder="请输入字典类型"
|
|
|
|
- clearable
|
|
|
|
- style="width: 240px"
|
|
|
|
- @keyup.enter.native="handleQuery"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="状态" prop="status">
|
|
|
|
- <el-select
|
|
|
|
- v-model="queryParams.status"
|
|
|
|
- placeholder="字典状态"
|
|
|
|
- clearable
|
|
|
|
- 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"
|
|
|
|
- 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>
|
|
|
|
-
|
|
|
|
- <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>
|
|
|
|
-
|
|
|
|
- <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"
|
|
|
|
- />
|
|
|
|
|
|
+ <div class="app-container infinite-list" >
|
|
|
|
+ <div >
|
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
|
+ <el-form-item label="字典名称" prop="dictName">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.dictName"
|
|
|
|
+ placeholder="请输入字典名称"
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 240px"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="字典类型" prop="dictType">
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="queryParams.dictType"
|
|
|
|
+ placeholder="请输入字典类型"
|
|
|
|
+ clearable
|
|
|
|
+ style="width: 240px"
|
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="状态" prop="status">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="queryParams.status"
|
|
|
|
+ placeholder="字典状态"
|
|
|
|
+ clearable
|
|
|
|
+ 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"
|
|
|
|
+ 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>
|
|
|
|
+
|
|
|
|
+ <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>
|
|
|
|
+
|
|
|
|
+ <el-table :height="tableMaxHeight" 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"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
|
|
<!-- 添加或修改参数配置对话框 -->
|
|
<!-- 添加或修改参数配置对话框 -->
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
@@ -233,11 +235,22 @@ export default {
|
|
dictType: [
|
|
dictType: [
|
|
{ required: true, message: "字典类型不能为空", trigger: "blur" }
|
|
{ required: true, message: "字典类型不能为空", trigger: "blur" }
|
|
]
|
|
]
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ tableMaxHeight:'200',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.getList()
|
|
this.getList()
|
|
|
|
+ window.onresize = () => {
|
|
|
|
+ this.changeTableMaxHeight()
|
|
|
|
+ }
|
|
|
|
+ this.changeTableMaxHeight()
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ window.onresize = () => {
|
|
|
|
+ this.changeTableMaxHeight()
|
|
|
|
+ }
|
|
|
|
+ this.changeTableMaxHeight()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/** 查询字典类型列表 */
|
|
/** 查询字典类型列表 */
|
|
@@ -341,7 +354,21 @@ export default {
|
|
this.$modal.msgSuccess("刷新成功")
|
|
this.$modal.msgSuccess("刷新成功")
|
|
this.$store.dispatch('dict/cleanDict')
|
|
this.$store.dispatch('dict/cleanDict')
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 获取屏幕高度
|
|
|
|
+ showFilterForm () {
|
|
|
|
+ this.filterActive = !this.filterActive
|
|
|
|
+ this.changeTableMaxHeight()
|
|
|
|
+ },
|
|
|
|
+ changeTableMaxHeight () {
|
|
|
|
+ let height = document.body.offsetHeight // 网页可视区域高度
|
|
|
|
+ // if (this.filterActive) {
|
|
|
|
+ // this.tableMaxHeight = height - 320
|
|
|
|
+ // } else {
|
|
|
|
+ this.tableMaxHeight = height - 190
|
|
|
|
+ // }
|
|
|
|
+ console.log(height)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|