diff --git a/public/react/src/modules/developer/DeveloperHome.js b/public/react/src/modules/developer/DeveloperHome.js index b2c473861..ae230677a 100644 --- a/public/react/src/modules/developer/DeveloperHome.js +++ b/public/react/src/modules/developer/DeveloperHome.js @@ -9,7 +9,7 @@ import './index.scss'; import React from 'react'; -import { Table, Button, Dropdown, Icon, Menu, Card, Input, Select, Tag, Modal } from 'antd'; +import { Table, Button, Dropdown, Icon, Menu, Card, Input, Select, Tag } from 'antd'; import { connect } from 'react-redux'; import actions from '../../redux/actions'; import MultipTags from './components/multiptags'; @@ -46,9 +46,24 @@ const maps = { ], 'languageMenu': [ { - 'key': 'c', - 'name': 'C语言', - 'value': 'c' + 'key': 'C', + 'name': 'C', + 'value': 'C' + }, + { + 'key': 'C++', + 'name': 'C++', + 'value': 'C++' + }, + { + 'key': 'Python', + 'name': 'Python', + 'value': 'Python' + }, + { + 'key': 'Java', + 'name': 'Java', + 'value': 'Java' } ], 'difficultMenu': [ diff --git a/public/react/src/modules/tpm/TPMDataset.js b/public/react/src/modules/tpm/TPMDataset.js index b70bc457c..6894c4a69 100644 --- a/public/react/src/modules/tpm/TPMDataset.js +++ b/public/react/src/modules/tpm/TPMDataset.js @@ -1,6 +1,6 @@ import React, {Component} from 'react'; import {Redirect} from 'react-router'; -import {List, Typography, Tag, Modal, Radio, Checkbox, Table, Pagination,Upload,Button} from 'antd'; +import {List, Typography, Tag, Modal, Radio, Checkbox, Table,message, Pagination,Upload,Button} from 'antd'; import { NoneData } from 'educoder' import TPMRightSection from './component/TPMRightSection'; @@ -12,7 +12,29 @@ import moment from 'moment'; import Tpmdatasetmodel from "./tpmmodel/Tpmdatasetmodel"; const confirm = Modal.confirm; +function clearSlct() { + if("getSelection" in window){ + window.getSelection().removeAllRanges(); + }else{ + document.selection.empty(); + }; +} +function jsCopy(s) { + clearSlct(); + const copyEle = document.getElementById(s); + copyEle.select(); + const copyStatus=document.execCommand("Copy"); + // 对成功与否定进行提示 + copyStatuss(copyStatus) +} +function copyStatuss(copyStatus){ + if (copyStatus) { + message.success('复制成功'); + } else { + message.error('复制失败'); + } +} class TPMDataset extends Component { constructor(props) { super(props) @@ -69,6 +91,23 @@ class TPMDataset extends Component { ) }, + { + title: '操作', + dataIndex: 'operation', + key: 'operation', + align: 'center', + className: "edu-txt-center font-14 ", + render: (text, record) => ( +