diff --git a/app/controllers/concerns/git_helper.rb b/app/controllers/concerns/git_helper.rb
index efc073c86..7c031f24c 100644
--- a/app/controllers/concerns/git_helper.rb
+++ b/app/controllers/concerns/git_helper.rb
@@ -41,8 +41,8 @@ module GitHelper
# 更新文件代码
# content: 文件内容;message:提交描述
def update_file_content(content, repo_path, path, mail, username, message)
- content = Base64.encode64(content)
- GitService.update_file_base64(repo_path: repo_path, file_path: path, message: message,
+ #content = Base64.encode64(content)
+ GitService.update_file(repo_path: repo_path, file_path: path, message: message,
content: content, author_name: username, author_email: mail)
end
diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb
index 7009726d8..35aee9ffa 100644
--- a/app/controllers/shixuns_controller.rb
+++ b/app/controllers/shixuns_controller.rb
@@ -888,12 +888,14 @@ class ShixunsController < ApplicationController
def upload_git_file
upload_file = params["file"]
- uid_logger("#########################file_params####{params["#{params[:file]}"]}")
+ uid_logger("#########################file_params##: #{params["file"]}")
raise "未上传文件" unless upload_file
content = upload_file.tempfile.read
+ uid_logger("#########################content####{content}")
author_name = current_user.real_name
author_email = current_user.git_mail
message = params[:message] || "upload file by browser"
+ uid_logger("-----author_email: #{author_email}")
update_file_content(content, @repo_path, @path, author_email, author_name, message)
render_ok
end
diff --git a/public/react/src/modules/question/Question.js b/public/react/src/modules/question/Question.js
index 51d50932e..44d42ac6c 100644
--- a/public/react/src/modules/question/Question.js
+++ b/public/react/src/modules/question/Question.js
@@ -11,6 +11,7 @@ import {
Input,
Tooltip
} from "antd";
+import {parabola} from './animation/parabola'
import Headplugselections from "./component/Headplugselections";
import QuestionModal from "./component/QuestionModal";
import QuestionModals from "./component/QuestionModals";
@@ -63,6 +64,7 @@ class Question extends Component {
disciplinesdatazsd:0,
selectallquestionsonthispages:false,
oj_status:null,
+ isVisible: false,
}
}
@@ -206,6 +208,7 @@ class Question extends Component {
}
+ //刷新加载
getdata = (data) => {
const url = `/item_banks.json`;
this.setState({
@@ -240,6 +243,34 @@ class Question extends Component {
});
}
+ //不刷新加载
+ getdatasy = (data) => {
+ const url = `/item_banks.json`;
+
+ axios.get((url), {params: data}).then((response) => {
+ setTimeout(()=>{
+
+ },1000);
+ if (response === null || response === undefined) {
+
+ return
+ }
+ if (response.data.status === 403 || response.data.status === 401 || response.data.status === 500) {
+
+ } else {
+
+ }
+ ////console.log("item_banks");
+ ////console.log(response);
+ this.setState({
+ Contentdata: response.data,
+ items_count: response.data.items_count,
+ })
+ }).catch((error) => {
+
+ });
+ }
+
paginationonChange = (pageNumber) => {
this.setState({
page: pageNumber,
@@ -574,11 +605,11 @@ class Question extends Component {
page: this.state.page,
per_page:10,
};
- this.getdata(data);
+ this.getdatasy(data);
this.getbasket_listdata();
- this.setState({
- visible:true
- })
+ // this.setState({
+ // visible:true
+ // })
}
}).catch((error) => {
//console.log(error);
@@ -689,6 +720,10 @@ class Question extends Component {
};
this.getdata(data);
}
+
+
+
+
render() {
let {
page, per_page, items_count, Headertop, visible, placement, modalsType, modalsTypes,basket_list,
@@ -701,8 +736,11 @@ class Question extends Component {
+ program_questions_count
+ single_questions_count
+ subjective_questions_count;
+
+
+
return (
-
+
{
visible===true?
this.showDrawer()}
- Headertop={Headertop}/>
+ Headertop={Headertop}
+
+ />
{/*顶部*/}
@@ -781,6 +822,7 @@ class Question extends Component {
/>
{/*头部*/}
this.getitem_basketss(id)}
selectallquestionsonthispage={()=>this.selectallquestionsonthispage()}
getitem_baskets={(e)=>this.getitem_baskets(e)}
@@ -957,12 +999,3 @@ class Question extends Component {
}
export default SnackbarHOC()(TPMIndexHOC(Question));
-{/* this.onClose()}*/}
-{/* visible={visible}*/}
-{/* mask={false}*/}
-{/* closable={true}*/}
-{/*>*/}
diff --git a/public/react/src/modules/question/animation/parabola.js b/public/react/src/modules/question/animation/parabola.js
new file mode 100644
index 000000000..439babd9d
--- /dev/null
+++ b/public/react/src/modules/question/animation/parabola.js
@@ -0,0 +1,51 @@
+/**
+ * 抛物线动画函数
+ * @param ballWrapper 小球的父容器
+ * @param origin 动画起点DOM
+ * @param target 动画目标DOM
+ * @param time 持续时间
+ * @param a 抛物线参数
+ * @param offset 动画尺寸
+ * @param callback 回调
+ */
+
+export function parabola(config) {
+ const {
+ ballWrapper,
+ origin,
+ target,
+ time = 1000,
+ a = 0.004,
+ callback,
+ finish,
+ offset = 0
+ } =
+ config || {};
+ const ballWrapperDimension = ballWrapper.getBoundingClientRect();
+ const originDimension = origin.getBoundingClientRect();
+ const targetDimension = target.getBoundingClientRect();
+ const x1 = originDimension.left + 0.5 * originDimension.width;
+ const y1 = originDimension.top + 0.5 * originDimension.height;
+ const x2 = targetDimension.left + 0.5 * targetDimension.width;
+ const y2 = targetDimension.top + 0.5 * targetDimension.height;
+ const diffx = x2 - x1;
+ const diffy = y2 - y1;
+ const speedx = diffx / time;
+ const b = (diffy - a * diffx * diffx) / diffx;
+
+ const refPoint_x = x1 - ballWrapperDimension.left - 0.5 * offset;
+ const refPoint_y = y1 - ballWrapperDimension.top - 0.5 * offset;
+
+ const start = Date.now();
+ const timer = setInterval(() => {
+ if (Date.now() - start > time) {
+ finish();
+ clearInterval(timer);
+ return;
+ }
+
+ const x = speedx * (Date.now() - start);
+ const y = a * x * x + b * x;
+ callback && callback(refPoint_x + x, refPoint_y + y);
+ }, 15);
+}
diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js
index 859ab9dd2..60960585f 100644
--- a/public/react/src/modules/question/component/Contentpart.js
+++ b/public/react/src/modules/question/component/Contentpart.js
@@ -71,7 +71,7 @@ class Contentpart extends Component {
const contents = (
this.props.setoj_status(null)}>全部
@@ -173,18 +173,6 @@ class Contentpart extends Component {
}
-
-
-
- {/*
trigger.parentNode} placement="bottom" trigger="hover" content={content} onVisibleChange={()=>this.props.handleVisibleChanges(true)}>*/}
- {/**/}
- {/*
*/}
- {/* 题型*/}
- {/*
*/}
- {/*
*/}
- {/*
*/}
- {/**/}
-
{
defaultActiveKey===0||defaultActiveKey==="0"?
+ 0?"-task-sidebar mystask-sidebars":"-task-sidebar mystask-sidebarss"} >
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?
{
mypath&&mypath==="/question"?
- this.props.showDrawer()} >
+
+
this.props.showDrawer()} >
+
+ {
+ Datacount&&Datacount>0?
+
+ {Datacount}
+
+ :""
+ }
+
diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css
index f61cfb8fd..b6c068a50 100644
--- a/public/react/src/modules/question/questioncss/questioncom.css
+++ b/public/react/src/modules/question/questioncss/questioncom.css
@@ -882,3 +882,35 @@
border-radius: 4px;
top: -50%;
}
+.shitikussmys{
+ width:29px !important;
+ height:20px!important;
+ background:#FF6601 !important;
+ border-radius:10px !important;
+ position: absolute !important;
+ font-size:11px !important;
+ color:#ffffff !important;
+ line-height:20px !important;
+ top: -14px !important;
+ right: -14px !important;
+}
+
+
+.maxnamewidth30{
+ max-width: 30px;
+ overflow:hidden;
+ text-overflow:ellipsis;
+ white-space:nowrap;
+ cursor: default;
+}
+.ball {
+ width: 8px;
+ height: 8px;
+ background: #FF6601;
+ position: absolute;
+ left: 0;
+ top: 0;
+ border-radius: 50%;
+ opacity: 0;
+ z-index: 1;
+}
diff --git a/public/react/src/modules/tpm/TPMIndex.css b/public/react/src/modules/tpm/TPMIndex.css
index d5b8ef5c2..4f19260aa 100644
--- a/public/react/src/modules/tpm/TPMIndex.css
+++ b/public/react/src/modules/tpm/TPMIndex.css
@@ -268,8 +268,32 @@ body>.-task-title {
background: #EEEEEE;
}
.mystask-sidebar{
- right: 210px !important;
+ right: 220px !important;
}
.mystask-sidebars{
- right: 10px !important;
+ right: 20px !important;
+}
+.shitikussmys{
+ width:29px !important;
+ height:20px!important;
+ background:#FF6601 !important;
+ border-radius:10px !important;
+ position: absolute !important;
+ font-size:11px !important;
+ color:#ffffff !important;
+ line-height:20px !important;
+ top: -13px !important;
+ right: -10px !important;
+}
+
+
+.maxnamewidth30{
+ max-width: 30px;
+ overflow:hidden;
+ text-overflow:ellipsis;
+ white-space:nowrap;
+ cursor: default;
+}
+.mystask-sidebarss{
+ right: 5px !important;
}