Commit c0e597e3 authored by 岑歆奕's avatar 岑歆奕 Committed by AiNoeLiYa

1.注释了系统管理中的数据字典

2.完善了queryParams中字段的更改,更改为page和rows
Signed-off-by: 's avatarAiNoeLiYa <jzbcxy@gmail.com>
parent c5430501
......@@ -306,7 +306,7 @@ export default {
getList() {
this.loading = true
listBasicInfo(this.queryParams).then(res => {
res.rows.createDate = parseTime(res.rows.createDate,'{y}-{m}-{d}')
res.rows.createDate = parseTime(res.rows.createDate, '{y}-{m}-{d}')
this.total = res.total
this.basicInfoList = res.rows
this.loading = false
......
......@@ -10,16 +10,16 @@
size="small"
/>
</el-form-item>
<el-form-item label="部门状态">
<el-select v-model="queryParams.flag" placeholder="请选择部门状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="部门状态">-->
<!-- <el-select v-model="queryParams.flag" placeholder="请选择部门状态" clearable size="small">-->
<!-- <el-option-->
<!-- v-for="dict in statusOptions"-->
<!-- :key="dict.dictValue"-->
<!-- :label="dict.dictLabel"-->
<!-- :value="dict.dictValue"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button
style="padding: 8px 7px;"
......@@ -222,7 +222,7 @@ export default {
// 是否显示弹出层
open: false,
// 状态数据字典
statusOptions: [],
// statusOptions: [],
// 查询参数
queryParams: {
deptName: undefined,
......@@ -275,9 +275,9 @@ export default {
this.queryParams = { ...param }
}
this.getList()
this.getDicts('sys_normal_disable'.toUpperCase()).then(response => {
this.statusOptions = response.data
})
// this.getDicts('sys_normal_disable'.toUpperCase()).then(response => {
// this.statusOptions = response.data
// })
},
methods: {
/** 查询部门列表 */
......@@ -317,9 +317,9 @@ export default {
}
},
// 字典状态字典翻译
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.flag)
},
// statusFormat(row, column) {
// return this.selectDictLabel(this.statusOptions, row.flag)
// },
// 取消按钮
cancel() {
this.open = false
......
......@@ -23,22 +23,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="flag">
<el-select
v-model="queryParams.flag"
placeholder="字典状态"
clearable
size="small"
style="width: 200px"
>
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="状态" prop="flag">-->
<!-- <el-select-->
<!-- v-model="queryParams.flag"-->
<!-- placeholder="字典状态"-->
<!-- clearable-->
<!-- size="small"-->
<!-- style="width: 200px"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="dict in statusOptions"-->
<!-- :key="dict.dictValue"-->
<!-- :label="dict.dictLabel"-->
<!-- :value="dict.dictValue"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
......@@ -52,12 +52,25 @@
/>
</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-button
type="primary"
style="padding: 8px 7px;"
icon="el-icon-search"
size="small"
@click="handleQuery"
>搜索</el-button>
<el-button
style="padding: 8px 7px;"
icon="el-icon-refresh"
size="small"
@click="resetQuery"
>重置
</el-button>
</el-form-item>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
style="padding: 8px 7px;"
type="primary"
icon="el-icon-plus"
size="small"
......@@ -66,9 +79,10 @@
</el-col>
<el-col :span="1.5">
<el-button
style="padding: 8px 7px;"
type="success"
icon="el-icon-edit"
size="mini"
size="small"
:disabled="single"
@click="handleUpdate"
>修改
......@@ -76,9 +90,10 @@
</el-col>
<el-col :span="1.5">
<el-button
style="padding: 8px 7px;"
type="danger"
icon="el-icon-delete"
size="mini"
size="small"
:disabled="multiple"
@click="handleDelete"
>删除
......@@ -86,6 +101,7 @@
</el-col>
<el-col :span="1.5">
<el-button
style="padding: 8px 7px;"
type="success"
icon="el-icon-download"
size="small"
......@@ -161,8 +177,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
......@@ -174,14 +190,21 @@
<el-form-item label="字典类型" prop="dictType">
<el-input v-model.trim="form.dictType" :maxlength="30" placeholder="请输入字典类型" />
</el-form-item>
<el-form-item label="状态" prop="flag">
<!-- <el-form-item label="状态" prop="flag">-->
<!-- <el-radio-group v-model="form.flag">-->
<!-- <el-radio-->
<!-- v-for="dict in statusOptions"-->
<!-- :key="dict.dictValue"-->
<!-- :label="dict.dictValue"-->
<!-- >{{ dict.dictLabel }}-->
<!-- </el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-radio-group v-model="form.flag">
<el-radio
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictValue"
>{{ dict.dictLabel }}
</el-radio>
<el-radio label="1">启用</el-radio>
<el-radio label="0">停用</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="父字典名称">
......@@ -313,14 +336,14 @@ export default {
title: '',
// 是否显示弹出层
open: false,
// 状态数据字典
statusOptions: [],
// // 状态数据字典
// statusOptions: [],
// 日期范围
dateRange: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
page: 1,
rows: 10,
dictName: undefined,
dictType: undefined,
flag: undefined
......@@ -364,9 +387,9 @@ export default {
this.queryParams = { ...param }
}
this.getList()
this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
this.statusOptions = response.data
})
// this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
// this.statusOptions = response.data
// })
optionselect().then(response => {
this.options = response.data
})
......@@ -419,9 +442,9 @@ export default {
})
},
// 字典状态字典翻译
statusFormat(row, column) {
return this.selectDictLabel(this.statusOptions, row.flag)
},
// statusFormat(row, column) {
// return this.selectDictLabel(this.statusOptions, row.flag)
// },
// 取消按钮
cancel() {
this.open = false
......@@ -442,7 +465,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.queryParams.page = 1
this.getList()
},
/** 重置按钮操作 */
......
......@@ -22,24 +22,15 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="角色状态" prop="flag">
<el-select
v-model="queryParams.flag"
placeholder="请选择角色状态"
clearable
size="small"
style="width: 150px"
>
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="small" @click="handleQuery">查询</el-button>
<el-button
style="padding: 8px 7px;"
type="primary"
icon="el-icon-search"
size="small"
@click="handleQuery">
查询
</el-button>
</el-form-item>
<div style="float: right">
<el-form-item>
......@@ -128,8 +119,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
......@@ -510,7 +501,7 @@ export default {
},
/** 查询按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.queryParams.page = 1
this.getList()
},
/** 重置按钮操作 */
......
......@@ -22,22 +22,6 @@
style="width: 150px"
/>
</el-form-item>
<el-form-item label="状态" prop="flag">
<el-select
v-model="queryParams.flag"
placeholder="请选择用户状态"
clearable
size="small"
style="width: 150px"
>
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" style="padding: 8px 7px;" icon="el-icon-search" size="small" @click="handleQuery">查询</el-button>
<el-button style="padding: 8px 7px;" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment