master
zhengpengju 4 years ago
parent 9f9e67f99c
commit d2ffa50cab

@ -83,8 +83,16 @@ export default defineConfig({
{ {
name: '新建主题', name: '新建主题',
icon: 'smile', icon: 'smile',
path: '/course/subject/step', path: '/course/subject/step/update/:id',
component: './course/subject/step', component: './course/subject/step',
hideInMenu: true,
},
{
name: '编辑主题',
icon: 'smile',
path: '/course/subject/step/create',
component: './course/subject/step',
hideInMenu: true,
}, },
{ {
name: '课程设置', name: '课程设置',

@ -1,6 +1,7 @@
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import { Button, message, Input, Drawer } from 'antd'; import { Button, message, Input, Drawer } from 'antd';
import React, { useState, useRef } from 'react'; import React, { useState, useRef } from 'react';
import { history } from 'umi';
import { PageContainer, FooterToolbar } from '@ant-design/pro-layout'; import { PageContainer, FooterToolbar } from '@ant-design/pro-layout';
import type { ProColumns, ActionType } from '@ant-design/pro-table'; import type { ProColumns, ActionType } from '@ant-design/pro-table';
import ProTable from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table';
@ -110,7 +111,7 @@ const TableList: React.FC = () => {
dataIndex: 'callNo', dataIndex: 'callNo',
sorter: true, sorter: true,
hideInForm: true, hideInForm: true,
renderText: (val: string) => `${val}`, renderText: (val: string) => `${val}`,
}, },
{ {
title: '状态', title: '状态',
@ -162,25 +163,25 @@ const TableList: React.FC = () => {
<a <a
key="config" key="config"
onClick={() => { onClick={() => {
handleUpdateModalVisible(true); history.push(`/course/subject/step/update/${record.subject_id}`)
setCurrentRow(record);
}} }}
> >
</a>, </a>,
<a <a
key="config" key="copyAlert"
onClick={() => { onClick={() => {
handleUpdateModalVisible(true); // handleCopyItem({});
setCurrentRow(record);
}} }}
> >
</a>,
<a key="subscribeAlert" href="https://procomponents.ant.design/">
</a>, </a>,
<a key="subscribeAlert" href="https://procomponents.ant.design/"> <a
key="deleteAlert"
onClick={() => {
// handleCopyItem({});
}}
>
</a>, </a>,
], ],
@ -201,7 +202,7 @@ const TableList: React.FC = () => {
type="primary" type="primary"
key="primary" key="primary"
onClick={() => { onClick={() => {
handleModalVisible(true); history.push('/course/subject/step/create')
}} }}
> >
<PlusOutlined /> <PlusOutlined />

Loading…
Cancel
Save