From daf3f540a4ad9a9917edf42853c92c39221647fe Mon Sep 17 00:00:00 2001
From: Kven <2955163637@qq.com>
Date: Mon, 6 Jan 2025 11:29:35 +0800
Subject: [PATCH] =?UTF-8?q?perf(=E6=B6=88=E6=81=AF=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97):=20=E6=8D=A2=E5=8A=A8?=
=?UTF-8?q?=E6=80=81=E8=A1=A8=E5=8D=95=E4=B8=BA=E9=9D=99=E6=80=81=E8=A1=A8?=
=?UTF-8?q?=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../message/components/message-edit.vue | 295 +++++++++---------
1 file changed, 139 insertions(+), 156 deletions(-)
diff --git a/src/views/system/message/components/message-edit.vue b/src/views/system/message/components/message-edit.vue
index e2a1867..bfcb000 100644
--- a/src/views/system/message/components/message-edit.vue
+++ b/src/views/system/message/components/message-edit.vue
@@ -20,116 +20,103 @@
@cancel="handleCancel"
>
{{ modalTitle }}
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
取消
确定
@@ -143,7 +130,7 @@
@cancel="deptTreeCancel"
>
发送用户
-
+
+ 全选
([]);
-
+ const editorRef = shallowRef()
+ const handleCreated = (editor: any) => {
+ editorRef.value = editor; // 记录 editor 实例,重要!
+ }
const CreateRef = ref();
const formData = ref({
...props.prem,
});
const messageStore = useMessageStore();
- const editorRef = shallowRef()
const isFullScreen = ref(false);
const mode = 'default';
const selectedIds= ref([]);
const toolbarConfig = { excludeKeys: ['uploadVideo', 'insertImage','insertVideo']}
- // const handleCreated = (editor: any) => {
- // editorRef.value = editor; // 记录 editor 实例,重要!
- // // 监听全屏事件
- // editor.on('fullScreen', () => {
- // })
- // }
const columns = computed(()=>[
{
title: '操作',
@@ -230,46 +214,45 @@
},
])
- const fieIds = ref(
- {
- userId:{
- label: '用戶',
- component: 'input',
- type:'text'
- },
- title:{
- label: '标题',
- component: 'input',
- type:'text'
- },
- remark:{
- label: '备注',
- component: 'input',
- type:'text'
- },
- sms:{
- label: '短信',
- component: 'switch',
- type:'switch'
- },
- email:{
- label: '邮件',
- component:'switch',
- type:'switch'
- },
- attachmentIds:{
- label: '附件',
- component: 'input',
- type:'text'
- },
- richEditor:{
- label: '内容',
- component: 'input',
- type:'text'
- },
- },
- );
- const { userId, title, remark, sms, email, richEditor } = fieIds.value;
+ // const fieIds = ref(
+ // {
+ // userId:{
+ // label: '用戶',
+ // component: 'input',
+ // type:'text'
+ // },
+ // title:{
+ // label: '标题',
+ // component: 'input',
+ // type:'text'
+ // },
+ // remark:{
+ // label: '备注',
+ // component: 'input',
+ // type:'text'
+ // },
+ // sms:{
+ // label: '短信',
+ // component: 'switch',
+ // type:'switch'
+ // },
+ // email:{
+ // label: '邮件',
+ // component:'switch',
+ // type:'switch'
+ // },
+ // attachmentIds:{
+ // label: '附件',
+ // component: 'input',
+ // type:'text'
+ // },
+ // richEditor:{
+ // label: '内容',
+ // component: 'input',
+ // type:'text'
+ // },
+ // },
+ // );
const deptTreeData = reactive([
{
key: '1',
@@ -311,9 +294,10 @@
// 广度优先遍历树,获取选中的成员
const getSelectedMembers = (treeData: any[], selectedKeys: string[]) => {
- const queue = [...treeData];
+ const queue:any = [...treeData];
const selectedMembers: any[] = [];
while (queue.length > 0) {
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const node = queue.shift()!;
if (selectedKeys.includes(node.key)) {
if (node.members) {
@@ -334,7 +318,7 @@
if (key[0] === '1' || key.length === 0) {
// 广度优先遍历树,获取所有成员
const allMembers: any[] = [];
- const queue = [...deptTreeData];
+ const queue:any = [...deptTreeData];
while (queue.length > 0) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const node = queue.shift()!;
@@ -433,7 +417,6 @@
const deptTreeSubmit = () => {
deptVisible.value = false;
formData.value.userIds = selectedIds.value;
- console.log(formData.value.userIds);
};
// 部门树模态框