Explorar o código

fix:表单发布字段列表增加创建时间选项

全蛋 hai 4 meses
pai
achega
f2a36099d4

+ 9 - 1
src/components/CreateCodeStep/src/ViewDesignStep.vue

@@ -498,6 +498,8 @@
   });
   const { notification } = useMessage();
   const generatorConfig = inject<GeneratorConfig>('generatorConfig') as GeneratorConfig;
+  console.log('generatorConfig', generatorConfig);
+  // generatorConfig!.formJson!.list.push()
   const current = inject<Ref<number>>('current') as Ref<number>;
   const designType = inject<string>('designType', '');
   const tableInfo = inject<Ref<TableInfo[]>>('tableInfo', ref([]));
@@ -1007,6 +1009,7 @@
                 columns.splice(oldIndex, 1);
               }
               generatorConfig!.listConfig!.columnConfigs = cloneDeep(columns);
+              console.log(generatorConfig!.listConfig!.columnConfigs);
               columnTableKey.value++;
             },
           });
@@ -1174,7 +1177,12 @@
   };
 
   const selectOption = computed(() => {
-    return filterMainComponent(generatorConfig?.formJson?.list);
+    const list = filterMainComponent(generatorConfig?.formJson?.list);
+    list.push({
+      label: '创建时间',
+      value: 'create_date',
+    });
+    return list;
   });
 
   const querySelectOption = computed(() => {

+ 1 - 1
src/components/Form/src/components/SubForm.vue

@@ -379,7 +379,7 @@
       });
       if (props.uniqueKey) {
         //     判断是否data.value里有相同的数据
-        const isExist = data.value.some((item) => item[props.uniqueKey] === x[mapIndex]);
+        const isExist = data.value.some((item) => item[props.uniqueKey!] === x[mapIndex]);
         if (!isExist) {
           data.value.push(dataObj);
         }

+ 1 - 1
src/views/educational/textbookSubscription/components/view.vue

@@ -75,7 +75,7 @@
   const { createMessage } = useMessage();
   const handleExport = async () => {
     try {
-      const data = await postWfTextbookSubscriptionTextbookSubscriptionExportQuery({
+      const data: any = await postWfTextbookSubscriptionTextbookSubscriptionExportQuery({
         wfTextbookSubscriptionId: itemId.value,
       });
       downloadByData(