this.props.showDrawer()} >
+
+ 132
+
+
diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css
index f61cfb8fd..fb33d40df 100644
--- a/public/react/src/modules/question/questioncss/questioncom.css
+++ b/public/react/src/modules/question/questioncss/questioncom.css
@@ -882,3 +882,13 @@
border-radius: 4px;
top: -50%;
}
+.shitikussmys{
+ width:29px;
+ height:20px;
+ background:#FF6601;
+ border-radius:10px;
+ position: absolute;
+ font-size:11px;
+ color:#ffffff;
+ line-height:14px;
+}
From 8836be0717922173c7ab7b3d395d9519d4d09df1 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Mon, 6 Jan 2020 20:45:50 +0800
Subject: [PATCH 2/6] =?UTF-8?q?=E7=BC=96=E7=A0=81=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/shixuns_controller.rb | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb
index 7009726d8..4e749ab0d 100644
--- a/app/controllers/shixuns_controller.rb
+++ b/app/controllers/shixuns_controller.rb
@@ -888,9 +888,10 @@ 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"
From 5578c687897b545a160048e18f54d7c154a64bbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 6 Jan 2020 20:51:24 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E9=A2=98=E5=BA=93=E5=88=86=E6=94=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/question/questioncss/questioncom.css | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/public/react/src/modules/question/questioncss/questioncom.css b/public/react/src/modules/question/questioncss/questioncom.css
index fb33d40df..8db839b31 100644
--- a/public/react/src/modules/question/questioncss/questioncom.css
+++ b/public/react/src/modules/question/questioncss/questioncom.css
@@ -883,12 +883,12 @@
top: -50%;
}
.shitikussmys{
- width:29px;
- height:20px;
- background:#FF6601;
- border-radius:10px;
- position: absolute;
- font-size:11px;
- color:#ffffff;
- line-height:14px;
+ 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:14px !important;
}
From 37bbeee28ebe1dfce22764047af9f97794caad71 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Tue, 7 Jan 2020 09:11:08 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/shixuns_controller.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb
index 4e749ab0d..35aee9ffa 100644
--- a/app/controllers/shixuns_controller.rb
+++ b/app/controllers/shixuns_controller.rb
@@ -895,6 +895,7 @@ class ShixunsController < ApplicationController
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
From 0f6103a04452b963a197bc2036d8fb5fcce4dbd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Tue, 7 Jan 2020 09:57:27 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E9=A2=98=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/question/Question.js | 63 ++++++++++++++-----
.../modules/question/animation/parabola.js | 51 +++++++++++++++
.../modules/question/component/SiderBars.js | 17 +++--
.../question/questioncss/questioncom.css | 24 ++++++-
public/react/src/modules/tpm/TPMIndex.css | 28 ++++++++-
5 files changed, 159 insertions(+), 24 deletions(-)
create mode 100644 public/react/src/modules/question/animation/parabola.js
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/SiderBars.js b/public/react/src/modules/question/component/SiderBars.js
index ae5d16136..66ccb77dc 100644
--- a/public/react/src/modules/question/component/SiderBars.js
+++ b/public/react/src/modules/question/component/SiderBars.js
@@ -93,10 +93,10 @@ class SiderBars extends Component {
// console.log(this.props);
var mypath= this.props&&this.props.match&&this.props.match.path;
- let{myvisible}=this.props;
+ let{myvisible,Datacount,animateStyle}=this.props;
return (
-
+
0?"-task-sidebar mystask-sidebars":"-task-sidebar mystask-sidebarss"} >
{this.props.mygetHelmetapi&&this.props.mygetHelmetapi.main_site===true?
@@ -104,10 +104,15 @@ class SiderBars extends Component {
mypath&&mypath==="/question"?
- this.props.showDrawer()} >
-
- 132
-
+
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 8db839b31..b6c068a50 100644
--- a/public/react/src/modules/question/questioncss/questioncom.css
+++ b/public/react/src/modules/question/questioncss/questioncom.css
@@ -890,5 +890,27 @@
position: absolute !important;
font-size:11px !important;
color:#ffffff !important;
- line-height:14px !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;
}
From 51339a5d5e003f0f4a98ed2a9766f88ee98c3be1 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Tue, 7 Jan 2020 10:26:36 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/concerns/git_helper.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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