소스 검색

fix(template): template debug configID

lind 3 년 전
부모
커밋
95d89c8249
2개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/pages/notice/Template/Debug/index.tsx
  2. 1 0
      src/pages/notice/Template/typings.d.ts

+ 2 - 0
src/pages/notice/Template/Debug/index.tsx

@@ -102,6 +102,7 @@ const Debug = observer(() => {
     // 从后端接口来获取变量参数
     service.getVariableDefinitions(state.current?.id || '').then((resp) => {
       const _template = resp.result;
+      console.log(resp, 'userEfffect', state.current);
       if (_template?.variableDefinitions?.length > 0) {
         variableRef.current = _template?.variableDefinitions;
         form.setFieldState('variableDefinitions', (state1) => {
@@ -149,6 +150,7 @@ const Debug = observer(() => {
         title: '通知配置',
         type: 'string',
         required: true,
+        default: state?.current?.configId,
         'x-decorator': 'FormItem',
         'x-component': 'Select',
         'x-reactions': '{{useAsyncDataSource(getConfig)}}',

+ 1 - 0
src/pages/notice/Template/typings.d.ts

@@ -8,6 +8,7 @@ type TemplateItem = {
   createTime: number;
   variableDefinitions: any;
   description: string;
+  configId?: string;
 };
 
 type LogItem = {