diff --git a/package.json b/package.json index 2d76393..9b26e96 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "dependencies": { "@element-plus/icons-vue": "2.1.0", - "@vueup/vue-quill": "1.1.0", + "@vueup/vue-quill": "1.2.0", "@vueuse/core": "9.5.0", "animate.css": "4.1.1", "await-to-js": "^3.0.0", diff --git a/src/api/monitor/operlog/types.ts b/src/api/monitor/operlog/types.ts index 9a67fa2..10f65c7 100644 --- a/src/api/monitor/operlog/types.ts +++ b/src/api/monitor/operlog/types.ts @@ -1,4 +1,5 @@ export interface OperLogQuery extends PageQuery { + operIp: string; title: string; operName: string; businessType: string; diff --git a/src/api/system/config/index.ts b/src/api/system/config/index.ts index 2eb7b94..e52a256 100644 --- a/src/api/system/config/index.ts +++ b/src/api/system/config/index.ts @@ -20,7 +20,7 @@ export function getConfig(configId: string | number): AxiosPromise { } // 根据参数键名查询参数值 -export function getConfigKey(configKey: string): AxiosPromise { +export function getConfigKey(configKey: string): AxiosPromise { return request({ url: '/system/config/configKey/' + configKey, method: 'get' diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index cb448f5..fdcafc2 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -136,7 +136,7 @@ export const updateUserPwd = (oldPassword: string, newPassword: string) => { headers: { isEncrypt: true }, - params: data + data: data }); }; diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index e695bc6..d47a2bd 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -227,23 +227,4 @@ margin-right: 16px; } } - - // the scroll bar appears when the sub-menu is too long - > .el-menu--popup { - max-height: 100vh; - overflow-y: auto; - - &::-webkit-scrollbar-track-piece { - background: #d3dce6; - } - - &::-webkit-scrollbar { - width: 6px; - } - - &::-webkit-scrollbar-thumb { - background: #99a9bf; - border-radius: 20px; - } - } } diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 6aef16b..b5299b4 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -9,13 +9,13 @@ name="file" :show-file-list="false" :headers="upload.headers" - style="display: none" + ref="uploadRef" v-if="type === 'url'" >
({ headers: globalHeaders(), url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload' }) -const myQuillEditor = ref(); +const quillEditorRef = ref(); const options = ref({ theme: "snow", @@ -86,7 +86,7 @@ const options = ref({ }, } }, - placeholder: '请输入内容', + placeholder: "请输入内容", readOnly: props.readOnly, }); @@ -110,10 +110,10 @@ watch(() => props.modelValue, (v) => { // 图片上传成功返回图片地址 const handleUploadSuccess = (res: any) => { - // 获取富文本实例 - let quill = toRaw(myQuillEditor.value).getQuill(); // 如果上传成功 if (res.code === 200) { + // 获取富文本实例 + let quill = toRaw(quillEditorRef.value).getQuill(); // 获取光标位置 let length = quill.selection.savedRange.index; // 插入图片,res为服务器返回的图片链接地址 @@ -129,6 +129,13 @@ const handleUploadSuccess = (res: any) => { // 图片上传前拦截 const handleBeforeUpload = (file: any) => { + const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"]; + const isJPG = type.includes(file.type); + //检验文件格式 + if (!isJPG) { + proxy?.$modal.msgError(`图片格式错误!`); + return false; + } // 校检文件大小 if (props.fileSize) { const isLt = file.size / 1024 / 1024 < props.fileSize; @@ -149,95 +156,80 @@ const handleUploadError = (err: any) => { diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue index 09036b7..6f7b14f 100644 --- a/src/components/RightToolbar/index.vue +++ b/src/components/RightToolbar/index.vue @@ -7,13 +7,25 @@ - - + +
+ +
显示/隐藏列
+ + +
+
- - -
@@ -29,15 +41,9 @@ const props = defineProps({ gutter: propTypes.number.def(10), }) +const columnRef = ref(); const emits = defineEmits(['update:showSearch', 'queryTable']); -// 显隐数据 -const value = ref>([]); -// 弹出层标题 -const title = ref("显示/隐藏"); -// 是否显示弹出层 -const open = ref(false); - const style = computed(() => { const ret: any = {}; if (props.gutter) { @@ -56,23 +62,19 @@ function refresh() { emits("queryTable"); } -// 右侧列表元素变化 -function dataChange(data: TransferKey[]) { - props.columns?.forEach((item) => { - item.visible = !data.includes(item.key); - }) -} - -// 打开显隐列dialog -const showColumn = () => { - open.value = true; +// 更改数据列的显示和隐藏 +function columnChange(...args: any[]) { + props.columns?.forEach((item) => { + item.visible = args[1].checkedKeys.includes(item.key); + }) } // 显隐列初始默认隐藏列 onMounted(() => { props.columns?.forEach((item) => { - if (!item.visible) { - value.value.push(item.key); + if (item.visible) { + columnRef.value?.setChecked(item.key, true, false); + // value.value.push(item.key); } }) }) @@ -91,4 +93,9 @@ onMounted(() => { .my-el-transfer { text-align: center; } +.tree-header{ + width: 100%; + line-height: 24px; + text-align: center; +} diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index f803f13..204b19b 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -1,6 +1,6 @@