优化ui

This commit is contained in:
不做码农 2023-10-25 19:31:23 +08:00
parent 405a8ce511
commit 833698168b
3 changed files with 14 additions and 7 deletions

View File

@ -2,7 +2,7 @@ export default {
m: { m: {
menuName: '菜单名称', menuName: '菜单名称',
menuState: '菜单状态', menuState: '菜单状态',
icon: '菜单图标', icon: '图标',
menuid: '菜单id', menuid: '菜单id',
menuType: '菜单类型', menuType: '菜单类型',
sort: '菜单排序', sort: '菜单排序',

View File

@ -27,6 +27,7 @@
range-separator="-" range-separator="-"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
:default-time="defaultTime"
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
:shortcuts="dateOptions"></el-date-picker> :shortcuts="dateOptions"></el-date-picker>
</el-form-item> </el-form-item>
@ -158,8 +159,8 @@
</template> </template>
<script setup name="operlog"> <script setup name="operlog">
import { list as listOperLog, delOperlog, cleanOperlog, exportOperlog } from '@/api/monitor/operlog' import { list as listOperLog, delOperlog, cleanOperlog } from '@/api/monitor/operlog'
import dayjs from 'dayjs'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
// //
const loading = ref(true) const loading = ref(true)
@ -180,7 +181,8 @@ const statusOptions = ref([])
// 0 1 2 3 eg:{ dictLabel: '', dictValue: '0'} // 0 1 2 3 eg:{ dictLabel: '', dictValue: '0'}
const businessTypeOptions = ref([]) const businessTypeOptions = ref([])
// //
const dateRange = ref([]) const dateRange = ref([dayjs().format('YYYY-MM-DD 00:00:00'), dayjs().format('YYYY-MM-DD 23:59:59')])
const defaultTime = ref([new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)])
const state = reactive({ const state = reactive({
form: {}, form: {},

View File

@ -41,7 +41,7 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="info" plain icon="Sort" @click="toggleExpandAll">{{ $t('btn.expand') }}/{{ $t('btn.collapse') }}</el-button> <el-button type="info" plain icon="Sort" @click="toggleExpandAll">{{ $t('btn.expand') }}/{{ $t('btn.collapse') }}</el-button>
</el-col> </el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
<vxe-table <vxe-table
@ -68,7 +68,7 @@
<el-tag :disable-transitions="true" type="warning" v-else-if="scope.row.menuType == 'F'">{{ $t('m.button') }}</el-tag> <el-tag :disable-transitions="true" type="warning" v-else-if="scope.row.menuType == 'F'">{{ $t('m.button') }}</el-tag>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="orderNum" :title="$t('m.sort')" width="90" sortable align="center"> <vxe-column field="orderNum" :title="$t('m.sort')" width="90" sortable align="center" v-if="columns.showColumn('orderNum')">
<template #default="scope"> <template #default="scope">
<span v-show="editIndex != scope.row.menuId" @click="editCurrRow(scope.row.menuId)">{{ scope.row.orderNum }}</span> <span v-show="editIndex != scope.row.menuId" @click="editCurrRow(scope.row.menuId)">{{ scope.row.orderNum }}</span>
<el-input <el-input
@ -90,7 +90,7 @@
<dict-tag :options="sys_normal_disable" :value="scope.row.status" /> <dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template> </template>
</vxe-column> </vxe-column>
<vxe-column :title="$t('common.addTime')" align="center" field="createTime" show-overflow> <vxe-column :title="$t('common.addTime')" align="center" field="createTime" show-overflow v-if="columns.showColumn('createTime')">
<template #default="scope"> <template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
@ -363,6 +363,11 @@ proxy.getDicts(dictParams).then((response) => {
state[element.dictType] = element.list state[element.dictType] = element.list
}) })
}) })
//
const columns = ref([
{ label: `添加时间`, visible: false, prop: 'createTime' },
{ label: `排序`, visible: false, prop: 'orderNum' }
])
const tableHeight = ref(document.documentElement.scrollHeight - 245 + 'px') const tableHeight = ref(document.documentElement.scrollHeight - 245 + 'px')
const { queryParams, form, rules, sys_show_hide, sys_normal_disable } = toRefs(state) const { queryParams, form, rules, sys_show_hide, sys_normal_disable } = toRefs(state)