diff --git a/src/constant/dict.js b/src/constant/dict.js index fcc2dc8..d59e318 100644 --- a/src/constant/dict.js +++ b/src/constant/dict.js @@ -1,21 +1,43 @@ -export const sys_normal_disable = [{ - label: "禁用", - value: "0", - elTagType: "warning" -}, +export const sys_normal_disable = [ { label: "正常", value: "1", elTagType: "success" - }] + }, + { + label: "禁用", + value: "0", + elTagType: "warning" + } +] -export const menu_show_hide = [{ +export const sys_user_gender = [ + { + label: "男", + value: "0", + elTagType: "success" + }, + { + label: "女", + value: "1", + elTagType: "warning" + }, + { + label: "未知", + value: "2", + elTagType: "warning" + } +] + +export const menu_show_hide = [ + { label: "隐藏", value: "0", elTagType: "warning" -}, + }, { label: "显示", value: "1", elTagType: "success" - }] \ No newline at end of file + } +] \ No newline at end of file diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index 4efca08..598f374 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -55,15 +55,17 @@ export function resetForm(refName) { // 添加日期范围 export function addDateRange(params, dateRange, propName) { - let search = params; - search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {}; + let search = JSON.parse(JSON.stringify(params)); dateRange = Array.isArray(dateRange) ? dateRange : []; + if(dateRange.length < 2){ + return search; + } if (typeof (propName) === 'undefined') { - search.params['beginTime'] = dateRange[0]; - search.params['endTime'] = dateRange[1]; + search['beginTime'] = dateRange[0] + ' 00:00:00'; + search['endTime'] = dateRange[1] + ' 23:59:59'; } else { - search.params['begin' + propName] = dateRange[0]; - search.params['end' + propName] = dateRange[1]; + search['begin' + propName] = dateRange[0] + ' 00:00:00'; + search['end' + propName] = dateRange[1] + ' 23:59:59'; } return search; } diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index f168190..6a24a16 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -155,7 +155,6 @@ import {addDept, delDept, getDept, listDept, listDeptExcludeChild, updateDept} f import {sys_normal_disable} from "@/constant/dict"; const {proxy} = getCurrentInstance(); -// const { sys_normal_disable } = proxy.useDict("sys_normal_disable"); const deptList = ref([]); const open = ref(false); diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index 21bae99..ea0ffe5 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -10,16 +10,16 @@ @keyup.enter="handleQuery" /> - - - - - - - - - - + + + + + 搜索 重置 @@ -309,7 +309,7 @@ import SvgIcon from "@/components/SvgIcon"; import IconSelect from "@/components/IconSelect"; import {ClickOutside as vClickOutside} from 'element-plus' import {menu_show_hide} from "@/constant/dict"; - +import {sys_normal_disable} from "@/constant/dict"; const {proxy} = getCurrentInstance(); const menuList = ref([]); diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index 6fd1b64..f569dd1 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -146,9 +146,9 @@ diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index d6cfdd6..eaff778 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -29,18 +29,18 @@ - + - + - - - - + + + + @@ -183,27 +183,27 @@ - - + + - - + + + + - - + + @@ -214,25 +214,39 @@ - - + + - - + + + + - - + + @@ -251,29 +265,13 @@ - - - - + + - - - - + + @@ -332,10 +330,9 @@