|
|
|
@ -6,7 +6,7 @@ import { Button, message, Input, Drawer, Modal, Col, Row, Space, Upload, Form }
|
|
|
|
|
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
|
|
|
|
|
import type { ProColumns, ActionType } from '@ant-design/pro-table';
|
|
|
|
|
import ProTable from '@ant-design/pro-table';
|
|
|
|
|
import { BetaSchemaForm, ModalForm, ProFormText, ProFormTextArea } from '@ant-design/pro-form';
|
|
|
|
|
import { BetaSchemaForm, ModalForm, ProFormColumnsType, ProFormText, ProFormTextArea } from '@ant-design/pro-form';
|
|
|
|
|
import type { ProDescriptionsItemProps } from '@ant-design/pro-descriptions';
|
|
|
|
|
import ProDescriptions from '@ant-design/pro-descriptions';
|
|
|
|
|
import type { FormValueType } from './components/UpdateForm';
|
|
|
|
@ -95,7 +95,7 @@ const ExaminationList: React.FC = () => {
|
|
|
|
|
const [selectedRowsState, setSelectedRows] = useState<TableListItem[]>([]);
|
|
|
|
|
|
|
|
|
|
/** 列表项定义 */
|
|
|
|
|
const columns: ProColumns<TableListItem>[] = [
|
|
|
|
|
const columns: ProFormColumnsType<DataItem>[] = [
|
|
|
|
|
{
|
|
|
|
|
title: '序号',
|
|
|
|
|
key: 'index',
|
|
|
|
@ -153,7 +153,7 @@ const ExaminationList: React.FC = () => {
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
request: async () => {
|
|
|
|
|
const { data: Items } = await querySubjectList({});
|
|
|
|
|
const { data: Items } = await querySubjectList({page_size:1000});
|
|
|
|
|
// console.log(Items, ')))');
|
|
|
|
|
|
|
|
|
|
const sinfo = []
|
|
|
|
@ -176,25 +176,21 @@ const ExaminationList: React.FC = () => {
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: '关联的规则',
|
|
|
|
|
dataIndex: 'subject_id2',
|
|
|
|
|
valueType: 'text',
|
|
|
|
|
dataIndex: 'rule_id',
|
|
|
|
|
valueType: 'select',
|
|
|
|
|
hideInTable: true,
|
|
|
|
|
hideInForm: false,
|
|
|
|
|
hideInSearch: true,
|
|
|
|
|
request: async (e, a) => {
|
|
|
|
|
console.log(e, a, 'OOOOOOOOO');
|
|
|
|
|
|
|
|
|
|
const { data: Items } = await queryRulesList({});
|
|
|
|
|
// console.log(Items, ')))');
|
|
|
|
|
|
|
|
|
|
const sinfo = []
|
|
|
|
|
for (let i = 0; i < Items.list.length; i++) {
|
|
|
|
|
// console.log(Items.list[i], ">>>")
|
|
|
|
|
sinfo.push({ label: Items.list[i].subject_name, value: Items.list[i].subject_id })
|
|
|
|
|
dependencies: ['subject_id'],
|
|
|
|
|
request: async (params) => {
|
|
|
|
|
console.log(params, 'params::::');
|
|
|
|
|
const { table_List: Items } = await queryRulesList({rules_type: 1, subject_id: params.subject_id,});
|
|
|
|
|
const rules = [];
|
|
|
|
|
for (let i = 0; i < Items.length; i++) {
|
|
|
|
|
rules.push({ label: Items[i].rules_name, value: Items[i].id })
|
|
|
|
|
}
|
|
|
|
|
console.log(sinfo, 'sinfo');
|
|
|
|
|
|
|
|
|
|
return sinfo;
|
|
|
|
|
return rules;
|
|
|
|
|
},
|
|
|
|
|
formItemProps: {
|
|
|
|
|
rules: [
|
|
|
|
|