'
- }
- screenid = '';//清空screenid,进行下次赋值
- }
-
- var Divpush = `
`
-
- $('.Screen').append(Divpush);
-
-}
-//单击筛选tab事件
-function switchnav(id){
- var whole,screenid;
- if(id && id != 0){
- $("#zhuanghu_xila .xian").remove();
- $("#nav"+id).append("
");
- $("#zhuanghu_xila .zhuang_conetnt").empty();
-
- if(ScreenArr[id]['Category'].length > 0){
- whole= `
'
- screenid = '';//清空screenid,进行下次赋值
- }else {
- $("#zhuanghu_xila .xian").remove();
- $("#nav"+id).append("
");
- $("#zhuanghu_xila .zhuang_conetnt").empty();
- for(let i in ScreenArr){
- if(ScreenArr[i]['Category'].length > 0){
- if(whole){
- whole= whole+ `
`
- }else {
- whole= `
`+ ScreenArr[i]['title'] +`
`
- }
- }
- for(let j in ScreenArr[i]['Category']){
- if(screenid){
- screenid = screenid + '
'+ ScreenArr[i]['Category'][j]['title'] +'
'
- }else {
- screenid = '
'+ ScreenArr[i]['Category'][j]['title'] +'
'
- }
- }
- if(whole){
- whole = whole + screenid+'
'
- }
- screenid = '';//清空screenid,进行下次赋值
- }
- }
- $('.zhuang_conetnt').append(whole);
-}
-
-function querytab(){
- var txt = $("#zhuanghu_txt").val();
- console.log(txt);
- if(txt == ""){
- $(".qingkomg").hide();
- }else {
- $(".qingkomg").show();
- }
- var whole,screenid;
- $("#zhuanghu_xila .zhuang_conetnt").empty();
-
- for(let i in ScreenArr){
- if(ScreenArr[i]['Category'].length > 0){
- if(whole){
- whole= whole+ `
`+ ScreenArr[i]['title'] +`
`
- }else {
- whole= `
`+ ScreenArr[i]['title'] +`
`
- }
- }
- for(let j in ScreenArr[i]['Category']){
- if(ScreenArr[i]['Category'][j]['title'].indexOf(txt) != -1){
- if(screenid){
- screenid = screenid + '
'+ ScreenArr[i]['Category'][j]['title'] +'
'
- }else {
- screenid = '
'+ ScreenArr[i]['Category'][j]['title'] +'
'
- }
- }
- }
- if(whole){
- whole = whole + screenid+'
'
- }
- screenid = '';//清空screenid,进行下次赋值
- }
-
-
-
- whole = whole + screenid+'
'
- screenid = '';//清空screenid,进行下次赋值
- $('.zhuang_conetnt').append(whole);
-}
-
-function ScreenClick(id){
- $("#zhuanghu_xila").hide();
- $("#zhuanghu_xila").empty();
- var judge_boxtxt = $('#judge_box').val();
- var data ={};
- for(let i in ScreenArr){
- for(let j in ScreenArr[i]['Category']){
- if(ScreenArr[i]['Category'][j]['id'] == id){
- data = ScreenArr[i]['Category'][j];
- break;
- }
- }
- }
-
- if(data['type'] == 'time'){
- $(".judge_box").hide();
- $(".search_txt").hide();
- $(".time-box").show();
- }else {
- $(".judge_box").show();
- if(judge_boxtxt == 4 || judge_boxtxt == 5){
- $("#judge_input").val('');
- $("#judge_input").hide();
- }else {
- $(".search_txt").show();
- }
- $(".time-box").hide();
- }
- $("#zhanghu_box span").html(data['title']);
- $("#zhanghu_box").attr('title',data['title']);
- $(".Screen").hide();
- $(".Screen").empty();
-}
-
-$("#judge_box").change(function(){
- var judgeid = $(this).val();
- if(judgeid == 4 || judgeid == 5){
- $('#judge_input').css('display','none')
- }else {
- $('#judge_input').css('display','block')
- }
-})
-
-var locale = {
- "format": 'YYYY-MM-DD',
- "separator": " - ",
- "applyLabel": "应用",
- "cancelLabel": "取消",
- "fromLabel": "起始时间",
- "toLabel": "结束时间'",
- "customRangeLabel": "自定义",
- "weekLabel": "W",
- "daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
- "monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
- "firstDay": 1
-};
-$('.timechoice').daterangepicker({
- 'locale': locale,
- ranges: {
- '今日': [moment(), moment()],
- '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
- '最近7日': [moment().subtract(6, 'days'), moment()],
- '最近30日': [moment().subtract(29, 'days'), moment()],
- '上周': [moment().subtract(1, 'week').startOf('week'), moment().subtract(1, 'week').endOf('week')],
- '本周': [moment().startOf('week'), moment()],
- '本月': [moment().startOf('month'), moment().endOf('month')],
- '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')
- ]
- },
- "alwaysShowCalendars": true,
- "startDate": moment().subtract(29, 'days'),
- "endDate": new Date(),
- "opens": "right",
-}, function (start, end, label) {
- // console.log(moment().subtract(1, 'month'))
- // console.log('New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')');
-});
-
-// 侧边栏导航
-
-//看板数组
-var KanBanData = [
- {
- 'title':'共享给我的','id':'share','type':'ordinary','Category': [
- {'title': '共享给我的测试1','id':'share_0' },
- {'title': '共享给我的测试2','id':'share_1' }
- ]
- },
- {
- "title":'未分组','id':'Ungrouped','type':'ordinary','Category':[
- {'title':'未分组测试1','id':'Ungrouped_0'},
- {'title':'未分组测试2','id':'Ungrouped_1'},
- ]
- },
- {
- "title":'创建文件夹','id':'establish','type':'file','Category':[
- {'title':'创建测试1','id':'establish_0'},
- {'title':'创建测试2','id':'establish_2'},
- ]
- }
-]
-
-// 项目数组
-var ProjectData = [
- {
- "title":'DEMO空间',
- 'id':'demo',
- 'type':'ordinary',
- 'Category':[
- {'title':'测试2','id':'ceshi_2','type':'ordinary','Category':[]},
- {'title':'测试3','id':'ceshi_3','type':'ordinary','Category':[]},
- {'title':'测试4','id':'ceshi_4','type':'ordinary','Category':[]},
- {'title':'测试5','id':'ceshi_5','type':'ordinary','Category':[]},
- ]
- },
- {
- "title":'未分组','id':'ceshi','type':'ordinary','Category':[
- {'title':'测试1','id':'ceshi_0','type':'file','Category':[
- {'title':'测试7','id':'ceshi_7','type':'ordinary'},
- ]},
- {'title':'测试6','id':'ceshi_6','type':'ordinary','Category':[]},
- ]
- }
-]
-
-
-$('.category').on("mouseover",function(){
- // "鼠标移入时想要的效果"
- $(this).addClass("classa");
-});
-$('.category').on("mouseout",function(){
- // "鼠标移出事想要的效果"
- $(this).removeClass("classa");
-});
-$(".layui-left-dd").on("mouseover",function(){
- console.log(1111)
- $(this).addClass("onlevel");
-})
-$('.layui-left-dd').on("mouseout",function(){
- // "鼠标移出事想要的效果"
- $(this).removeClass("onlevel");
-});
-
-var TabOperationData = [
- {'type':'kanban','tanchuang':[
- {'title':'重命名','img':'xiugai.png','click':'modifyname'},
- {'title':'移动至','img':'yidong.png','click':'move'},
- {'title':'复制看板','img':'fuzhi.png','click':'copy'},
- {'title':'删除看板','img':'del.png','click':'del'},
- ]},
- {'type':'wenjian','tanchuang':[
- {'title':'重新命名','img':'xiugai.png','click':'modifyname'},
- {'title':'删除文件夹','img':'del.png','click':'del'},
- ]},
- {'type':'baobiao','tanchuang':[
- {'title':'复制看板','img':'fuzhi.png','click':'copy'}
- ]},
-]
-var tabbut=''
-//二级导航操作按钮
-function TabOperation(e,type,id,name){
- $("#TabOperation").empty();
- var lihtml =''
- for(let i in TabOperationData){
- if(TabOperationData[i]['type'] == type){
- for(let j in TabOperationData[i]['tanchuang']){
- lihtml +=`
-
- `+ TabOperationData[i]['tanchuang'][j]['title'] +`
- `
- }
- }
- }
-
- $('#TabOperation').append(lihtml);
- var obj = $(e).offset();
- $(e).parents("a").removeClass("category");
- $(e).parents("a").addClass("category2");
- popid = 'TabOperation_box';
- tabbut = e
- $('#zhezhao_bg').show();
- $(".TabOperation_box").show();
- $(".TabOperation_box").css('top',obj.top+$(e).height())
- $(".TabOperation_box").css('left',obj.left-90)
-}
-
-$("#modifyname-cha").click(function(){
- $(".modifyname-bg").hide();
-})
-var SelectTabId
-// 侧边栏操作事件
-function TabOperationtab(id,type,name){
- $("#"+popid).hide();
- $(tabbut).parents("a").removeClass("category2");
- $(tabbut).parents("a").addClass("category");
- SelectTabId = id
- if(type == 'modifyname'){
- $("#modifyname-txt").val(name);
- $('.modifyname-bg').show();
- $("#modifynameid").val(id);
- }else if(type == 'move'){
- var comboTree1
- comboTree1 = $('.justAnotherInputBox1').comboTree({
- source : KanBanData,
- isMultiple: false
- });
- $('.yidong-bg').show();
- $("#yidongid").val(id);
- }else if(type == 'copy'){
- var comboTree1
- $("#copyname-txt").val(name);
- comboTree1 = $('.justAnotherInputBox1').comboTree({
- source : KanBanData,
- isMultiple: false
- });
- $('.copy-bg').show();
- $("#copyid").val(id);
- }else {
- $("#del-tit").html(name);
- $('.del-bg').show();
- $("#delid").val(id);
- }
- $("#zhezhao_bg").hide();
-}
-
-$("#modifyname-qx").click(function(){
- // 取消
- $(".modifyname-bg").hide();
- Emptydata()
-})
-
-$("#modifyname-qd").click(function(){
- // 确定
- var text = $("#modifyname-txt").val();
- var id = $("#modifynameid").val();
- $(".modifyname-bg").hide();
- Emptydata();
-})
-$("#yidong-qx").click(function(){
- $(".yidong-bg ").hide();
- Emptydata('yidongkanban','yidong')
-})
-$("#yidong-qd").click(function(){
- // 确定
- if(choicetype == "kanban"){
- var txt = $('.justAnotherInputBox1').val();
- }else {
- var txt = $('.justAnotherInputBox2').val();
- }
- var id = $("#yidongid").val(); //需要移动的id
- var yidongid = MatchingId(txt);//移动到的id
- $(".yidong-bg").hide();
- Emptydata('yidongkanban','yidong')
-})
-$("#yidong-cha").click(function(){
- $(".yidong-bg").hide();
- Emptydata('yidongkanban','yidong')
-})
-
-$("#copy-qx").click(function(){
- $(".copy-bg ").hide();
- Emptydata('copykanban','copy')
-})
-$("#copy-qd").click(function(){
- // 确定
- var title = $("#copy-cha").val();//看板名
- if(choicetype == "kanban"){
- var txt = $('.justAnotherInputBox1').val(); //移动的位置
- }else {
- var txt = $('.justAnotherInputBox2').val();
- }
- var id = $("#copyid").val(); //需要移动的id
- var yidongid = MatchingId(txt);//移动到的id
- $(".copy-bg").hide();
- Emptydata('copykanban','copy')
-})
-$("#copy-cha").click(function(){
- $(".copy-bg").hide();
- Emptydata('copykanban','copy')
-})
-$("#del-qx").click(function(){
- $(".del-bg").hide();
- Emptydata()
-})
-$("#del-qd").click(function(){
- var id = $("#delid").val();
- $(".del-bg").hide();
- Emptydata();
- // SelectTabId
-})
-
-function Emptydata(id,boxname){
- SelectTabId = '';
- choicetype = '';
- tabdata(id,boxname)
-}
-
-var choicetype='kanban' //选择的位置
-function tabdata(id,boxname){
- $("."+boxname+'-tab div').removeClass('tabdata');
- $("#"+id).addClass('tabdata');
- var comboTree1,comboTree2;
- if(boxname != "newwenjian"){
- if(id.indexOf("kanban")>=0){
- $(".justAnotherInputBox1").show();
- $(".justAnotherInputBox2").hide();
- comboTree1 = $('.justAnotherInputBox1').comboTree({
- source : KanBanData,
- isMultiple: false
- });
- choicetype='kanban'
- }else {
- $(".justAnotherInputBox1").hide();
- $(".justAnotherInputBox2").show();
- comboTree2 = $('.justAnotherInputBox2').comboTree({
- source : ProjectData,
- isMultiple: false
- });
- choicetype='xiangmu'
- }
- }else {
- if(id.indexOf("kanban")>=0){
- $(".justAnotherInputBox1").hide();
- $(".justAnotherInputBox2").hide();
- comboTree1 = $('.justAnotherInputBox1').comboTree({
- source : KanBanData,
- isMultiple: false
- });
- choicetype='kanban'
- }else {
- $(".justAnotherInputBox1").hide();
- $(".justAnotherInputBox2").show();
- comboTree2 = $('.justAnotherInputBox2').comboTree({
- source : ProjectData,
- isMultiple: false
- });
- choicetype='xiangmu'
- }
- }
-}
-
-// 根据侧边栏中文名匹配对应id
-function MatchingId(name){
- var id ='';
- var data=[];
- if(choicetype == 'kanban'){
- data = KanBanData;
- }else {
- data = ProjectData;
- }
-
- for(let i in data){
- if(data[i]['title'] == name){
- id = data[i]['id']
- }else {
- if(data[i]['Category'].length > 0){
- for(let j in data[i]['Category']){
- if(data[i]['Category'][j]['title'] == name){
- id = data[i]['Category'][j]['id']
- }
- }
- }else {
- continue;
- }
- }
- }
- return id;
-}
-
-// 新建看板
-// function newkanban(){
-// var comboTree1 = $('.justAnotherInputBox1').comboTree({
-// source : KanBanData,
-// isMultiple: false
-// });
-// $(".new-bg").show();
-// }
-$("#new-cha").click(function(){
- $("#newname-txt").val('')
- $(".new-bg").hide();
- Emptydata('newkanban','new')
-})
-$("#new-qx").click(function(){
- $("#newname-txt").val('')
- $(".new-bg").hide();
- Emptydata('newkanban','new')
-})
-$("#new-qd").click(function(){
- var txt = $("#newname-txt").val();
- if(choicetype == "kanban"){
- var Addlocation = $('.justAnotherInputBox1').val(); //移动的位置
- }else {
- var Addlocation = $('.justAnotherInputBox2').val();
- }
- var positionid = MatchingId(Addlocation);//移动到的id
- $(".new-bg").hide();
- Emptydata('newkanban','new')
-})
-
-// 新建文件夹
-function newwenjian(){
- $(".newwenjian-bg").show();
-}
-
-$("#newwenjian-cha").click(function(){
- $("#newwenjianname-txt").val('')
- $(".newwenjian-bg").hide();
- Emptydata('newwenjiankanban','newwenjian')
-})
-$("#newwenjian-qx").click(function(){
- $("#newwenjianname-txt").val('')
- $(".newwenjian-bg").hide();
- Emptydata('newwenjiankanban','newwenjian')
-})
-$("#newwenjian-qd").click(function(){
- var txt = $("#newwenjianname-txt").val();
- if(choicetype == "kanban"){
- var Addlocation = ''; //移动的位置
- }else {
- var Addlocation = $('.justAnotherInputBox2').val();
- }
- var positionid
- if(positionid != ""){
- positionid = MatchingId(Addlocation);//移动到的id
- }
- // $(".newwenjian-bg").hide();
- Emptydata('newwenjiankanban','newwenjian')
-})
-
-// 创建空间
-function establishkongjian(){
- $(".kongjian-bg").show();
-}
\ No newline at end of file
diff --git a/web/src/x.min.js b/web/src/x.min.js
index 0b4d716..9904974 100644
--- a/web/src/x.min.js
+++ b/web/src/x.min.js
@@ -10934,6 +10934,8 @@ var X = window.X || {
this.callback = parms.callback;
var data = parms;
X.laytpldata("#kanban-model-modify-table-dot",data,"model"+data.id,function(html){
+
+
// if(data.modeltype == 'table' && data.modelsize != "small"){
@@ -10979,6 +10981,11 @@ var X = window.X || {
// }else {
$("#conent-box"+data.id).html(html);
// }
+ if(data.modeltype == "table" && data.modelsize != "small"){
+ var tableMul;
+ var id = 'dataTableMul'+data['id'];
+ tableMul = new FixedTable(id, 2);
+ }
})
diff --git a/web/srczip/logic/modeltable.js b/web/srczip/logic/modeltable.js
index ee09a41..22641bc 100644
--- a/web/srczip/logic/modeltable.js
+++ b/web/srczip/logic/modeltable.js
@@ -6,6 +6,8 @@
this.callback = parms.callback;
var data = parms;
X.laytpldata("#kanban-model-modify-table-dot",data,"model"+data.id,function(html){
+
+
// if(data.modeltype == 'table' && data.modelsize != "small"){
@@ -51,6 +53,11 @@
// }else {
$("#conent-box"+data.id).html(html);
// }
+ if(data.modeltype == "table" && data.modelsize != "small"){
+ var tableMul;
+ var id = 'dataTableMul'+data['id'];
+ tableMul = new FixedTable(id, 2);
+ }
})
diff --git a/web/static/css/style.css b/web/static/css/style.css
index 2e2f9f9..7bdc268 100644
--- a/web/static/css/style.css
+++ b/web/static/css/style.css
@@ -820,18 +820,20 @@ label:not(.form-check-label):not(.custom-file-label) { font-weight: 400; }
.customname-content-box { position: relative; top: 66px; }
.table_box_big {
- overflow-x: scroll;
- overflow-y: hidden;
+ /* overflow-x: scroll;
+ overflow-y: hidden; */
position: relative;
height: 300px;
+ width: 100%;
}
.table_box {
overflow: hidden;
position: absolute;
+ width: 100%;
}
.table_tbody_box {
- height: 250px;
- overflow: scroll;
+ height: 300px;
+ /* overflow: scroll; */
}
.table-fenxi-th th{
background-color: #f0f2f5;
@@ -843,9 +845,88 @@ label:not(.form-check-label):not(.custom-file-label) { font-weight: 400; }
font-size: 13px;
font-weight: 400;
border-right: 1px solid #e6e6e6;
- border-bottom: 1px solid #f0f2f5;
+ border-bottom: 1px solid #f0f2f5;
}
+.table-view .table th, .table-view .table td {
+ white-space: nowrap;
+ text-align: center;
+}
+
+.table-view .table tbody tr td:hover{
+ background: #3ea7fd;
+ color: #fff;
+}
+
+.table-bordered tr td { border-right: 1px solid #e6e6e6; border-left: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6; }
+
+.table-view {
+ position: relative;
+ overflow: auto;
+ box-shadow: 0px 1px 1px #dad8d8;
+ max-height: 300px;
+ max-width: 100%;
+}
+
+.table-head-fixed {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 3;
+}
+
+.table-head-fixed table, .table-head table {
+ background-color: var(--head-bgcolor);
+ color: var(--head-color);
+}
+
+.table-head-fixed tr th {
+ background-color: #f0f2f5;
+ min-width: 100px;
+ max-width: 200px;
+ padding: 10px 16px;
+ color: #202d3f;
+ font-size: 13px;
+ font-weight: 400;
+ border-right: 1px solid #e6e6e6;
+ border-bottom: 1px solid #f0f2f5;
+}
+
+.table-bordered tr th {
+ background-color: #f0f2f5;
+ min-width: 100px;
+ max-width: 200px;
+ padding: 10px 16px;
+ color: #202d3f;
+ font-size: 13px;
+ font-weight: 400;
+ border-right: 1px solid #e6e6e6;
+ border-bottom: 1px solid #f0f2f5;
+}
+
+.table-head {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1;
+ width: 100%;
+}
+
+.table-fixed::-webkit-scrollbar {
+ display: none;
+}
+
+.table-fixed {
+ position: absolute;
+ top: 0;
+ left: 0;
+ background-color: #fff;
+ z-index: 2;
+ overflow-y: auto;
+ box-shadow: rgb(205, 205, 205) 1px 1px 5px;
+}
+.none{display: none;}
+
.datarightsedit-txt-input { width: 420px; height: 400px; padding: 10px 15px; resize:none; border: 1px solid #f0f0f0; }
.datarightsedit-txt-input2 { width: 420px; height: 150px; padding: 10px 15px; resize:none; border: 1px solid #f0f0f0; }
.datarightsedit-txt-input3 { width: 420px; height: 150px; padding: 10px 15px; resize:none; border: 1px solid #f0f0f0; }