Pārlūkot izejas kodu

fix: change course statistics

DESKTOP-USV654P\pc 2 nedēļas atpakaļ
vecāks
revīzija
da962e7cc5

+ 28 - 0
src/views/educational/class/data.config.ts

@@ -138,6 +138,13 @@ export const searchFormSchema: FormSchema[] = [
       getPopupContainer: () => document.body,
       api: requestMagicApi,
       params: { url: 'baseData/classroom/option' },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
     },
     colProps: { span: 8 },
   },
@@ -190,6 +197,13 @@ export const searchFormSchema: FormSchema[] = [
       getPopupContainer: () => document.body,
       api: requestMagicApi,
       params: { url: 'baseData/user/list?type=1' },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
     },
     colProps: { span: 8 },
   },
@@ -279,6 +293,13 @@ export const formSchema: FormSchema[] = [
       getPopupContainer: () => document.body,
       api: requestMagicApi,
       params: { url: 'baseData/classroom/option' },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
     },
     colProps: { span: 12 },
   },
@@ -335,6 +356,13 @@ export const formSchema: FormSchema[] = [
       getPopupContainer: () => document.body,
       api: requestMagicApi,
       params: { url: 'baseData/user/list?type=1' },
+      showSearch: true,
+      filterOption: (input: string, option: any) => {
+        return (
+          option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
+          option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
     },
     colProps: { span: 12 },
   },

+ 17 - 6
src/views/materialManager/taskTodoList/components/data.config.ts

@@ -4,6 +4,7 @@ import { BasicColumn } from '/@/components/Table';
 import { getMaterialtypeList } from '/@/services/apis/MaterialTypeController';
 import { h } from 'vue';
 import { Tinymce } from '/@/components/Tinymce';
+import { getDepartmentTree } from '/@/api/system/department';
 export const TableColumns: BasicColumn[] = [
   {
     title: '任务名称',
@@ -296,12 +297,22 @@ export const ViewSearchSchema: FormSchema[] = [
     component: 'Input',
     colProps: { span: 8 },
   },
-  // {
-  //   label: '机构/行政班',
-  //   field: 'deptName',
-  //   component: 'Input',
-  //   colProps: { span: 8 },
-  // },
+  {
+    field: 'deptId',
+    label: '所属部门',
+    component: 'ApiTreeSelect',
+    componentProps: {
+      api: getDepartmentTree,
+      fieldNames: {
+        label: 'name',
+        key: 'id',
+        value: 'id',
+      },
+      multiple: false,
+      getPopupContainer: () => document.body,
+    },
+    colProps: { span: 8 },
+  },
 ];
 
 export const auditSchema: FormSchema[] = [

+ 3 - 1
src/views/materialManager/taskTodoList/components/viewModal.vue

@@ -100,7 +100,7 @@
     emit('success');
   };
   const [auditModalReg, { openModal }] = useModal();
-  const [tableReg, { reload, clearSelectedRowKeys }] = useTable({
+  const [tableReg, { reload, clearSelectedRowKeys, getForm }] = useTable({
     rowKey: 'id',
     api: getMaterialtaskAssignList,
     columns: TodoList,
@@ -140,12 +140,14 @@
   const handelExport = async () => {
     try {
       setModalProps({ loading: true });
+      const values = getForm().getFieldsValue();
       const postData = {
         materialTaskId: taskDataInfo.value.id,
         state: status.value,
         limit: 1,
         size: 10,
       };
+      Object.assign(postData, values);
       const data = await postMaterialtaskExportQuery(postData);
       downloadByData(data.data, `材料列表${formatToDateTime(new Date(), 'YYYYMMDDHHmmss')}.xlsx`);
     } finally {