|
@@ -219,6 +219,7 @@ option.value = Object.assign(option.value, {
|
|
|
{
|
|
|
label: "发送部门",
|
|
|
prop: "deptIds",
|
|
|
+ overHidden: true,
|
|
|
type: "tree",
|
|
|
dicData: deptList, // 使用树形结构数据
|
|
|
props: {
|
|
@@ -230,18 +231,26 @@ option.value = Object.assign(option.value, {
|
|
|
showCheckbox: true, // 显示复选框
|
|
|
search: true,
|
|
|
valueformat: "array", // 确保值是数组格式
|
|
|
+ // nodeKey: "id",
|
|
|
+ // formatter: (row) => {
|
|
|
+ // if (!row.deptIds) return "";
|
|
|
+ // return row.deptIds.map(id => {
|
|
|
+ // const dept = findDeptById(deptList.value, id);
|
|
|
+ // return dept ? dept.deptName : id;
|
|
|
+ // }).join(", ");
|
|
|
+ // }
|
|
|
},
|
|
|
{
|
|
|
label: "消息组织",
|
|
|
prop: "messageOrgIds",
|
|
|
type: "select",
|
|
|
dicData: messageOrgList, // 组织列表
|
|
|
+ overHidden: true,
|
|
|
props: {
|
|
|
label: "messageOrgName",
|
|
|
value: "id",
|
|
|
},
|
|
|
multiple: true, // 支持多选
|
|
|
- hide: true,
|
|
|
},
|
|
|
{
|
|
|
label: "消息内容",
|
|
@@ -278,6 +287,17 @@ option.value = Object.assign(option.value, {
|
|
|
],
|
|
|
});
|
|
|
|
|
|
+// const findDeptById = (nodes, id) => {
|
|
|
+// // 递归查找部门
|
|
|
+// for (const node of nodes) {
|
|
|
+// if (node.id === id) return node;
|
|
|
+// if (node.children) {
|
|
|
+// const found = findDeptById(node.children, id);
|
|
|
+// if (found) return found;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// return null;
|
|
|
+// };
|
|
|
const onSelectedFinish = (selectedRowIds) => {
|
|
|
form.value.receiveUsers = selectedRowIds;
|
|
|
console.log(selectedRowIds, form.value);
|
|
@@ -296,6 +316,7 @@ onMounted(() => {
|
|
|
}
|
|
|
if (item.prop === "receiveUsers") {
|
|
|
item.addDisplay = messageType.value === "0";
|
|
|
+ item.editDisplay = messageType.value === "0";
|
|
|
}
|
|
|
if (item.prop === "deptIds") {
|
|
|
item.viewDisplay = false;
|