From 7de94e2ea37803216e5afe9d40e7121c87a5344e Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期四, 24 四月 2025 14:21:14 +0800
Subject: [PATCH] 富文本复制粘贴图片上传至url
---
src/views/system/user/index.vue | 41 +++++++++++++++++++++++++++++------------
1 files changed, 29 insertions(+), 12 deletions(-)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 6e9ac9f..4144812 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -1,9 +1,9 @@
<template>
<div class="app-container">
<el-row :gutter="20">
- <splitpanes class="default-theme">
+ <splitpanes :horizontal="appStore.device === 'mobile'" class="default-theme">
<!--閮ㄩ棬鏁版嵁-->
- <pane size="15">
+ <pane size="16">
<el-col>
<div class="head-container">
<el-input v-model="deptName" placeholder="璇疯緭鍏ラ儴闂ㄥ悕绉�" clearable prefix-icon="Search" style="margin-bottom: 20px" />
@@ -14,8 +14,8 @@
</el-col>
</pane>
<!--鐢ㄦ埛鏁版嵁-->
- <pane>
- <el-col size="85">
+ <pane size="84">
+ <el-col>
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="鐢ㄦ埛鍚嶇О" prop="userName">
<el-input v-model="queryParams.userName" placeholder="璇疯緭鍏ョ敤鎴峰悕绉�" clearable style="width: 240px" @keyup.enter="handleQuery" />
@@ -112,7 +112,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="褰掑睘閮ㄩ棬" prop="deptId">
- <el-tree-select v-model="form.deptId" :data="deptOptions" :props="{ value: 'id', label: 'label', children: 'children' }" value-key="id" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" check-strictly />
+ <el-tree-select v-model="form.deptId" :data="enabledDeptOptions" :props="{ value: 'id', label: 'label', children: 'children' }" value-key="id" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" check-strictly />
</el-form-item>
</el-col>
</el-row>
@@ -215,11 +215,13 @@
<script setup name="User">
import { getToken } from "@/utils/auth";
+import useAppStore from '@/store/modules/app'
import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser, addUser, deptTreeSelect } from "@/api/system/user";
import { Splitpanes, Pane } from "splitpanes"
import "splitpanes/dist/splitpanes.css"
const router = useRouter();
+const appStore = useAppStore()
const { proxy } = getCurrentInstance();
const { sys_normal_disable, sys_user_sex } = proxy.useDict("sys_normal_disable", "sys_user_sex");
@@ -235,6 +237,7 @@
const dateRange = ref([]);
const deptName = ref("");
const deptOptions = ref(undefined);
+const enabledDeptOptions = ref(undefined);
const initPassword = ref(undefined);
const postOptions = ref([]);
const roleOptions = ref([]);
@@ -296,13 +299,6 @@
proxy.$refs["deptTreeRef"].filter(val);
});
-/** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
-function getDeptTree() {
- deptTreeSelect().then(response => {
- deptOptions.value = response.data;
- });
-};
-
/** 鏌ヨ鐢ㄦ埛鍒楄〃 */
function getList() {
loading.value = true;
@@ -313,6 +309,27 @@
});
};
+/** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */
+function getDeptTree() {
+ deptTreeSelect().then(response => {
+ deptOptions.value = response.data;
+ enabledDeptOptions.value = filterDisabledDept(JSON.parse(JSON.stringify(response.data)));
+ });
+};
+
+/** 杩囨护绂佺敤鐨勯儴闂� */
+function filterDisabledDept(deptList) {
+ return deptList.filter(dept => {
+ if (dept.disabled) {
+ return false;
+ }
+ if (dept.children && dept.children.length) {
+ dept.children = filterDisabledDept(dept.children);
+ }
+ return true;
+ });
+};
+
/** 鑺傜偣鍗曞嚮浜嬩欢 */
function handleNodeClick(data) {
queryParams.value.deptId = data.id;
--
Gitblit v1.9.3