@@ -50,9 +50,7 @@ onMounted(() => {
diff --git a/yudao-ui-admin-vue3/src/components/Crontab/src/Crontab.vue b/yudao-ui-admin-vue3/src/components/Crontab/src/Crontab.vue
index 8446ed212..a5a9e56a6 100644
--- a/yudao-ui-admin-vue3/src/components/Crontab/src/Crontab.vue
+++ b/yudao-ui-admin-vue3/src/components/Crontab/src/Crontab.vue
@@ -2,9 +2,6 @@
import {
ElInput,
ElInputNumber,
- ElDropdown,
- ElDropdownMenu,
- ElDropdownItem,
ElDialog,
ElTabs,
ElTabPane,
@@ -352,14 +349,19 @@ onMounted(() => {
defaultValue.value = props.modelValue
})
const emit = defineEmits(['update:modelValue'])
-const handleShortcuts = (command) => {
- if (command == 'custom') {
- open()
- } else {
- defaultValue.value = command
- emit('update:modelValue', defaultValue.value)
+const select = ref()
+watch(
+ () => select.value,
+ () => {
+ console.info(select.value)
+ if (select.value == 'custom') {
+ open()
+ } else {
+ defaultValue.value = select.value
+ emit('update:modelValue', defaultValue.value)
+ }
}
-}
+)
const open = () => {
set()
dialogVisible.value = true
@@ -510,37 +512,23 @@ const submit = () => {
}
-
+
-
- 生成器
-
-
- 每分钟
- 每小时
- 每天零点
- 每月一号零点
- 每月最后一天零点
- 每周星期日零点
-
- {{ item.text }}
-
-
- 自定义
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -1015,8 +1003,10 @@ const submit = () => {
background: var(--el-color-primary);
color: #fff;
}
-
[data-theme='dark'] .sc-cron-num h4 {
background: var(--el-color-white);
}
+.input-with-select .el-input-group__prepend {
+ background-color: var(--el-fill-color-blank);
+}
diff --git a/yudao-ui-admin-vue3/src/components/UploadFile/index.ts b/yudao-ui-admin-vue3/src/components/UploadFile/index.ts
new file mode 100644
index 000000000..d851bdde1
--- /dev/null
+++ b/yudao-ui-admin-vue3/src/components/UploadFile/index.ts
@@ -0,0 +1,3 @@
+import UploadImg from './src/UploadImg.vue'
+
+export { UploadImg }
diff --git a/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadImg.vue b/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadImg.vue
new file mode 100644
index 000000000..fd85b7198
--- /dev/null
+++ b/yudao-ui-admin-vue3/src/components/UploadFile/src/UploadImg.vue
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
diff --git a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts
index 3358db7fb..e6b137505 100644
--- a/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts
+++ b/yudao-ui-admin-vue3/src/hooks/web/useVxeCrudSchemas.ts
@@ -150,7 +150,7 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => {
const searchSchemaItem = {
// 默认为 input
- folding: searchSchema.length > spanLength,
+ folding: searchSchema.length > spanLength - 1,
itemRender: schemaItem.itemRender ? schemaItem.itemRender : itemRender,
field: schemaItem.field,
title: schemaItem.search?.title || schemaItem.title,
@@ -165,7 +165,7 @@ const filterSearchSchema = (crudSchema: VxeCrudSchema): VxeFormItemProps[] => {
const buttons: VxeFormItemProps = {
span: 24,
align: 'center',
- collapseNode: searchSchema.length > spanLength + 1,
+ collapseNode: searchSchema.length > spanLength,
itemRender: {
name: '$buttons',
children: [
@@ -185,10 +185,10 @@ const filterTableSchema = (crudSchema: VxeCrudSchema): VxeGridPropTypes.Columns
const tableSchema: VxeGridPropTypes.Columns = []
// 主键ID
if (crudSchema.primaryKey && crudSchema.primaryType) {
- const primaryWidth =
- (crudSchema.primaryTitle ? crudSchema.primaryTitle : t('common.index')).length * 20 + 'px'
+ const primaryTitle = crudSchema.primaryTitle ? crudSchema.primaryTitle : t('common.index')
+ const primaryWidth = primaryTitle.length * 30 + 'px'
const tableSchemaItem = {
- title: crudSchema.primaryTitle ? crudSchema.primaryTitle : t('common.index'),
+ title: primaryTitle,
field: crudSchema.primaryKey,
type: crudSchema.primaryType ? crudSchema.primaryType : null,
width: primaryWidth
diff --git a/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts b/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
index 14e69966e..af930b7ce 100644
--- a/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
+++ b/yudao-ui-admin-vue3/src/hooks/web/useVxeGrid.ts
@@ -44,7 +44,7 @@ export const useVxeGrid = (config?: UseVxeGridConfig) => {
/**
* grid options 初始化
*/
- const gridOptions = reactive({
+ const gridOptions = reactive>({
loading: true,
size: currentSize as any,
height: 730, // 1080高度
@@ -87,6 +87,15 @@ export const useVxeGrid = (config?: UseVxeGridConfig) => {
resolve(await config?.getListApi(queryParams))
})
},
+ delete: ({ body }) => {
+ return new Promise(async (resolve) => {
+ if (config?.deleteApi) {
+ resolve(await config?.deleteApi(JSON.stringify(body)))
+ } else {
+ Promise.reject('未设置deleteApi')
+ }
+ })
+ },
queryAll: ({ form }) => {
const queryParams = Object.assign({}, JSON.parse(JSON.stringify(form)))
return new Promise(async (resolve) => {
@@ -196,16 +205,12 @@ export const useVxeGrid = (config?: UseVxeGridConfig) => {
}
await nextTick()
return new Promise(async () => {
- message
- .delConfirm()
- .then(() => {
- config?.deleteApi && config?.deleteApi(ids)
- message.success(t('common.delSuccess'))
- })
- .finally(async () => {
- // 刷新列表
- ref.value.commitProxy('query')
- })
+ message.delConfirm().then(async () => {
+ await (config?.deleteApi && config?.deleteApi(ids))
+ message.success(t('common.delSuccess'))
+ // 刷新列表
+ ref.value.commitProxy('query')
+ })
})
}
/**
diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts b/yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts
index 1e493dd68..95316e4ad 100644
--- a/yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts
+++ b/yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts
@@ -175,6 +175,14 @@ VXETable.formats.mixin({
// 格式化图片,将图片链接转换为html标签
formatImg({ cellValue }) {
return ' '
+ },
+ // 格式化文件大小
+ formatSize({ cellValue }, digits = 0) {
+ const unitArr = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
+ const srcSize = parseFloat(cellValue)
+ const index = Math.floor(Math.log(srcSize) / Math.log(1024))
+ const size = srcSize / Math.pow(1024, index)
+ return XEUtils.toFixed(XEUtils.floor(size, 2), 2) + ' ' + unitArr[digits]
}
})
export const setupVxeTable = (app: App) => {
diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataPicker.tsx b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataPicker.tsx
new file mode 100644
index 000000000..6a1c1d8f2
--- /dev/null
+++ b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataPicker.tsx
@@ -0,0 +1,20 @@
+import { ElDatePicker } from 'element-plus'
+import { VXETable } from 'vxe-table'
+
+// 日期区间选择渲染
+VXETable.renderer.add('XDataPicker', {
+ // 默认显示模板
+ renderItemContent(renderOpts, params) {
+ const { data, field } = params
+ const { content } = renderOpts
+ return (
+
+ )
+ }
+})
diff --git a/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataTimePicker.tsx b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataTimeRangePicker.tsx
similarity index 95%
rename from yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataTimePicker.tsx
rename to yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataTimeRangePicker.tsx
index 0b5166742..6f6b9aec2 100644
--- a/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataTimePicker.tsx
+++ b/yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataTimeRangePicker.tsx
@@ -12,8 +12,8 @@ VXETable.renderer.add('XDataTimePicker', {
return (
-
{{ t('common.save') }}
-
{{ t('common.reset') }}
+
+
diff --git a/yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/sms.template.data.ts b/yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/sms.template.data.ts
index 81aa02f0a..c088485bc 100644
--- a/yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/sms.template.data.ts
+++ b/yudao-ui-admin-vue3/src/views/system/sms/smsTemplate/sms.template.data.ts
@@ -48,6 +48,7 @@ const crudSchemas = reactive
({
field: 'type',
dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
dictClass: 'number',
+ isSearch: true,
table: {
width: 80
}
@@ -57,6 +58,7 @@ const crudSchemas = reactive({
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictClass: 'number',
+ isSearch: true,
table: {
width: 80
}
diff --git a/yudao-ui-admin-vue3/src/views/system/tenant/tenant.data.ts b/yudao-ui-admin-vue3/src/views/system/tenant/tenant.data.ts
index d9e103956..96d62e261 100644
--- a/yudao-ui-admin-vue3/src/views/system/tenant/tenant.data.ts
+++ b/yudao-ui-admin-vue3/src/views/system/tenant/tenant.data.ts
@@ -123,7 +123,13 @@ const crudSchemas = reactive({
title: t('table.createTime'),
field: 'createTime',
formatter: 'formatDate',
- isForm: false
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
}
]
})
diff --git a/yudao-ui-admin-vue3/src/views/system/tenantPackage/tenantPackage.data.ts b/yudao-ui-admin-vue3/src/views/system/tenantPackage/tenantPackage.data.ts
index c68bd20f9..32cc19704 100644
--- a/yudao-ui-admin-vue3/src/views/system/tenantPackage/tenantPackage.data.ts
+++ b/yudao-ui-admin-vue3/src/views/system/tenantPackage/tenantPackage.data.ts
@@ -43,6 +43,7 @@ const crudSchemas = reactive({
title: t('form.remark'),
field: 'remark',
isTable: false,
+ isSearch: true,
form: {
component: 'Input',
componentProps: {
@@ -58,7 +59,13 @@ const crudSchemas = reactive({
title: '创建时间',
field: 'createTime',
formatter: 'formatDate',
- isForm: false
+ isForm: false,
+ search: {
+ show: true,
+ itemRender: {
+ name: 'XDataTimePicker'
+ }
+ }
}
]
})
diff --git a/yudao-ui-admin-vue3/src/views/system/user/index.vue b/yudao-ui-admin-vue3/src/views/system/user/index.vue
index fb1bf729e..db00d4311 100644
--- a/yudao-ui-admin-vue3/src/views/system/user/index.vue
+++ b/yudao-ui-admin-vue3/src/views/system/user/index.vue
@@ -54,8 +54,7 @@
@click="exportList('用户数据.xls')"
/>
-
-
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -199,10 +210,7 @@
-
-
- 点击下载
-
+
{
deptId.value = null
postIds.value = []
await nextTick()
- // TODO 星语:要不要这个放到新增里?这样和 handleUpdate 统一一点
if (allSchemas.formSchema[0].field !== 'username') {
unref(formRef)?.addSchema(
{
diff --git a/yudao-ui-admin-vue3/src/views/system/user/user.data.ts b/yudao-ui-admin-vue3/src/views/system/user/user.data.ts
index 5ba7b7fde..33db0c01c 100644
--- a/yudao-ui-admin-vue3/src/views/system/user/user.data.ts
+++ b/yudao-ui-admin-vue3/src/views/system/user/user.data.ts
@@ -26,7 +26,7 @@ const crudSchemas = reactive({
primaryType: 'seq',
primaryTitle: '用户编号',
action: true,
- actionWidth: '400px',
+ actionWidth: '200px',
columns: [
{
title: '用户账号',
@@ -70,7 +70,12 @@ const crudSchemas = reactive({
field: 'status',
dictType: DICT_TYPE.COMMON_STATUS,
dictClass: 'number',
- isSearch: true
+ isSearch: true,
+ table: {
+ slots: {
+ default: 'status_default'
+ }
+ }
},
{
title: '最后登录时间',
diff --git a/yudao-ui-admin/package.json b/yudao-ui-admin/package.json
index a008beab9..c863e0c61 100644
--- a/yudao-ui-admin/package.json
+++ b/yudao-ui-admin/package.json
@@ -60,7 +60,7 @@
"screenfull": "5.0.2",
"sortablejs": "1.10.2",
"throttle-debounce": "2.1.0",
- "vue": "2.7.0",
+ "vue": "2.7.14",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.8",
"vue-meta": "^2.4.0",
diff --git a/yudao-ui-admin/src/store/modules/permission.js b/yudao-ui-admin/src/store/modules/permission.js
index 3316e945f..a9dbd2b41 100644
--- a/yudao-ui-admin/src/store/modules/permission.js
+++ b/yudao-ui-admin/src/store/modules/permission.js
@@ -62,7 +62,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
route.name = toCamelCase(route.path, true)
// 处理三级及以上菜单路由缓存问题,将path名字赋值给name
if (route.path.indexOf("/") !== -1) {
- var pathArr = route.path.split("/")
+ const pathArr = route.path.split("/");
route.name = toCamelCase(pathArr[pathArr.length - 1], true)
}
route.hidden = !route.visible
@@ -91,7 +91,7 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
}
function filterChildren(childrenMap, lastRouter = false) {
- var children = []
+ let children = [];
childrenMap.forEach((el, index) => {
if (el.children && el.children.length) {
if (!el.component && !lastRouter) {
diff --git a/yudao-ui-admin/src/views/system/oauth2/token/index.vue b/yudao-ui-admin/src/views/system/oauth2/token/index.vue
index 7f56c6465..797904d4b 100644
--- a/yudao-ui-admin/src/views/system/oauth2/token/index.vue
+++ b/yudao-ui-admin/src/views/system/oauth2/token/index.vue
@@ -6,6 +6,9 @@
+
+
+