perf: 支持企业微信群聊机器人通知

This commit is contained in:
xiaojunnuo
2024-11-23 23:58:31 +08:00
parent 5450246f06
commit b805a29259
19 changed files with 163 additions and 41 deletions
@@ -41,7 +41,7 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
}
//字段配置赋值
columnsRef.value[key] = column;
console.log("form", columnsRef.value);
console.log("form", columnsRef.value, form);
});
}
@@ -74,7 +74,7 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
}
},
type: {
title: "类型",
title: "通知类型",
type: "dict-select",
dict: notificationTypeDictRef,
search: {
@@ -100,7 +100,7 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
return option.value.toLowerCase().indexOf(input) >= 0 || option.label.toLowerCase().indexOf(input) >= 0;
}
},
rules: [{ required: true, message: "请选择类型" }],
rules: [{ required: true, message: "请选择通知类型" }],
valueChange: {
immediate: true,
async handle({ value, mode, form, immediate }) {
@@ -110,6 +110,7 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
const define = await api.GetProviderDefine(value);
currentDefine.value = define;
console.log("define", define);
debugger;
if (!immediate) {
form.body = {};
}
@@ -123,9 +124,6 @@ export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
}
return define.desc;
})
},
addForm: {
value: typeRef
}
} as ColumnCompositionProps,
setting: {
@@ -23,6 +23,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
const addRequest = async (req: AddReq) => {
const { form } = req;
debugger;
const res = await api.AddObj(form);
return res;
};
@@ -13,7 +13,6 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
const editRequest = async (req: EditReq) => {
const { form, row } = req;
form.id = row.id;
form.type = props.type;
const res = await context.api.UpdateObj(form);
lastResRef.value = res;
return res;
@@ -25,7 +24,6 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
const addRequest = async (req: AddReq) => {
const { form } = req;
form.type = props.type;
const res = await context.api.AddObj(form);
lastResRef.value = res;
return res;
@@ -68,7 +68,7 @@ const pipelineOptions: PipelineOptions = {
const pipelineOptionsRef: Ref<PipelineOptions> = ref(pipelineOptions);
const editMode = ref(false);
if (route.query.editMode !== "false") {
if (route.query.editMode === "true") {
editMode.value = true;
}