This commit is contained in:
caishi 2020-04-29 10:42:53 +08:00
parent e69af9c003
commit a38ba5c7e2
7 changed files with 22 additions and 65 deletions

View File

@ -4403,9 +4403,9 @@ window._whenPasterDoUpload = function (event, action, callback) {
// 读取该图片
var file = item.getAsFile();
var oMyForm = new FormData();
oMyForm.append("editormd-image-file", file);
oMyForm.append("file_param_name", "editormd-image-file");
oMyForm.append("byxhr", "true");
oMyForm.append("file", file);
// oMyForm.append("file_param_name", "editormd-image-file");
// oMyForm.append("byxhr", "true");
var xhr = new window.XMLHttpRequest();
xhr.addEventListener("load",
function (_xhr) {

View File

@ -782,7 +782,7 @@ class App extends Component {
} />
<Route exact path="/"
render={
(props) => (<ShixunsHome {...this.props} {...props} {...this.state}></ShixunsHome>)
(props) => (<Projects {...this.props} {...props} {...this.state}></Projects>)
}
/>
<Route component={Shixunnopage} />

View File

@ -86,7 +86,7 @@ export function getUrl(path, goTest) {
// testbdweb.educoder.net testbdweb.trustie.net
// const local = goTest ? 'https://testeduplus2.educoder.net' : 'http://localhost:3000'
// const local = 'https://testeduplus2.educoder.net'
const local = 'https://testforgeplus.trustie.net/'
const local = 'https://testforgeplus.trustie.net'
if (isDev) {
return `${local}${path?path:''}`
}
@ -155,35 +155,28 @@ export function getmyUrl(geturl) {
}
export function getUploadActionUrl(path, goTest) {
// Railsgettimes()
let anewopens=md5(newopens+newtimestamp);
return `${getUrl()}/api/attachments.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`;
return `${getUrl()}/api/attachments.json?debug=${window._debugType || 'admin'}`;
}
export function getUploadLogoActionUrl() {
let anewopens=md5(newopens+newtimestamp);
return `${getUrl()}/api/resumes/logo.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`;
return `${getUrl()}/api/resumes/logo.json?debug=${window._debugType || 'admin'}`;
}
export function getUploadActionUrltwo(id) {
let anewopens=md5(newopens+newtimestamp);
return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
return `${getUrlmys()}/api/shixuns/${id}/upload_data_sets.json?debug=${window._debugType || 'admin'}`
}
export function getUploadActionUrlthree() {
let anewopens=md5(newopens+newtimestamp);
return `${getUrlmys()}/api/jupyters/import_with_tpm.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
return `${getUrlmys()}/api/jupyters/import_with_tpm.json?debug=${window._debugType || 'admin'}`
}
export function getupload_git_file(id) {
let anewopens=md5(newopens+newtimestamp);
return `${getUrlmys()}/api/shixuns/${id}/upload_git_file.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
return `${getUrlmys()}/api/shixuns/${id}/upload_git_file.json?debug=${window._debugType || 'admin'}`
}
export function getUploadActionUrlOfAuth(id) {
let anewopens=md5(newopens+newtimestamp);
return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json${isDev ? `?debug=${window._debugType || 'admin'}&randomcode=${newtimestamp}&client_key=${anewopens}` : `?randomcode=${newtimestamp}&client_key=${anewopens}`}`
return `${getUrl()}/api/users/accounts/${id}/auth_attachment.json?debug=${window._debugType || 'admin'}`
}
export function getRandomNumber(type) {
@ -205,15 +198,7 @@ export function getTaskUrlById(id) {
}
export function getRandomcode(url) {
Railsgettimes()
let anewopens=md5(newopens+newtimestamp);
if (url.indexOf('?') == -1) {
return `${url}?randomcode=${newtimestamp}&client_key=${anewopens}`
}else {
return `${url}&randomcode=${newtimestamp}&client_key=${anewopens}`
}
return url;
}
export function htmlEncode(str) {

View File

@ -1,7 +1,7 @@
import React , { Component } from 'react';
import {Menu, Spin} from 'antd';
import { getImageUrl , markdownToHTML } from 'educoder';
import { Router , Route , Link } from 'react-router-dom';
import { Link } from 'react-router-dom';
import Top from './DetailTop';
import './list.css';
@ -10,11 +10,10 @@ import SelectBranch from '../Branch/SelectBranch';
import CloneAddress from '../Branch/CloneAddress';
import RootTable from './RootTable';
import CoderRootFileDetail from './CoderRootFileDetail';
import NullData from './NullData';
import { truncateCommitId } from '../common/util';
import RenderHtml from '../../components/render-html';
import axios from 'axios';
import img_fork from "../Images/fork.png";
/**
* address:http和SSHhttp_url(对应git地址)
* branch:当前分支
@ -241,7 +240,7 @@ class CoderRootDirectory extends Component{
<div className="commonBox-info">
{
readMeContent[0].content ?
<div className={"markdown-body readme-index"} dangerouslySetInnerHTML={{__html: markdownToHTML(readMeContent[0].content).replace(/▁/g, "▁▁▁")}}></div>
<RenderHtml className="break_word_comments" value={readMeContent[0].content} />
:
<span>暂无~</span>
}

View File

@ -7,7 +7,7 @@ import Nav from '../Order/Nav';
import UploadComponent from '../Upload/Index';
import { getImageUrl } from 'educoder';
import{ Modal , Form , Input , Select } from 'antd'
import QuillForEditor from '../quillForEditor';
import MDEditor from '../../modules/tpm/challengesnew/tpm-md-editor';
import Attachments from '../Upload/attachment'
@ -195,9 +195,6 @@ class UpdateMerge extends Component{
const { issue_tag_ids , fixed_version_id , assigned_to_id , issue_chosen , subject, textcount,get_attachments } = this.state;
return(
<div className="main">
{/*<div className="topWrapper">*/}
{/*<Nav {...this.props} {...this.state}/>*/}
{/*</div>*/}
<div>
<Form>
<div className="f-wrap-between mt20" style={{alignItems:"flex-start"}}>
@ -216,26 +213,8 @@ class UpdateMerge extends Component{
<Input placeholder="标题" onChange={this.changmodelname}/>
)}
</Form.Item>
{/* <Form.Item>
{getFieldDecorator('body', {
rules: [],
initialValue: textcount
})(
<TextArea placeholder="请输入任务的描述..." style={{height:"300px"}} onChange={this.changmodelcount}/>
)}
</Form.Item> */}
<QuillForEditor
value = {this.stringJson(textcount)}
wrapStyle={{
height: '240px',
opacity:1,
}}
// autoFocus={true}
style={{ height: '170px' }}
placeholder="请输入合并请求的描述..."
options={options}
onContentChange={this.onContentChange}
/>
<MDEditor placeholder={'请输入合并请求的描述...'} height={200}
mdID={`orderdetail-add-description`} initValue={textcount} onChange={this.textcount} ></MDEditor>
<UploadComponent load={this.UploadFunc} showNotification={this.props.showNotification} isComplete={true} ></UploadComponent>
{
get_attachments ?

View File

@ -144,14 +144,10 @@ class New extends Component{
render(){
const { getFieldDecorator } = this.props.form;
const { current_user } = this.props;
const { issue_tag_ids , fixed_version_id , branch_name , status_id , tracker_id , description ,assigned_to_id , priority_id , done_ratio,
issue_chosen , branches } = this.state;
const { description , issue_chosen , branches } = this.state;
return(
<div className="main">
{/*<div className="topWrapper">*/}
{/*<Nav {...this.props} {...this.state} />*/}
{/*</div>*/}
<Form>
<div className="f-wrap-between mt20" style={{alignItems:"flex-start"}}>
<div className="list-right df">
@ -230,7 +226,7 @@ class New extends Component{
required: true, message: '请选择完成状态'
}],
})(
<Select value={status_id}>
<Select>
{ this.renderSelect(issue_chosen && issue_chosen.issue_status) }
</Select>
)}

View File

@ -1,10 +1,8 @@
import React , { Component } from "react";
import {Link} from 'react-router-dom';
import { Input ,Dropdown , Menu , Icon , Pagination , Spin, Button } from 'antd';
import { Input ,Dropdown , Menu , Icon , Pagination , Spin } from 'antd';
import './order.css';
import NoneData from '../Nodata';
import Nav from './Nav';
import OrderItem from './OrderItem';
import axios from 'axios';