Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王琮
platform
Commits
547f3311
Commit
547f3311
authored
Oct 31, 2021
by
Asjoker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
问卷管理-搭积木
parent
8ba8ee0e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1505 additions
and
121 deletions
+1505
-121
questionnaire_information.jsp
...n/webapp/WEB-INF/page/space/questionnaire_information.jsp
+1311
-93
questionnaire_Information.js
src/main/webapp/res/js/space/questionnaire_Information.js
+194
-28
No files found.
src/main/webapp/WEB-INF/page/space/questionnaire_information.jsp
View file @
547f3311
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/webapp/res/js/space/questionnaire_Information.js
View file @
547f3311
...
...
@@ -6,44 +6,152 @@ $(function () {
calendarWeeks
:
true
,
autoclose
:
true
});
// getClassShow();
// if(material_id!="null"){
// $("#project_information_title").html("编辑素材");
// getMaterialInformation();
// }
// if(exerciseID!="null"){
// $("#exerciseType").val(exerciseType); //活动方式
// $("#exerciseID").val(exerciseID); //活动id
// getMaterialInformationExercise();
// }
// $('.i-checks').iCheck({
// checkboxClass : 'icheckbox_square-green',
// radioClass : 'iradio_square-green',
// });
all_order
();
testListApi
();
})
var
i
=
1
;
$
(
".td"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
var
oTable
;
function
deleteRow
(
r
){
var
i
=
r
.
parentNode
.
parentNode
.
rowIndex
;
document
.
getElementById
(
'professionalEmploy'
).
deleteRow
(
i
);
// 各表格序号-总方法
function
all_order
()
{
employ_order
();
incubates_order
();
newPost_order
();
newCourse_order
();
newTeacher_order
();
activity_order
();
competition_order
();
twelve_order
();
thirteen_order
();
borrow_order
();
fourteen_order
();
fifteen_order
();
sixteen_order
();
seventeen_order
();
eighteen_order
();
nineteen_order
();
}
function
fun
(){
var
$td
=
$
(
"#professionalFirst"
).
clone
();
//增加一行,克隆第一个对象
$
(
".professionalEmploy"
).
append
(
$td
);
// 各表格序号计数方法
function
employ_order
()
{
var
i
=
1
;
$
(
".professionalEmploy_num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
incubates_order
()
{
var
i
=
1
;
$
(
".incubates_num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
newPost_order
()
{
var
i
=
1
;
$
(
".newPost_num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
newCourse_order
()
{
var
i
=
1
;
$
(
".newCourse-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
newTeacher_order
()
{
var
i
=
1
;
$
(
".
td"
).
each
(
function
(){
//增加一行后重新更新序号1,2,3......
$
(
".
newTeacher-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
activity_order
()
{
var
i
=
1
;
$
(
".activity-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
competition_order
()
{
var
i
=
1
;
$
(
".competition-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
twelve_order
()
{
var
i
=
1
;
$
(
".twelve-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
thirteen_order
()
{
var
i
=
1
;
$
(
".thirteen-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
borrow_order
()
{
var
i
=
1
;
$
(
".borrow-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
fourteen_order
()
{
var
i
=
1
;
$
(
".fourteen-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
fifteen_order
()
{
var
i
=
1
;
$
(
".fifteen-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
sixteen_order
()
{
var
i
=
1
;
$
(
".sixteen-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
seventeen_order
()
{
var
i
=
1
;
$
(
".seventeen-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
eighteen_order
()
{
var
i
=
1
;
$
(
".eighteen-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
function
nineteen_order
()
{
var
i
=
1
;
$
(
".nineteen-num"
).
each
(
function
(){
$
(
this
).
html
(
i
++
);
})
}
// 表格加行方法
function
fun
(
table
,
row1
,
max
){
//增加一行,克隆第一个对象
var
$tempRow
=
$
(
'#'
+
row1
);
var
tempTable
=
$
(
table
);
if
(
tempTable
.
find
(
"tr"
).
length
-
1
<
max
)
{
var
$td
=
$tempRow
.
clone
();
$
(
tempTable
).
append
(
$td
);
all_order
();
$
(
"table tr:last"
).
find
(
":input"
).
val
(
''
);
//将尾行元素克隆来的保存的值清空
}
}
function
del
(){
$
(
"table tr:not(:first):not(:first):last"
).
remove
();
//移除最后一行,并且保留前两行
// 表格删除当前行方法
function
del
(
$td
,
limit
){
//移除最后一行,并且保留前两行
var
$tr
;
$tr
=
$
(
$td
.
parentNode
).
parent
();
if
(
$tr
.
prevAll
().
length
+
1
>
limit
)
{
$tr
.
remove
();
all_order
();
}
}
// 上传多个附件
...
...
@@ -134,3 +242,61 @@ function getMaterialInformationExercise(){
}
});
}
function
testListApi
()
{
var
url
=
webroot
+
"questionnaire/selectRecordList?questionnaireUuid=1"
;
$
(
document
).
ready
(
function
()
{
oTable
=
$
(
'#hidden-table-info'
).
dataTable
(
{
"bPaginage"
:
true
,
/*默认为true,是否开启分页功能,即使设置为false,仍然会有一个默认的<前进,后退>分页组件 */
"bDeferRender"
:
true
,
//延迟渲染 是否延迟渲染,当用Ajax或者js方式加载数据时开启延迟渲染会带来很大的速度提升* 当该属性设置为true时,表格每一行新增的元素只有在需要被画出来时才会被DataTable创建出来
"bDestroy"
:
true
,
//销毁表格对象
"aLengthMenu"
:
[
5
,
10
,
25
,
50
],
//用户可自选每页展示数量 5条或10条
"searching"
:
false
,
//禁用搜索(搜索框)
"lengthChange"
:
true
,
//是否允许终端用户从一个选择列表中选择分页的页数,页数为10,25,50和100,需要分页组件bPaginate的支持
"bStateSave"
:
true
,
//是否打开客户端状态记录功能,此功能在ajax刷新纪录的时候不会将个性化设定回复为初始化状态, 这样当终端用户重新加载这个页面的时候可以使用以前的设置
"bSort"
:
false
,
//是否启动各个字段的排序功能 是否开启列排序
"bProcessing"
:
true
,
//当表格在处理的时候(比如排序操作)是否显示“处理中...”
//"aaSorting" : [[0, "asc"]],//默认的排序方式,第1列,升序排列
"bServerSide"
:
true
,
//开启服务器模式 配置DataTable使用服务器端处理,注意,sAjaxSource参数必须指定
//"bFilter" : true, //是否启动过滤、搜索功能
"bAutoWidth"
:
false
,
"retrieve"
:
true
,
//类似单例模式,重复利用以存在对象。使用指定的选择器检索表格,注意,如果表格已经被初始化,该参数会直接返回已经被创建的对象 * 并不会顾及你传递进来的初始化参数对象的变化,将该参数设置为true说明你确认已经明白这一点 * 如果你需要的话,bDestroy可以用来重新初始化表格
/* "iDisplayLength": 5,
"iDisplayStart": 0,*/
"select"
:
{
style
:
'os'
,
selector
:
'td:first-child'
},
"ajax"
:
{
//ajax方式向后台发送请求
"type"
:
"POST"
,
"url"
:
url
,
"dataType"
:
"json"
,
"dataSrc"
:
"data.recordList"
},
"columns"
:
[
{
"sTitle"
:
"众创空间名称"
,
"mData"
:
"createBy"
},
{
"sTitle"
:
"填报人"
,
"mData"
:
"writePeople"
},
{
"sTitle"
:
"联系方式"
,
"mData"
:
"phoneNumber"
},
{
"sTitle"
:
"填报状态"
,
"mData"
:
"processStatus"
}
],
"oLanguage"
:
{
// 国际化配置
"sProcessing"
:
"正在获取数据,请稍后..."
,
"sLengthMenu"
:
"每页 _MENU_ 条记录"
,
"sZeroRecords"
:
"没有找到数据"
,
"sInfo"
:
"显示 _START_ 到 _END_ 项 共 _TOTAL_ 项"
,
"sInfoEmpty"
:
"记录数为0"
,
"sInfoFiltered"
:
"(全部记录数 _MAX_ 条)"
,
"sInfoPostFix"
:
""
,
// "sSearch" : "查询",
"sUrl"
:
""
,
"oPaginate"
:
{
"sFirst"
:
"第一页"
,
"sPrevious"
:
"上一页"
,
"sNext"
:
"下一页"
,
"sLast"
:
"最后一页"
}
},
});
}
);
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment