.eslintcache
37.7 KB
[{"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\index.js":"1","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\App.js":"2","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\Login.js":"3","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\index.js":"4","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\Tikz.js":"5","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\Html.js":"6","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\Home.js":"7","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\lib\\api\\login.js":"8","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\lib\\api\\html.js":"9","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\lib\\api\\mathCha.js":"10","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\lib\\api\\tikz.js":"11"},{"size":665,"mtime":1607870538560,"results":"12","hashOfConfig":"13"},{"size":594,"mtime":1607870429242,"results":"14","hashOfConfig":"13"},{"size":1242,"mtime":1607869960148,"results":"15","hashOfConfig":"13"},{"size":173,"mtime":1607870460096,"results":"16","hashOfConfig":"13"},{"size":6610,"mtime":1607870527409,"results":"17","hashOfConfig":"13"},{"size":7489,"mtime":1607869960144,"results":"18","hashOfConfig":"13"},{"size":17095,"mtime":1607870475409,"results":"19","hashOfConfig":"13"},{"size":515,"mtime":1607870247979,"results":"20","hashOfConfig":"13"},{"size":529,"mtime":1607870247967,"results":"21","hashOfConfig":"13"},{"size":540,"mtime":1607870248003,"results":"22","hashOfConfig":"13"},{"size":1007,"mtime":1607870248045,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":1,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"igk043",{"filePath":"26","messages":"27","errorCount":0,"warningCount":8,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":6,"fixableErrorCount":0,"fixableWarningCount":0,"source":"35","usedDeprecatedRules":"32"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"38","messages":"39","errorCount":0,"warningCount":19,"fixableErrorCount":0,"fixableWarningCount":0,"source":"40","usedDeprecatedRules":"32"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},{"filePath":"47","messages":"48","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"32"},"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\index.js",["49","50"],"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\App.js",["51","52","53","54","55","56","57","58"],"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\Login.js",[],"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\index.js",[],["59","60"],"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\Tikz.js",["61","62","63","64","65","66"],"import React, { useState, useEffect, useCallback } from 'react';\r\nimport { Drawer, message } from 'antd';\r\nimport { UploadOutlined, RetweetOutlined } from '@ant-design/icons';\r\nimport 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';\r\nimport { getTexToSvg, checkQno, saveFileAndQno } from '../lib/api/tikz'; // Request api\r\n\r\n\r\n\r\nconst fetchTexToSvg = async (data) => {\r\n\t// getTexToSvg api를 이용하기 위한 const\r\n\ttry {\r\n\t\tconst result = await getTexToSvg({ tex: data });\r\n\t\tif (result.status === 200) {\r\n\t\t\tconsole.log(result.status);\r\n\t\t\tconsole.log(result.data);\r\n\t\t\treturn result.data;\r\n\t\t}\r\n\t} catch (e) {\r\n\t\tconsole.log(e);\r\n\t\t//Notification. 추가해서 변환상태 알려주기\r\n\t\treturn null;\r\n\t}\r\n};\r\n\r\n\r\nconst fetchSaveData = async (data) => {\r\n\ttry{\r\n\t const result = await saveFileAndQno(data);\r\n\t console.log(result);\r\n\t if(result.status===200){\r\n\t\treturn result.data;\r\n\t } \r\n\t}catch(e){\r\n\t console.log(e);\r\n\t message.warning(e.message);\r\n\t}\r\n }\r\n\r\n/* 문항번호 체크 */\r\nconst fetchCheckQno = async(qno) => {\r\n\ttry{\r\n\t const result = await checkQno(qno);\r\n\t if(result.status===200){\r\n\t\tconsole.log(result);\r\n\t\tmessage.info(\"사용 가능한 문항 번호 입니다.\");\r\n\t\treturn true;\r\n\t }else{ \r\n\t\tmessage.info(\"존재 하지 않는 문항 번호 입니다.\");\r\n\t\treturn false;\r\n\t }\r\n\t}catch(e){\r\n\t console.log(e);\r\n\t message.info(\"존재 하지 않는 문항 번호 입니다.\");\r\n\t return false;\r\n\t}\r\n }\r\n\r\n\r\n const _tikzcode= \"% 예시 (x축, y축, 반지름이 1cm인 원의 그림) %\\n\\\r\n% 오른쪽의 변환 버튼을 눌러보세요! %\\n\\n\\\r\n \\\\documentclass{article}\\n\\\r\n \\\\usepackage{tikz}\\n\\\r\n \\\\begin{document}\\n\\n\\n\\\r\n \\\\begin{tikzpicture}\\n\\\r\n \\\\draw (-1.5,0) -- (1.5,0);\\n\\\r\n \\\\draw (0,-1.5) -- (0,1.5);\\n\\\r\n \\\\draw (0,0) circle (1cm);\\n\\\r\n \\\\end{tikzpicture}\\n\\n\\n\\\r\n \\\\end{document}\";\r\n \r\n \r\n const Tikz = ({ onLeave, visible, callback, selectItem, mode }) => {\r\n\tconst [fields,setFields] =useState([]);\r\n\tconst [qno, setQno] = useState(null);\r\n\tconst [number, setNumber] = useState(null); //문항번호를 저장하는 state\r\n\tconst [inputText, setinputText] = useState(_tikzcode); //tikz code를 저장하는 state\r\n\tconst [svg, setSvg] = useState(null); //변환된 svg 데이터를 저장하는 state\r\n\tconst [qnoCheck,setQnoCheck] = useState(false);\r\n\tconst [tikzcode,setTikzCode] = useState(_tikzcode);\r\n\t//svg\r\n\t//onclickevent : Tikz 변환하기 Button의 onClick Event\r\n\t//onChangeTikz : TextArea 컴포넌트의 onChange event\r\n\t//onFinish : Form data를 제출하기 위한 event\r\n\t\r\n\tuseEffect(()=> {\r\n\t\t\tif(mode==='preview'&&selectItem){\r\n\t\t\t\tconsole.log(selectItem);\r\n\r\n\t\t\t\tlet initFields = [\r\n\t\t\t\t\t{name:['qno'],value:selectItem.qno},\r\n\t\t\t\t\t{name:['typeSol'],value:selectItem.typeSol},\r\n\t\t\t\t\t{name:['typeQue'],value:selectItem.typeQue},\r\n\t\t\t\t\t{name:['creator'],value:selectItem.creator},\r\n\t\t\t\t\r\n\t\t\t\t ];\r\n\t\t\t\t setQno(selectItem.qno);\r\n\t\t\t\t setTikzCode(selectItem.tex);\r\n\t\t\t\t setFields(initFields);\r\n\t\t\t\t setSvg(null);\r\n\t\t\t}\r\n\t},[mode, selectItem]);\r\n\r\n\tuseEffect(()=>{\r\n\t\tif(mode === 'new'){\r\n\t\t\tlet initFields = [\r\n\t\t\t\t{name:['qno'],value:null},\r\n\t\t\t\t{name:['typeSol'],value:null},\r\n\t\t\t\t{name:['typeQue'],value:null},\r\n\t\t\t\t{name:['creator'],value:null},\r\n\t\t\t ];\r\n\t\t\t setQno(null);\r\n\t\t\t setTikzCode(_tikzcode);\r\n\t\t\t setFields(initFields);\r\n\t\t\t setSvg(null);\r\n\t\t}\r\n\t},[mode]);\r\n\r\n\tconst onClickEvent = (e) => {\r\n\t\tif(inputText){\r\n\t\t\tcallbackSVG(inputText);\r\n\t\t}\r\n\t\t\r\n\t\tif (inputText === null) {\r\n\t\t\tconsole.log(inputText);\r\n\t\t\talert(\r\n\t\t\t\t//data에 null이 입력된 경우\r\n\t\t\t\t'Code 값을 입력해주세요!'\r\n\t\t\t);\r\n\t\t} else {\r\n\t\t\tconsole.log(inputText);\r\n\t\t\tcallbackSVG(inputText);\r\n\t\t}\r\n\t};\r\n\tconst onChangeQno = (value) => {\r\n\t\tconsole.log(value);\r\n\t\tsetQno(value);\r\n\t\tsetFields([...fields, {name:['qno'],value:value}]);\r\n\t};\r\n/*\r\n\tuseEffect(()=>{\r\n\t\tif(!visible ){\r\n\t\t let initFields = [\r\n\t\t\t{name:['qno'],value:null},\r\n\t\t\t{name:['typeSol'],value:null},\r\n\t\t\t{name:['typeQue'],value:null},\r\n\t\t\t{name:['creator'],value:null},\r\n\t\t ];\r\n\t\t setQno(null);\r\n\t\t setTikzCode(tikzcode);\r\n\t\t setFields(initFields);\r\n\t\t}\r\n\t },[visible,mode]);\r\n*/\r\n\tconst callbackSVG = useCallback(async () => {\r\n\t\tconst result = await fetchTexToSvg(inputText);\r\n\t\tsetSvg(result); //api로 받아온 result를 svg state에 저장\r\n\t}, [inputText]);\r\n\r\n\tconst onChangeTikz = (e) => {\r\n\t\tif (e) {\r\n\t\t\tsetinputText(e.target.value);\r\n\t\t} else setinputText(null);\r\n\t};\r\n\r\n\tconst onSaveEvent = () => {\r\n\t\ttry {\r\n\t\t\t//서버에 저장이 확인 됐을때 200, 500(오류) http status\r\n\t\t\tconst result = alert('전송이 성공적으로 완료됐습니다.');\r\n\t\t} catch (e) {\r\n\t\t\t//서버에 저장 오류가 났을때\r\n\t\t\tconsole.log(e);\r\n\t\t\talert(e);\r\n\t\t}\r\n\t};\r\n\tconst onClickQno = async(e)=>{\r\n\t\te.preventDefault();\r\n\t\t//번호가 호출 성공시 setQnoCheck(true);\r\n\t\tif(qno){\r\n\t\t const _checkQno= await fetchCheckQno(qno);\r\n\t\t setQnoCheck(_checkQno);\r\n\t\t}\r\n\t };\r\n\t\r\n\r\n\tconst onFinish = async(values) => {\r\n\t\tconsole.log(values);\r\n\t\tconsole.log(qnoCheck);\r\n\t\tif(!qnoCheck){\r\n\t\t message.warning(\"문제 번호를 확인해 주세요.\")\r\n\t\t return;\r\n\t\t}else{\r\n\t\t\tconst creator = sessionStorage.getItem('id');\r\n\t\t\tconsole.log('Received values of form: ', values); \r\n\t\t\tconst result = await fetchSaveData({...values, creator});\r\n\t\t\tconsole.log(result);\r\n\t\t\tif(result){\r\n\t\t\t message.info(result.message);\r\n\t\t\t let initFields = [\r\n\t\t\t\t{name:['qno'],value:null},\r\n\t\t\t\t{name:['typeSol'],value:null},\r\n\t\t\t\t{name:['typeQue'],value:null},\r\n\t\t\t\t{name:['creator'],value:null},\r\n\t\t\t ];\r\n\t\t\t setFields(initFields);\r\n\t\t\t onLeave();\r\n\t\t\t callback({status:'SAVE_OK'});\r\n\t\t\t setQno(null);\r\n\t\t\t}else{\r\n\t\t\t\tcallback({status:'SAVE_FAIL'})\r\n\t\t\t} \r\n\t\t}\r\n\t};\r\n\r\n\t\r\n\tconst onChangeTypeSol = (value) => {\r\n\t\tconsole.log(value);\r\n\t\tsetFields([...fields, {name:['typeSol'],value:value}]);\r\n\t}\r\n\t\r\n\tconst onChangeTypeQue = (value) => {\r\n\t\tconsole.log(value);\r\n\t\tsetFields([...fields, {name:['typeQue'],value:value}])\r\n\t}\r\n\r\n\treturn (\r\n\t\t<Drawer\r\n\t\t\ttitle={'Tikz Editor'}\r\n\t\t\tplacement={'bottom'}\r\n\t\t\tclosable={true}\r\n\t\t\theight={'90vh'}\r\n\t\t\tonClose={onLeave}\r\n\t\t\tvisible={visible}>\r\n\t\t\t<TikzForm\r\n\t\t\t\tsvg={svg}\r\n\t\t\t\tonClickEvent={onClickEvent}\r\n\t\t\t\tonChangeTikz={onChangeTikz}\r\n\t\t\t\tonSaveEvent={onSaveEvent}\r\n\t\t\t\tonFinish={onFinish}\r\n\t\t\t\ttikzcode={tikzcode}\r\n\t\t\t\tfields={fields}\r\n\t\t\t\tonClickQno={onClickQno}\r\n\t\t\t\tonChangeQno={onChangeQno}\r\n\t\t\t\tonChangeTypeSol={onChangeTypeSol}\r\n\t\t\t\tonChangeTypeQue={onChangeTypeQue}\r\n\t\t\t\tqno={qno}>\r\n\t\t\t</TikzForm>\r\n\t\t</Drawer>\r\n\t);\r\n};\r\n\r\nexport default Tikz;\r\n\r\n//<Transform value={tikzHtml}></Transform>\r\n","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\Html.js",["67","68","69","70"],"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\Container\\Home.js",["71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89"],"import React, { useState, useEffect, useCallback } from 'react';\r\nimport 'antd/dist/antd.css';\r\nimport './Tikz.css';\r\nimport './Home.css';\r\nimport {withRouter} from 'react-router-dom';\r\nimport { Layout, Menu, Table, Button, Card, Modal,message } from 'antd';\r\nimport {\r\n MenuOutlined,\r\n FunctionOutlined,\r\n FontSizeOutlined,\r\n LineChartOutlined,\r\n EyeOutlined,\r\n DownloadOutlined,\r\n UploadOutlined,\r\n DeleteOutlined,\r\n UserOutlined,\r\n ReadOutlined\r\n} from '@ant-design/icons';\r\nimport mathbank from '../lib/mathbank.png';\r\nimport heartgraph from '../lib/heartgraph.png';\r\nimport Html from './Html.js';\r\n\r\nimport Tikz from './Tikz.js';\r\nimport { Redirect } from 'react-router-dom';\r\nimport {getData} from 'lib/api/html';\r\nimport { getMathData } from '../lib/api/mathCha';\r\nimport { removeItem,removeItems } from '../lib/api/tikz';\r\n\r\nconst { Header, Sider, Content } = Layout;\r\nconst { SubMenu } = Menu;\r\n\r\nconst host= 'http://localhost:5000';\r\n\r\n/* 테이블에 들어가는 컨텐츠 메크로로 생성 */\r\n\r\nconst fetchGetData = async(user, pageSize, currentPage, orderWhat,orderKind) => {\r\n try{\r\n console.log(pageSize);\r\n const result = await getData(user, pageSize, currentPage,orderWhat,orderKind);\r\n if(result.status === 200){\r\n return result.data;\r\n }else {\r\n return null;\r\n }\r\n }catch(e){\r\n console.log(e);\r\n return null;\r\n }\r\n};\r\n\r\n\r\n\r\n//로그아웃 기능 -> session storage 제거 및 Login으로 이동하게 해야함\r\n\r\n\r\n\r\nconst Home = ({history}) => {\r\n const [html, setHtml] = useState(false);\r\n\r\n const [mathcha, setMathcha] = useState(false);\r\n\r\n const [tikz, setTikz] = useState(false);\r\n\r\n const [visible, setVisible] = useState(false);\r\n\r\n const [selectedRowKeys, setSelectedRowKeys] = useState(false);\r\n\r\n const [collapsed, setCollapsed] = useState(false);\r\n\r\n const [status,setStatus] = useState(null);\r\n\r\n const [data, setData] = useState([]);\r\n\r\n const [selectItem, setSelectItem] = useState(null);\r\n\r\n const [selectItems, setSelectItems] = useState([]);\r\n\r\n const [removeVisible,setRemoveVisible] = useState(false);\r\n\r\n const [mode ,setMode] =useState(null);\r\n\r\n const [tikzmode,setTikzMode] =useState(null);\r\n\r\n const [total, setTotal] =useState(0);\r\n const [currentPage, setCurrentPage] =useState(1);\r\n const [pageSize,setPageSize] =useState(10);\r\n const [orderWhat,setOrderWhat] = useState('qno');\r\n const [orderWhatKor,setOrderWhatKor] =useState('문제번호순');\r\n const [orderKind,setOrderKind] = useState('desc');\r\n const [orderKindKor,setOrderKindKor] = useState('내림차순');\r\n const [orderWhatStatus,setOrderWhatStatus] =useState(false);\r\n const [orderKindStatus,setOrderKindStatus] =useState(false);\r\n const callback = (param) => {\r\n const {status} = param;\r\n if(status){\r\n setStatus(status);\r\n }\r\n }\r\n const onOrderWhat = async() => {\r\n if(orderWhatKor ===\"문제번호순\"){\r\n setOrderWhat('id');\r\n setOrderWhatKor(\"최근등록순\"); \r\n setOrderWhatStatus(true);\r\n }else{\r\n setOrderWhat('qno');\r\n setOrderWhatKor(\"문제번호순\");\r\n setOrderWhatStatus(true);\r\n }\r\n };\r\n const onOrderKind = () => {\r\n if(orderKindKor ===\"내림차순\"){\r\n setOrderKind('asc');\r\n setOrderKindKor(\"오름차순\");\r\n setOrderKindStatus(true);\r\n }else{\r\n setOrderKind('desc')\r\n setOrderKindKor(\"내림차순\");\r\n setOrderKindStatus(true);\r\n }\r\n };\r\n\r\n const callbackFetch = useCallback(async () => {\r\n const user = sessionStorage.getItem('id');\r\n const result = await fetchGetData(user,pageSize,currentPage,orderWhat, orderKind);\r\n console.log(pageSize);\r\n if(result){\r\n console.log(result.tikzs);\r\n setData(result.tikzs.map(x=>Object.assign({},x,{key: x.id})));\r\n setTotal(result.total);\r\n setStatus(null);\r\n setOrderKindStatus(false);\r\n setOrderWhatStatus(false);\r\n }\r\n },[fetchGetData,pageSize,currentPage,orderWhat,orderKind]);\r\n\r\n useEffect(() =>{\r\n if(status==null || (status!=null && status==='SAVE_OK')){\r\n callbackFetch();\r\n }\r\n if(orderKindStatus === true || orderWhatStatus ===true){\r\n callbackFetch();\r\n }\r\n },[status,orderKindStatus,orderWhatStatus])\r\n \r\n \r\n /*파일 정렬 */\r\n useEffect(()=>{\r\n \r\n },[orderWhat,orderWhatKor,orderKind,orderKindKor, Table])\r\n \r\n /* 모달 */\r\n const showModal = (e, value) => {\r\n console.log(value);\r\n setSelectItem(value);\r\n setVisible(!visible);\r\n };\r\n\r\n const handleOk = (e) => {\r\n console.log(e);\r\n setVisible(!visible);\r\n };\r\n\r\n const handleCancel = (e) => {\r\n console.log(e);\r\n setVisible(!visible);\r\n };\r\n\r\n /* 로그인 모달 */\r\n const showLogin = (e) => {\r\n console.log(e);\r\n setVisible(!visible);\r\n };\r\n\r\n const showTikz= (e, value) => {\r\n setTikzMode(\"preview\");\r\n setSelectItem(value);\r\n setTikz(true);\r\n };\r\n\r\n const columns = [\r\n\r\n {\r\n title: '문제 번호',\r\n dataIndex: 'qno',\r\n },\r\n {\r\n title: '문제 타입',\r\n dataIndex: 'typeSol',\r\n },\r\n {\r\n title: '문제/풀이 구분',\r\n dataIndex: 'typeQue',\r\n },\r\n {\r\n title: 'HTML',\r\n dataIndex: 'htmlFileName',\r\n render: (value, row) => {\r\n if(value){\r\n return (\r\n <Button\r\n type=\"dashed\"\r\n shape=\"round\"\r\n icon={<LineChartOutlined />}\r\n onClick={(e)=>showModal(e, row)}\r\n />\r\n );\r\n }else{\r\n return <span>-</span>\r\n }\r\n },\r\n },\r\n {\r\n title: 'Mathcha',\r\n dataIndex: 'mathcharFileName',\r\n render: (value, row) => {\r\n if(value){\r\n return (\r\n <a href={`${host}/mathchaDownload/${value}`}>\r\n <DownloadOutlined/>\r\n </a>\r\n \r\n );\r\n }else{\r\n return <span>-</span>\r\n }\r\n },\r\n },\r\n {\r\n title: 'TikZ',\r\n dataIndex: 'tex',\r\n render:(value, row) => {\r\n if(value){\r\n return (\r\n <Button\r\n type=\"dashed\"\r\n shape=\"round\"\r\n icon={<LineChartOutlined />}\r\n onClick={(e)=> showTikz(e,row)}\r\n />\r\n );\r\n }else{\r\n return <span>-</span>\r\n }\r\n },\r\n },\r\n {\r\n title: '삭제',\r\n dataIndex: 'delete',\r\n render: (value, row) => {\r\n return <Button type=\"text\" icon={<DeleteOutlined />} danger onClick={(e)=>removeShowModal(e,row)}/>;\r\n },\r\n },\r\n {\r\n title: '작성자',\r\n dataIndex: 'creator',\r\n },\r\n ];\r\n\r\n const removeShowModal = (e,row) => {\r\n setSelectItem(row);\r\n setMode('single');\r\n setRemoveVisible(true);\r\n };\r\n \r\n const removeItemsShowModal =() => {\r\n setMode('multi');\r\n setRemoveVisible(true);\r\n };\r\n \r\n \r\n\r\n const removeHandleCancel = () => {\r\n\r\n setRemoveVisible(false);\r\n };\r\n const removeHandleOk = async () => {\r\n if(mode === 'single'){\r\n\r\n try{\r\n const result = await removeItem(selectItem.id);\r\n if(result.status==200){\r\n message.info(\"삭제되었습니다.\");\r\n callbackFetch();\r\n setRemoveVisible(false);\r\n }}catch(e){\r\n console.log(e);\r\n message.warn(e);\r\n }\r\n }\r\n if(mode ==='multi'){\r\n \r\n try{\r\n const result = await removeItems(selectItems);\r\n if(result.status==200){\r\n message.info(\"삭제되었습니다.\");\r\n callbackFetch();\r\n setRemoveVisible(false);\r\n }}catch(e){\r\n console.log(e);\r\n message.warn(e);\r\n }\r\n }\r\n\r\n }\r\n\r\n const onSelectChange = selectedRowKeys => {\r\n console.log('selectedRowKeys Changed: ', selectedRowKeys);\r\n setSelectItems(selectedRowKeys);\r\n }\r\n\r\n const onCancelHtml = () => {\r\n setHtml(false);\r\n };\r\n const onCancelMathCha = () => {\r\n setMathcha(false);\r\n };\r\n\r\n const onExit = () => {\r\n setMathcha(false);\r\n };\r\n\r\n const onLeave = () => {\r\n setSelectItem(null);\r\n setTikz(false);\r\n };\r\n\r\n const onHtml = () => {\r\n setHtml(true);\r\n };\r\n\r\n const onMathcha = () => {\r\n setMathcha(true);\r\n };\r\n\r\n const onTikz = () => {\r\n setTikzMode(\"new\")\r\n setTikz(true);\r\n };\r\n\r\n const toggle = () => {\r\n setCollapsed(!collapsed);\r\n };\r\n\r\n const onCollapse = (collapsed, type) => {\r\n //this.setState({ collapsed });\r\n setCollapsed(!collapsed);\r\n };\r\n\r\n\r\n\r\n const rowSelection = {\r\n selectedRowKeys: selectItems, onChange: onSelectChange\r\n };\r\n const hasSelected = selectedRowKeys.length > 0;\r\n\r\n const isAuth = sessionStorage.getItem('isAuth');\r\n const userId = sessionStorage.getItem('id');\r\n if (!isAuth) return <Redirect to=\"/\" />;\r\n\r\n\r\n return (\r\n <Layout>\r\n <Sider\r\n trigger={null}\r\n collapsible\r\n collapsed={!collapsed}\r\n onCollapse={onCollapse}\r\n style={{ height: '100vh' }}>\r\n <img\r\n className=\"mathbank\"\r\n src={mathbank}\r\n alt=\"mathbank\"\r\n onClick={() => window.location.reload()}\r\n style={{\r\n width: 'auto',\r\n height: '54px',\r\n marginLeft: '22px',\r\n marginTop: '10px',\r\n cursor: 'pointer',\r\n }}\r\n />\r\n <Menu\r\n \r\n theme=\"dark\"\r\n defaultSelectedKeys={['1']}\r\n mode=\"inline\"\r\n style={{ fontSize: '18px' }}>\r\n <SubMenu\r\n key=\"sub1\"\r\n icon={<UserOutlined style={{ fontSize: '18px' }} />}\r\n title=\"User's Info\"\r\n style={{ backgroundColor: 'rgb(0, 21, 41)' }}>\r\n <Menu.Item\r\n key=\"1\"\r\n onClick=\"none\"\r\n style={{\r\n width: '200px',\r\n height: '100%',\r\n paddingLeft: '0px',\r\n background: 'rgb(0, 21, 41)',\r\n textAlign: 'center',\r\n }}>\r\n {userId}님 환영합니다.\r\n </Menu.Item>\r\n </SubMenu>\r\n <SubMenu\r\n key=\"sub2\"\r\n icon={<ReadOutlined style={{ fontsize: '15px'}}/>}\r\n title=\"MathCha\"\r\n style={{\r\n backgroundColor: 'rgb(0, 21, 41)'\r\n }}>\r\n <Menu.Item\r\n key=\"1\"\r\n style={{\r\n width: '200px',\r\n height: '100%',\r\n paddingLeft: '0px',\r\n background: 'rgb(0, 21, 41)',\r\n textAlign: 'center',\r\n }}><a href=\"http://mathcha.io\" target=\"_blank\">MathCha 다운로드</a>\r\n </Menu.Item>\r\n <Menu.Item\r\n key=\"2\"\r\n style={{\r\n width: '200px',\r\n height: '100%',\r\n paddingLeft: '0px',\r\n background: 'rgb(0, 21, 41)',\r\n textAlign: 'center',\r\n }}><a href=\"https://m.blog.naver.com/PostView.nhn?blogId=wool613&logNo=221511340406&proxyReferer=https:%2F%2Fwww.google.com%2F\" target=\"_blank\">tikz 간단 설명</a>\r\n </Menu.Item>\r\n <Menu.Item\r\n key=\"3\"\r\n style={{\r\n width: '200px',\r\n height: '100%',\r\n paddingLeft: '0px',\r\n background: 'rgb(0, 21, 41)',\r\n textAlign: 'center',\r\n }}><a href=\"https://www.bu.edu/math/files/2013/08/tikzpgfmanual.pdf\" target=\"_blank\">tikz 상세 메뉴얼</a>\r\n </Menu.Item>\r\n </SubMenu>\r\n </Menu>\r\n </Sider>\r\n <Layout className=\"site-layout\">\r\n <Header className=\"site-layout-background\" style={{ padding: 0 }}>\r\n <MenuOutlined\r\n style={{ marginLeft: '13px' }}\r\n onClick={(collapsed, toggle)}></MenuOutlined>\r\n\r\n <Button className=\"logout\" type=\"default\" onClick={(e)=>{\r\n sessionStorage.removeItem('id');\r\n sessionStorage.removeItem('isAuth');\r\n history.push('/');\r\n \r\n }}>\r\n 로그아웃\r\n </Button>\r\n </Header>\r\n <Content>\r\n <div>\r\n <div style={{ marginBottom: 16 }}>\r\n <span style={{ marginLeft: 8 }}>\r\n {hasSelected ? `Selected ${selectedRowKeys.length} items` : ''}\r\n </span>\r\n </div>\r\n <Button\r\n style={{ display: 'inline-block', top: '0.5vh', left: '8vw' }}\r\n type=\"primary\"\r\n shape=\"round\"\r\n icon={<UploadOutlined />}\r\n onClick={onHtml}>\r\n HTML 업로드\r\n </Button>\r\n <Button\r\n style={{ display: 'inline-block', top: '0.5vh', left: '8.5vw' }}\r\n type=\"primary\"\r\n shape=\"round\"\r\n icon={<UploadOutlined />}\r\n onClick={onMathcha}>\r\n Mathcha 업로드\r\n </Button>\r\n <Button\r\n style={{ display: 'inline-block', top: '0.5vh', left: '9vw' }}\r\n type=\"primary\"\r\n shape=\"round\"\r\n icon={<UploadOutlined />}\r\n onClick={onTikz}>\r\n TikZ 업로드\r\n </Button>\r\n <Button\r\n style={{\r\n display: 'inline-block',\r\n top: '0.5vh',\r\n left: '9.5vw',\r\n }}\r\n type=\"dashed\"\r\n shape=\"round\"\r\n icon={<DeleteOutlined />}\r\n onClick={(e)=>{\r\n console.log(selectItems);\r\n if(selectItems.length>0){\r\n\r\n removeItemsShowModal();\r\n }else{\r\n message.info(\"삭제할 데이터를 선택해 주세요.\");\r\n }\r\n }}\r\n danger>\r\n 선택 삭제\r\n </Button>\r\n\r\n <Button\r\n style={{\r\n display: 'inline-block',\r\n top: '0.5vh',\r\n left: '50vw',\r\n }}className=\"orderWhat\" type=\"default\" onClick={onOrderWhat}>\r\n {orderWhatKor}\r\n </Button>\r\n <Button\r\n style={{\r\n display: 'inline-block',\r\n top: '0.5vh',\r\n left: '50.2vw',\r\n }}className=\"orderKind\" type=\"default\" onClick={onOrderKind}>\r\n {orderKindKor}\r\n </Button>\r\n <Table\r\n rowSelection={rowSelection}\r\n pagination={\r\n { \r\n total: total, \r\n current:currentPage, \r\n pageSize:pageSize,\r\n orderWhat:orderWhat ,\r\n orderKind:orderKind,\r\n onChange:async (page,pageSize)=>{\r\n console.log(page,pageSize);\r\n setCurrentPage(page);\r\n const user = sessionStorage.getItem('id');\r\n const result = await fetchGetData(user,pageSize,page,orderWhat,orderKind);\r\n console.log(pageSize);\r\n if(result){\r\n console.log(result.tikzs);\r\n setData(result.tikzs.map(x=>Object.assign({},x,{key: x.id})));\r\n setTotal(result.total);\r\n setStatus(null);\r\n }\r\n }\r\n }\r\n }\r\n columns={columns}\r\n dataSource={data}\r\n style={{ width: '80vw', marginTop: '1.5vh', marginLeft: '8vw' }}\r\n />\r\n <Modal\r\n title=\"미리보기\"\r\n visible={visible}\r\n centered\r\n width=\"400px\"\r\n height=\"400px\"\r\n onOk={handleOk}\r\n onCancel={handleCancel}>\r\n {\r\n selectItem && <iframe scrolling='no' frameBorder=\"0\" style={{overflow:'hidden' , overflowX:'hidden', overflowY:'hidden' , position:'relative', top:'0px',left:'0px', right:'0px', bottom:'0px' ,height:'300px', width:'350px' }} className=\"iframe\" src={`${host}/htmlPreview/${selectItem.htmlFileName}`}/>\r\n }\r\n </Modal>\r\n <Modal \r\n title=\"다운로드\"\r\n />\r\n <Modal\r\n title=\"삭제하시겠습니까?\"\r\n visible={removeVisible}\r\n onOk={removeHandleOk}\r\n onCancel={removeHandleCancel}\r\n okText=\"확인\"\r\n cancelText=\"취소\"\r\n >\r\n <p>확인을 클릭하시면 삭제됩니다!</p>\r\n </Modal>\r\n <Html visible={html} onCancel={onCancelHtml} callback={callback}></Html>\r\n <Mathcha visible={mathcha} onCancel={onCancelMathCha} callback={callback}></Mathcha>\r\n <Tikz visible={tikz} onLeave={onLeave} callback={callback} selectItem={selectItem} mode={tikzmode}></Tikz>\r\n </div>\r\n </Content>\r\n </Layout>\r\n </Layout>\r\n );\r\n};\r\n\r\nexport default withRouter(Home);\r\n","C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\lib\\api\\login.js",[],"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\lib\\api\\html.js",[],"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\lib\\api\\mathCha.js",[],"C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\src\\lib\\api\\tikz.js",[],{"ruleId":"90","severity":1,"message":"91","line":6,"column":24,"nodeType":"92","messageId":"93","endLine":6,"endColumn":30},{"ruleId":"94","severity":2,"message":"95","line":21,"column":1,"nodeType":"92","messageId":"96","endLine":21,"endColumn":14},{"ruleId":"90","severity":1,"message":"97","line":1,"column":15,"nodeType":"92","messageId":"93","endLine":1,"endColumn":23},{"ruleId":"90","severity":1,"message":"98","line":1,"column":25,"nodeType":"92","messageId":"93","endLine":1,"endColumn":34},{"ruleId":"90","severity":1,"message":"99","line":2,"column":17,"nodeType":"92","messageId":"93","endLine":2,"endColumn":25},{"ruleId":"90","severity":1,"message":"100","line":3,"column":16,"nodeType":"92","messageId":"93","endLine":3,"endColumn":20},{"ruleId":"90","severity":1,"message":"101","line":3,"column":22,"nodeType":"92","messageId":"93","endLine":3,"endColumn":29},{"ruleId":"90","severity":1,"message":"102","line":3,"column":31,"nodeType":"92","messageId":"93","endLine":3,"endColumn":35},{"ruleId":"90","severity":1,"message":"103","line":4,"column":9,"nodeType":"92","messageId":"93","endLine":4,"endColumn":15},{"ruleId":"90","severity":1,"message":"104","line":8,"column":7,"nodeType":"92","messageId":"93","endLine":8,"endColumn":21},{"ruleId":"105","replacedBy":"106"},{"ruleId":"107","replacedBy":"108"},{"ruleId":"90","severity":1,"message":"109","line":3,"column":10,"nodeType":"92","messageId":"93","endLine":3,"endColumn":24},{"ruleId":"90","severity":1,"message":"110","line":3,"column":26,"nodeType":"92","messageId":"93","endLine":3,"endColumn":41},{"ruleId":"111","severity":1,"message":"112","line":60,"column":20,"nodeType":"113","messageId":"114","endLine":70,"endColumn":18},{"ruleId":"90","severity":1,"message":"115","line":76,"column":9,"nodeType":"92","messageId":"93","endLine":76,"endColumn":15},{"ruleId":"90","severity":1,"message":"116","line":76,"column":17,"nodeType":"92","messageId":"93","endLine":76,"endColumn":26},{"ruleId":"90","severity":1,"message":"117","line":169,"column":10,"nodeType":"92","messageId":"93","endLine":169,"endColumn":16},{"ruleId":"90","severity":1,"message":"118","line":3,"column":25,"nodeType":"92","messageId":"93","endLine":3,"endColumn":37},{"ruleId":"90","severity":1,"message":"119","line":3,"column":39,"nodeType":"92","messageId":"93","endLine":3,"endColumn":50},{"ruleId":"90","severity":1,"message":"120","line":45,"column":10,"nodeType":"92","messageId":"93","endLine":45,"endColumn":16},{"ruleId":"90","severity":1,"message":"121","line":97,"column":10,"nodeType":"92","messageId":"93","endLine":97,"endColumn":14},{"ruleId":"90","severity":1,"message":"122","line":6,"column":39,"nodeType":"92","messageId":"93","endLine":6,"endColumn":43},{"ruleId":"90","severity":1,"message":"123","line":9,"column":3,"nodeType":"92","messageId":"93","endLine":9,"endColumn":19},{"ruleId":"90","severity":1,"message":"124","line":10,"column":3,"nodeType":"92","messageId":"93","endLine":10,"endColumn":19},{"ruleId":"90","severity":1,"message":"125","line":12,"column":3,"nodeType":"92","messageId":"93","endLine":12,"endColumn":14},{"ruleId":"90","severity":1,"message":"126","line":20,"column":8,"nodeType":"92","messageId":"93","endLine":20,"endColumn":18},{"ruleId":"90","severity":1,"message":"127","line":26,"column":10,"nodeType":"92","messageId":"93","endLine":26,"endColumn":21},{"ruleId":"90","severity":1,"message":"128","line":66,"column":27,"nodeType":"92","messageId":"93","endLine":66,"endColumn":45},{"ruleId":"90","severity":1,"message":"129","line":86,"column":19,"nodeType":"92","messageId":"93","endLine":86,"endColumn":30},{"ruleId":"130","severity":1,"message":"131","line":134,"column":5,"nodeType":"132","endLine":134,"endColumn":60,"suggestions":"133"},{"ruleId":"130","severity":1,"message":"134","line":143,"column":5,"nodeType":"132","endLine":143,"endColumn":45,"suggestions":"135"},{"ruleId":"130","severity":1,"message":"136","line":149,"column":5,"nodeType":"132","endLine":149,"endColumn":59,"suggestions":"137"},{"ruleId":"90","severity":1,"message":"138","line":169,"column":9,"nodeType":"92","messageId":"93","endLine":169,"endColumn":18},{"ruleId":"139","severity":1,"message":"140","line":281,"column":23,"nodeType":"141","messageId":"142","endLine":281,"endColumn":25},{"ruleId":"139","severity":1,"message":"140","line":294,"column":25,"nodeType":"141","messageId":"142","endLine":294,"endColumn":27},{"ruleId":"90","severity":1,"message":"143","line":318,"column":9,"nodeType":"92","messageId":"93","endLine":318,"endColumn":15},{"ruleId":"144","severity":1,"message":"145","line":421,"column":48,"nodeType":"146","endLine":421,"endColumn":63},{"ruleId":"144","severity":1,"message":"145","line":431,"column":145,"nodeType":"146","endLine":431,"endColumn":160},{"ruleId":"144","severity":1,"message":"145","line":441,"column":86,"nodeType":"146","endLine":441,"endColumn":101},{"ruleId":"147","severity":1,"message":"148","line":567,"column":32,"nodeType":"149","endLine":567,"endColumn":319},"no-unused-vars","'Router' is defined but never used.","Identifier","unusedVar","no-undef","'serviceWorker' is not defined.","undef","'useState' is defined but never used.","'useEffect' is defined but never used.","'Redirect' is defined but never used.","'Html' is defined but never used.","'Mathcha' is defined but never used.","'Tikz' is defined but never used.","'isauth' is defined but never used.","'authentication' is assigned a value but never used.","no-native-reassign",["150"],"no-negated-in-lhs",["151"],"'UploadOutlined' is defined but never used.","'RetweetOutlined' is defined but never used.","no-multi-str","Multiline support is limited to browsers supporting ES5 only.","Literal","multilineString","'number' is assigned a value but never used.","'setNumber' is assigned a value but never used.","'result' is assigned a value but never used.","'LockOutlined' is defined but never used.","'SaveTwoTone' is defined but never used.","'upload' is assigned a value but never used.","'onOk' is assigned a value but never used.","'Card' is defined but never used.","'FunctionOutlined' is defined but never used.","'FontSizeOutlined' is defined but never used.","'EyeOutlined' is defined but never used.","'heartgraph' is defined but never used.","'getMathData' is defined but never used.","'setSelectedRowKeys' is assigned a value but never used.","'setPageSize' is assigned a value but never used.","react-hooks/exhaustive-deps","React Hook useCallback has an unnecessary dependency: 'fetchGetData'. Either exclude it or remove the dependency array. Outer scope values like 'fetchGetData' aren't valid dependencies because mutating them doesn't re-render the component.","ArrayExpression",["152"],"React Hook useEffect has a missing dependency: 'callbackFetch'. Either include it or remove the dependency array.",["153"],"React Hook useEffect has an unnecessary dependency: 'Table'. Either exclude it or remove the dependency array. Outer scope values like 'Table' aren't valid dependencies because mutating them doesn't re-render the component.",["154"],"'showLogin' is assigned a value but never used.","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","'onExit' is assigned a value but never used.","react/jsx-no-target-blank","Using target=\"_blank\" without rel=\"noreferrer\" is a security risk: see https://html.spec.whatwg.org/multipage/links.html#link-type-noopener","JSXAttribute","jsx-a11y/iframe-has-title","<iframe> elements must have a unique title property.","JSXOpeningElement","no-global-assign","no-unsafe-negation",{"desc":"155","fix":"156"},{"desc":"157","fix":"158"},{"desc":"159","fix":"160"},"Update the dependencies array to be: [pageSize, currentPage, orderWhat, orderKind]",{"range":"161","text":"162"},"Update the dependencies array to be: [status, orderKindStatus, orderWhatStatus, callbackFetch]",{"range":"163","text":"164"},"Update the dependencies array to be: [orderWhat, orderWhatKor, orderKind, orderKindKor]",{"range":"165","text":"166"},[3825,3880],"[pageSize, currentPage, orderWhat, orderKind]",[4099,4139],"[status, orderKindStatus, orderWhatStatus, callbackFetch]",[4193,4247],"[orderWhat, orderWhatKor, orderKind, orderKindKor]"]