MinsoftK

Editor side menu 추가

......@@ -85,7 +85,7 @@ const Home = ({history}) => {
const [currentPage, setCurrentPage] =useState(1);
const [pageSize,setPageSize] =useState(10);
const [orderWhat,setOrderWhat] = useState('qno');
const [orderWhatKor,setOrderWhatKor] =useState('문제번호순');
const [orderWhatKor,setOrderWhatKor] =useState('그림번호순');
const [orderKind,setOrderKind] = useState('desc');
const [orderKindKor,setOrderKindKor] = useState('내림차순');
const [orderWhatStatus,setOrderWhatStatus] =useState(false);
......@@ -97,13 +97,13 @@ const Home = ({history}) => {
}
}
const onOrderWhat = async() => {
if(orderWhatKor ==="문제번호순"){
if(orderWhatKor ==="그림번호순"){
setOrderWhat('id');
setOrderWhatKor("최근등록순");
setOrderWhatStatus(true);
}else{
setOrderWhat('qno');
setOrderWhatKor("문제번호순");
setOrderWhatKor("그림번호순");
setOrderWhatStatus(true);
}
};
......@@ -180,17 +180,14 @@ const Home = ({history}) => {
const columns = [
{
title: '문제 번호',
title: '그림 번호',
dataIndex: 'qno',
},
{
title: '문제 타입',
title: '그림 타입',
dataIndex: 'typeSol',
},
{
title: '문제/풀이 구분',
dataIndex: 'typeQue',
},
{
title: 'HTML',
dataIndex: 'htmlFileName',
......@@ -418,7 +415,7 @@ const Home = ({history}) => {
paddingLeft: '0px',
background: 'rgb(0, 21, 41)',
textAlign: 'center',
}}><a href="http://mathcha.io" target="_blank">MathCha 다운로드</a>
}}><a href="https://github.com/nhn/toast-ui.react-image-editor/archive/master.zip" target="_blank">Tui-image-tool 다운로드</a>
</Menu.Item>
<Menu.Item
key="2"
......@@ -428,7 +425,7 @@ const Home = ({history}) => {
paddingLeft: '0px',
background: 'rgb(0, 21, 41)',
textAlign: 'center',
}}><a href="https://m.blog.naver.com/PostView.nhn?blogId=wool613&logNo=221511340406&proxyReferer=https:%2F%2Fwww.google.com%2F" target="_blank">tikz 간단 설명</a>
}}><a href="https://github.com/nhn/tui.image-editor" target="_blank">What is Tui-image-tool?</a>
</Menu.Item>
<Menu.Item
key="3"
......@@ -438,7 +435,7 @@ const Home = ({history}) => {
paddingLeft: '0px',
background: 'rgb(0, 21, 41)',
textAlign: 'center',
}}><a href="https://www.bu.edu/math/files/2013/08/tikzpgfmanual.pdf" target="_blank">tikz 상세 메뉴얼</a>
}}><a href="https://github.com/nhn/tui.image-editor/blob/master/docs/Basic-Tutorial.md" target="_blank">상세 메뉴얼</a>
</Menu.Item>
</SubMenu>
</Menu>
......@@ -471,23 +468,16 @@ const Home = ({history}) => {
shape="round"
icon={<UploadOutlined />}
onClick={onHtml}>
HTML 업로드
</Button>
<Button
style={{ display: 'inline-block', top: '0.5vh', left: '8.5vw' }}
type="primary"
shape="round"
icon={<UploadOutlined />}
onClick={onMathcha}>
Mathcha 업로드
그림 업로드
</Button>
<Button
style={{ display: 'inline-block', top: '0.5vh', left: '9vw' }}
type="primary"
shape="round"
icon={<UploadOutlined />}
onClick={onTikz}>
TikZ 업로드
Editor 직접 업로드
</Button>
<Button
style={{
......@@ -515,7 +505,7 @@ const Home = ({history}) => {
style={{
display: 'inline-block',
top: '0.5vh',
left: '50vw',
left: '40vw',
}}className="orderWhat" type="default" onClick={onOrderWhat}>
{orderWhatKor}
</Button>
......@@ -523,7 +513,7 @@ const Home = ({history}) => {
style={{
display: 'inline-block',
top: '0.5vh',
left: '50.2vw',
left: '40.2vw',
}}className="orderKind" type="default" onClick={onOrderKind}>
{orderKindKor}
</Button>
......
import axios from 'axios';
import qs from 'qs';
export const getTexToSvg = (data) =>
{
const options = {
method: 'POST',
headers: { 'content-type': 'application/x-www-form-urlencoded' },
data: qs.stringify(data),
url:'http://ai.natmal.com:9292',
};
return axios(options);
}
const hostMath = "http://ai.natmal.com:7070";
export const checkQno = (qno) => axios.get(`${hostMath}/checkQno?qno=${qno}`);
export const saveFileAndQno = (data) => axios.post('/upload/tikz',{...data});
export const removeItem = (id) => axios.get(`/tikzs/removeItem?id=${id}`);
export const removeItems = (ids) => axios.post("/tikzs/removeItems",{ids});
//export const getData = (user, pageSize, currentPage,orderWhat) => axios.post('/tikzs',{user, pageSize, currentPage,ordeWhat});
//export const tikz = (id) => tikz.post(`/users?id=${id != null ? id : ''}`);
//export const testAdd = (name, tel) => client.post('/users/add', { name, tel });